订购数据存储(测试)

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处

此页面包括与顺序数据存储工作的参考文档。有关使用 API 的更多信息,请参阅处理数据存储 API 请求和使用手册。

OrderedDataStores

https://apis.roblox.com/ordered-data-stores

列表

GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries

返回从订购数据存商店返回的列表。

参数

universeId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

命名目标订购数据存商店。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
max_page_size number

要返回传的最大结果数。服务可能会少于此值。默认值为 10 。最大值为 100 ,上限为 100 。任何输入上限于 100 都必须强制为 0>。

page_token string

从以前的 List 调用中收到的页面代币。提供此参数以恢复下一页。当页面代币发放时,所有提供给 List 的其他参数必须与调用提供页面代币匹配。

order_by string

列举方向。默认排序是上升。输入一个 desc 预фикс以下降。

filter string

输回传的评分值的范围。请参阅过滤器

请求

curl

curl --location 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries' \
--header 'x-api-key: <insert-api-key>'

答复

200 - OK
好的
返回: object
entries array<object>

指定范围的输入。

nextPageToken string

一个代币,可以发送为 page_token 来恢复下一页。如果此字段被省略,将无法恢复下一页。

创建

POST /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries

创建一个新的输入,包含提供的内容值。

参数

universeId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

订购数据商店的名称。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
id string

条目的名称。

必填
CreateEntryRequest

创建一个新的输入值。

Body
必填

请求

curl

curl --location 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries?id=<id>' \
--header 'x-api-key: <insert-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"value": <long>
}'

答复

200 - OK
好的
返回: object
id string

条目的名称

path string

请求的资源路径。

value number

输入的值。

获取

GET /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries/{entry}

获取和返回指定的入口。

参数

universeId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

订购数据商店的名称。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
entry string

入口ID。

Path
必填

请求

curl

curl --location 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries/<entry>' \
--header 'x-api-key: <insert-api-key>'

答复

200 - OK
好的
返回: object
id string

条目的名称

path string

请求的资源路径。

value number

输入的值。

删除

DELETE /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries/{entry}

删除指定的条目。

参数

universeId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

订购数据商店的名称。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
entry string

入口ID。

Path
必填

请求

curl

curl --location --request DELETE 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries/<entry>' \
--header 'x-api-key: <insert-api-key>'

答复

更新

PATCH /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries/{entry}

更新一个值,返回更新后的值。

参数

universeIdId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

订购数据商店的名称。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
entry string

入口ID。

Path
必填
UpdateEntryRequest

更新提供的值。

Body
必填
allow_missing boolean

如果条目不存在,可以使用允许丢失的旗帜

请求

curl

curl --location --request PATCH 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries/<entry>' \
--header 'x-api-key: <insert-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"value": <long>
}'

答复

200 - OK
好的
返回: object
id string

条目的名称

path string

请求的资源路径。

value number

输入的值。

增量

POST /v1/universes/{universeId}/orderedDataStores/{orderedDataStore}/scopes/{scope}/entries/{entry}:increment

增加值提供的键的值,并返回更新的条目。

已知的问题:入口值可以超过有效范围,这可能会在后端持续。返回的值会锁定在有效范围内。

参数

universeId string

您想要访问的订阅数据存储的体验的身份标识。请参阅宇宙ID在创建者仪表板上如何复制它。

Path
必填
orderedDataStore string

订购数据商店的名称。

Path
必填
scope string

数据存储范围的名称。请参阅范围

Path
必填
entry string

入口ID。

Path
必填
incrementEntryRequest

增加入值。

Body
必填

请求

curl

curl --location 'https://apis.roblox.com/ordered-data-stores/v1/universes/<universeId>/orderedDataStores/<orderedDataStore>/scopes/<scope>/entries/<entry>:increment' \
--header 'x-api-key: <insert-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"amount": <long>
}'

答复

200 - OK
好的
返回: object
id string

条目的名称

path string

请求的资源路径。

value number

输入的值。

对象

下列对象描述了接受或返回的有效载荷。请参阅每个单独的端点,以了解更多关于这些对象用途的信息。

CreateEntryRequest

创建一个新的输入值。

属性

value number

设置新条目的值。如果输入值超过 int64 支持的最大值,即 9,223,372,036,854,775,807,请求失败 400 错误。

Entry

代表一个输入。

属性

id string

条目的名称

path string

请求的资源路径。

value number

输入的值。

IncrementEntryRequest

增加入值。

属性

amount number

输入值与上限值(int64 的最大值是 9,223,372,036,854,775,807,请注意400 Bad Request错误)的差异。如果输入值超过上限值,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意,请注意

ListEntriesResponse

父系列团中的条目列表。

属性

entries array<object>

指定范围的输入。

nextPageToken string

一个代币,可以发送为 page_token 来恢复下一页。如果此字段被省略,将无法恢复下一页。

UpdateEntryRequest

更新提供的值。

属性

value number

更新值。如果输入值超过 int64 最大值,这是 9,223,372,036,854,775,807,请求失败 400 错误。