用户限制的资源路径。
格式:
- universes/{universe_id}/user-restrictions/{user_restriction_id}
- universes/{universe_id}/places/{place_id}/user-restrictions/{user_restriction_id}.
*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处。
代表对用户的限制。
用户限制的资源路径。
格式:
用户限制最后更新时间戳。. 此字符串格式为 FieldMask。
受影响的用户。.
用户被禁止从父宇宙或场景。.
https://apis.roblox.com
{
"path": "universes/123/user-restrictions/123",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/156",
"gameJoinRestriction": {
"active": true,
"startTime": "2023-07-05T12:34:56Z",
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"excludeAltAccounts": true,
"inherited": true
}
}
列出已在宇宙或特定场景点被禁止的用户的用户限制。
宇宙ID。.
回传回的最大用户限制数量。服务可能返回小于此值。如果未指定,最多返回 10 个用户限制。最大值为 100,更高值设置为 100。.
从前一次调用收到的页面代币,用于检索后续页面。
当页面分页时,所有其他参数提供给后续调用的必须与提供页面代币的调用匹配。.
父系列合中的用户限制列表。
指定宇宙或地点的用户限制。.
您可以将其作为pageToken参数发送的代币来检索下一页。如果该字段被忽略,就没有后续页面。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/user-restrictions?maxPageSize=10&pageToken={string}' \
-H 'x-api-key: {your-api-key}'
{
"userRestrictions": [
{
"path": "universes/123/user-restrictions/123",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/156",
"gameJoinRestriction": {
"active": true,
"startTime": "2023-07-05T12:34:56Z",
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"excludeAltAccounts": true,
"inherited": true
}
}
],
"nextPageToken": "string"
}
获取用户限制。
宇宙ID。.
用户限制ID。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}' \
-H 'x-api-key: {your-api-key}'
{
"path": "universes/123/user-restrictions/123",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/156",
"gameJoinRestriction": {
"active": true,
"startTime": "2023-07-05T12:34:56Z",
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"excludeAltAccounts": true,
"inherited": true
}
}
更新用户限制。
宇宙ID。.
用户限制ID。.
要更新的字段列表。
game_join_restriction 字段必须被原子更新;索引到 game_join_restriction (例如 "game_join_restriction.active" ) 的字段面具不支持。. 此字符串格式为 FieldMask。
用于不可变性的独特钥。.
第一个请求发送的时戳。
如果这比 idempotency 键的有效期更遥远,那么服务器 必须 返回错误。. 此字符串格式为 FieldMask。
curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}?updateMask={string}&idempotencyKey.key={string}&idempotencyKey.firstSent={string}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"gameJoinRestriction": {
"active": true,
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"excludeAltAccounts": true
}
}'
{
"path": "universes/123/user-restrictions/123",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/156",
"gameJoinRestriction": {
"active": true,
"startTime": "2023-07-05T12:34:56Z",
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"excludeAltAccounts": true,
"inherited": true
}
}
列出给定宇宙内用户限制资源的更改。这包括宇宙级和地点级限制。
对于宇宙级限制日志,place字段将为空。
宇宙ID。.
返回传的最大用户限制日志数量。服务可能返回小于此值。如果未指定,最多返回 10 个用户限制日志。最大值为 100,更高值设置为 100。.
从前一次调用收到的页面代币,用于检索后续页面。
当页面分页时,所有其他参数提供给后续调用的必须与提供页面代币的调用匹配。.
该字段可以设置为过滤返回的日志。
filter 字段支持很小数量的CEL:
作为例子,过滤用户和地点需要形式 filter="user == 'users/123'" && "place == 'places/456'".
返回应用于用户限制资源的更改日志列表。
指定宇宙的用户限制日志。.
您可以将其作为pageToken参数发送的代币来检索下一页。如果该字段被忽略,就没有后续页面。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/user-restrictions:listLogs?maxPageSize=10&pageToken={string}&filter={string}' \
-H 'x-api-key: {your-api-key}'
{
"logs": [
{
"user": "users/156",
"place": "places/456",
"moderator": {
"robloxUser": "users/156"
},
"createTime": "2023-07-05T12:34:56Z",
"active": true,
"startTime": "2023-07-05T12:34:56Z",
"duration": "3s",
"privateReason": "some private reason",
"displayReason": "some display reason",
"restrictionType": {
"gameJoinRestriction": {}
},
"excludeAltAccounts": true
}
],
"nextPageToken": "string"
}