UserRestriction

  • 资源路径
  • /cloud/v2/universes/{universe}/user-restrictions
  • /cloud/v2/universes/{universe}/places/{place}/user-restrictions

属性

pathstring
updateTimestring
仅输出
userstring
仅输出
gameJoinRestrictionobject
基本网址

https://apis.roblox.com/cloud
UserRestriction 资源

{
"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
}
}

UserRestriction

List User Restrictions
Beta

GET /cloud/v2/universes/{universe}/user-restrictions
范围
universe.user-restriction:read
请求路径参数
universestring
必填
查询参数
maxPageSizenumber
pageTokenstring
filterstring
答复
nextPageTokenstring
GET /cloud/v2/universes/{universe}/user-restrictions

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/user-restrictions?maxPageSize=10&pageToken={string}&filter={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"
}

UserRestriction

Get User Restriction
Beta

GET /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}
范围
universe.user-restriction:read
请求路径参数
universestring
必填
user-restrictionstring
必填
GET /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/user-restrictions/{user-restriction}' \
-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
}
}

UserRestriction

Update User Restriction
Beta

PATCH /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}
范围
universe.user-restriction:write
请求路径参数
universestring
必填
user-restrictionstring
必填
查询参数
updateMaskstring
idempotencyKey.keystring
idempotencyKey.firstSentstring
请求正文UserRestriction
PATCH /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe}/user-restrictions/{user-restriction}?updateMask={string}&idempotencyKey.key={string}&idempotencyKey.firstSent={string}' \
-H 'x-api-key: {your-api-key}' \
--data '{ \
"gameJoinRestriction": { \
"active": true, \
"startTime": "2023-07-05T12:34:56Z", \
"duration": "3s", \
"privateReason": "some private reason", \
"displayReason": "some display reason", \
"excludeAltAccounts": true, \
"inherited": 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
}
}

UserRestriction

List User Restriction Logs
Beta

GET /cloud/v2/universes/{universe}/user-restrictions:listLogs
范围
universe.user-restriction:read
请求路径参数
universestring
必填
查询参数
maxPageSizenumber
pageTokenstring
filterstring
答复
logsarray<object>
nextPageTokenstring
GET /cloud/v2/universes/{universe}/user-restrictions:listLogs

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/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",
"excludeAltAccounts": true
}
],
"nextPageToken": "string"
}