UserRestriction

  • CHEMINS POUR RESSOURCES
  • /cloud/v2/universes/{universe}/user-restrictions
  • /cloud/v2/universes/{universe}/places/{place}/user-restrictions

Attributs

pathstring
updateTimestring
Sortie seule
userstring
Sortie seule
gameJoinRestrictionobject
URL de base

https://apis.roblox.com/cloud
La ressource 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êta

GET /cloud/v2/universes/{universe}/user-restrictions
Périmètres d'application
universe.user-restriction:read
RequêteParamètres du chemin
universestring
Requis
Paramètres de requête
maxPageSizenumber
pageTokenstring
filterstring
Réponse
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}'
Réponse

{
"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êta

GET /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}
Périmètres d'application
universe.user-restriction:read
RequêteParamètres du chemin
universestring
Requis
user-restrictionstring
Requis
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}'
Réponse

{
"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êta

PATCH /cloud/v2/universes/{universe}/user-restrictions/{user-restriction}
Périmètres d'application
universe.user-restriction:write
RequêteParamètres du chemin
universestring
Requis
user-restrictionstring
Requis
Paramètres de requête
updateMaskstring
idempotencyKey.keystring
idempotencyKey.firstSentstring
Corps de la requêteUserRestriction
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 \
} \
}'
Réponse

{
"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êta

GET /cloud/v2/universes/{universe}/user-restrictions:listLogs
Périmètres d'application
universe.user-restriction:read
RequêteParamètres du chemin
universestring
Requis
Paramètres de requête
maxPageSizenumber
pageTokenstring
filterstring
Réponse
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}'
Réponse

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