UserRestriction

Represents a restriction on a user.

  • RESSOURCEN-PFADE
  • /cloud/v2/universes/{universe_id}/user-restrictions
  • /cloud/v2/universes/{universe_id}/places/{place_id}/user-restrictions

Attribute

pathstring

The resource path of the user restriction.

Formats:

  • universes/{universe_id}/user-restrictions/{user_restriction_id}
  • universes/{universe_id}/places/{place_id}/user-restrictions/{user_restriction_id}.
updateTimestring
Nur Ausgabe

The timestamp when the user restriction was last updated. Dieser String ist als Zeitstempel formatiert.

userstring
Nur Ausgabe

The affected user.

gameJoinRestrictionobject

The user is banned from the parent universe or place.

Basis-URL

https://apis.roblox.com
Die UserRestriction-Ressource

{
"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_id}/user-restrictions

List user restrictions for users that have ever been banned in either a universe or a specific place.

Bereiche
universe.user-restriction:read
AnfragePfadparameter
universe_idstring
Erforderlich

The universe ID.

Anfrageparameter
maxPageSizenumber

The maximum number of user restrictions to return. The service might return fewer than this value. If unspecified, at most 10 user restrictions are returned. The maximum value is 100 and higher values are set to 100.

pageTokenstring

A page token, received from a previous call, to retrieve a subsequent page.

When paginating, all other parameters provided to the subsequent call must match the call that provided the page token.

filterstring

This field may be set in order to filter the resources returned.

The filter field supports a very small subset of CEL:

  • Only the game_join_restriction.active field is supported.
  • Only the == operator is available; no other operators nor built-ins are supported.

Example filter: game_join_restriction.active == "true".

Rückmeldung

A list of UserRestrictions in the parent collection.

userRestrictionsarray<UserRestriction>

The UserRestrictions from the specified Universe or Place.

nextPageTokenstring

A token that you can send as a pageToken parameter to retrieve the next page. If this field is omitted, there are no subsequent pages.

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}'
Rückmeldung

{
"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_id}/user-restrictions/{user_restriction_id}

Get the user restriction.

Bereiche
universe.user-restriction:read
AnfragePfadparameter
universe_idstring
Erforderlich

The universe ID.

user_restriction_idstring
Erforderlich

The user-restriction ID.

RückmeldungUserRestriction
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}'
Rückmeldung

{
"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_id}/user-restrictions/{user_restriction_id}

Update the user restriction.

Bereiche
universe.user-restriction:write
AnfragePfadparameter
universe_idstring
Erforderlich

The universe ID.

user_restriction_idstring
Erforderlich

The user-restriction ID.

Anfrageparameter
updateMaskstring

The list of fields to update.

The game_join_restriction field must be updated atomically; field masks that index into game_join_restriction (such as "game_join_restriction.active") are not supported. Dieser String ist als FieldMask formatiert.

idempotencyKey.keystring

The unique key to use for idempotency.

idempotencyKey.firstSentstring

The timestamp at which the first request was sent.

If this is further in the past than the lifetime of the idempotency key (which may exceed the annotated minimum lifetime), the server must return an error. Dieser String ist als Zeitstempel formatiert.

Text anfordernUserRestriction
RückmeldungUserRestriction
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
}
}'
Rückmeldung

{
"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_id}/user-restrictions:listLogs

List changes to UserRestriction resources within a given universe. This includes both universe-level and place-level restrictions.

For universe-level restriction logs, the place field will be empty.

Bereiche
universe.user-restriction:read
AnfragePfadparameter
universe_idstring
Erforderlich

The universe ID.

Anfrageparameter
maxPageSizenumber

The maximum number of UserRestrictionLogs to return. The service may return fewer than this value. If unspecified, at most 10 UserRestrictionLogs are returned. The maximum value is 100 and higher values are set to 100.

pageTokenstring

A page token, received from a previous call, to retrieve a subsequent page.

When paginating, all other parameters provided to the subsequent call must match the call that provided the page token.

filterstring

This field may be set to filter the logs returned.

The filter field supports a very small number of CEL:

  • user
  • place
  • The == comparison operator is available.
  • The && logical operator is also supported.

As an example, filtering for a user and a place takes the form filter="user == 'users/123'" && "place == 'places/456'".

Rückmeldung

Returns a list of change logs applied to UserRestriction resources.

logsarray<object>

The UserRestrictionLogs from the specified Universe.

nextPageTokenstring

A token that you can send as a pageToken parameter to retrieve the next page. If this field is omitted, there are no subsequent pages.

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}'
Rückmeldung

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