UserRestriction

  • ĐƯỜNG DẪN TÀI NGUYÊN
  • /cloud/v2/universes/{universe_id}/user-restrictions
  • /cloud/v2/universes/{universe_id}/places/{place_id}/user-restrictions

Thuộc Tính

pathstring
updateTimestring
Chỉ Xuất
userstring
Chỉ Xuất
gameJoinRestrictionobject
URL Cơ Sở

https://apis.roblox.com
Tài nguyên 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
Bản Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions
Phạm Vi
universe.user-restriction:read
Yêu CầuTham Số Đường Dẫn
universe_idstring
Bắt Buộc
Tham Số Truy Vấn
maxPageSizenumber
pageTokenstring
filterstring
Phản Hồi
nextPageTokenstring
GET /cloud/v2/universes/{universe_id}/user-restrictions

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/user-restrictions?maxPageSize=10&pageToken={string}&filter={string}' \
-H 'x-api-key: {your-api-key}'
Phản Hồi

{
"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
Bản Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}
Phạm Vi
universe.user-restriction:read
Yêu CầuTham Số Đường Dẫn
universe_idstring
Bắt Buộc
user_restriction_idstring
Bắt Buộc
Phản HồiUserRestriction
GET /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_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}'
Phản Hồi

{
"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
Bản Beta

PATCH /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}
Phạm Vi
universe.user-restriction:write
Yêu CầuTham Số Đường Dẫn
universe_idstring
Bắt Buộc
user_restriction_idstring
Bắt Buộc
Tham Số Truy Vấn
updateMaskstring
idempotencyKey.keystring
idempotencyKey.firstSentstring
Yêu Cầu Cơ ThểUserRestriction
Phản HồiUserRestriction
PATCH /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}

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
}
}'
Phản Hồi

{
"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
Bản Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions:listLogs
Phạm Vi
universe.user-restriction:read
Yêu CầuTham Số Đường Dẫn
universe_idstring
Bắt Buộc
Tham Số Truy Vấn
maxPageSizenumber
pageTokenstring
filterstring
Phản Hồi
logsarray<object>
nextPageTokenstring
GET /cloud/v2/universes/{universe_id}/user-restrictions:listLogs

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}'
Phản Hồi

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