*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่

UserRestriction

แทนที่การจำกัดบนผู้ใช้

  • เส้นทางแหล่งข้อมูล
  • /cloud/v2/universes/{universe_id}/user-restrictions
  • /cloud/v2/universes/{universe_id}/places/{place_id}/user-restrictions

คุณลักษณะ

pathstring

เส้นทางทรัพยากรของการจำกัดผู้ใช้

รูปแบบ:

  • universes/{universe_id}/user-restrictions/{user_restriction_id}
  • universes/{universe_id}/places/{place_id}/user-restrictions/{user_restriction_id}.
updateTimestring
เอาต์พุตเท่านั้น

เวลาที่ตรวจสอบล่าสุดเมื่อการจำกัดผู้ใช้ได้รับการอัปเดตครั้งล่าสุด. สตริงนี้มีรูปแบบประทับเวลา

userstring
เอาต์พุตเท่านั้น

ผู้ใช้ที่ได้รับผลกระทบ.

gameJoinRestrictionobject

ผู้ใช้ถูกห้ามจากจักรวาลหรือสถานที่แม่.

URL หลัก

https://apis.roblox.com
แหล่งข้อมูล 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

รายการข้อจํากัดผู้ใช้
เวอร์ชัน Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions

รายการข้อจํากัดการใช้งานสําหรับผู้ใช้ที่เคยถูกแบนในจักรวาลหรือสถานที่เฉพาะ

ขอบเขต
universe.user-restriction:read
คำขอพารามิเตอร์เส้นทาง
universe_idstring
จำเป็นต้องมี

ID ของจักรวาล.

พารามิเตอร์คิวรี
maxPageSizenumber

จํานวนข้อจํากัดผู้ใช้สูงสุดที่จะส่งคืนบริการอาจ返回值น้อยกว่านี้หากไม่ระบุ จะมีการส่งความจํากัดผู้ใช้สูงสุด 10 รายมูลค่าสูงสุดคือ 100 และมูลค่าที่สูงกว่าจะถูกตั้งเป็น 100.

pageTokenstring

โทเค็นหน้าที่ได้รับจากการโทรก่อนหน้านี้เพื่อดึงหน้าต่อไป

เมื่อจัดหน้า พารามิเตอร์อื่น ๆ ทั้งหมดที่ให้กับการโทรต่อไปจะต้องตรงกับการโทรที่ให้โทเค็นหน้า.

การตอบกลับ

รายการข้อจํากัดผู้ใช้ในคอลเลกชันราก

userRestrictionsarray<UserRestriction>

ข้อจํากัดผู้ใช้จากจักรวาลหรือสถานที่ที่ระบุ.

nextPageTokenstring

โทเคนที่คุณสามารถส่งเป็นพารามิเตอร์ pageToken เพื่อดึงหน้าถัดไป หากฟิลด์นี้ถูกข้ามไป จะไม่มีหน้าต่อไป.

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}' \
-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

รับข้อจํากัดของผู้ใช้
เวอร์ชัน Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}

รับการจำกัดผู้ใช้

ขอบเขต
universe.user-restriction:read
คำขอพารามิเตอร์เส้นทาง
universe_idstring
จำเป็นต้องมี

ID ของจักรวาล.

user_restriction_idstring
จำเป็นต้องมี

รหัสการจํากัดผู้ใช้.

การตอบกลับUserRestriction
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}'
การตอบกลับ

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

อัปเดตข้อจํากัดผู้ใช้
เวอร์ชัน Beta

PATCH /cloud/v2/universes/{universe_id}/user-restrictions/{user_restriction_id}

อัปเดตการจํากัดผู้ใช้

ขอบเขต
universe.user-restriction:write
คำขอพารามิเตอร์เส้นทาง
universe_idstring
จำเป็นต้องมี

ID ของจักรวาล.

user_restriction_idstring
จำเป็นต้องมี

รหัสการจํากัดผู้ใช้.

พารามิเตอร์คิวรี
updateMaskstring

รายการฟิลด์ที่จะอัปเดต

ฟิลด์ game_join_restriction ต้องได้รับการปรับปรุงอย่างอะตอม; ฟิลด์หน้ากากที่สามารถดัชนีได้ใน game_join_restriction (เช่น "game_join_restriction.active" ) ไม่ได้รับการสนับสนุน. สตริงนี้มีรูปแบบ FieldMask

idempotencyKey.keystring

กุญแจพิเศษที่ใช้สำหรับการไม่สามารถใช้งานได้.

idempotencyKey.firstSentstring

เวลาที่ส่งคำขอแรก เมื่อส่ง

หากนี้อยู่ในอดีตมากกว่าอายุการใช้งานของกุญแจการไม่สามารถ (ซึ่ง อาจ เกินอายุการใช้งานขั้นต่ำที่ระบุ) เซิร์ฟเวอร์ จะต้อง ส่งคืนข้อผิดพลาด. สตริงนี้มีรูปแบบประทับเวลา

เนื้อหาคำขอUserRestriction
การตอบกลับUserRestriction
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
}
}'
การตอบกลับ

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

บันทึกการจำกัดสิทธิ์ผู้ใช้รายการ
เวอร์ชัน Beta

GET /cloud/v2/universes/{universe_id}/user-restrictions:listLogs

รายการการเปลี่ยนแปลงทรัพยากรข้อจํากัดผู้ใช้ภายในจักรวาลที่กำหนด ซึ่งรวมถึงข้อจํากัดระดับจักรวาลและระดับสถานที่

สำหรับบันทึกการจำกัดระดับจักรวาล ฟิลด์ place จะว่างเปล่า

ขอบเขต
universe.user-restriction:read
คำขอพารามิเตอร์เส้นทาง
universe_idstring
จำเป็นต้องมี

ID ของจักรวาล.

พารามิเตอร์คิวรี
maxPageSizenumber

จํานวนสูงสุดของบันทึกการจํากัดผู้ใช้ที่จะส่งคืนบริการอาจส่งคืนน้อยกว่าค่านี้หากไม่ระบุ จะมีการส่งคืนไม่เกิน 10 บันทึกการจํากัดผู้ใช้มูลค่าสูงสุดคือ 100 และมูลค่าที่สูงกว่าจะถูกตั้งเป็น 100.

pageTokenstring

โทเค็นหน้าที่ได้รับจากการโทรก่อนหน้านี้เพื่อดึงหน้าต่อไป

เมื่อจัดหน้า พารามิเตอร์อื่น ๆ ทั้งหมดที่ให้กับการโทรต่อไปจะต้องตรงกับการโทรที่ให้โทเค็นหน้า.

filterstring

ฟิลด์นี้สามารถตั้งค่าเพื่อกรองล็อกที่ส่งคืนได้

ฟิลด์ filter สนับสนุนจํานวน CEL ที่น้อยมาก:

  • user
  • place
  • ตัวเปรียบเทียบ == มีอยู่
  • ตัวประกอบทางเหตุผล && ก็ได้รับการสนับสนุนเช่นกัน

เป็นตัวอย่างการกรองสำหรับผู้ใช้และสถานที่ใช้แบบฟอร์ม filter="user == 'users/123'" && "place == 'places/456'".

การตอบกลับ

ส่งคืนรายการบันทึกการเปลี่ยนแปลงที่ใช้กับทรัพยากร UserRestriction

logsarray<object>

บันทึกการจำกัดสิทธิ์ผู้ใช้จากจักรวาลที่ระบุ.

nextPageTokenstring

โทเคนที่คุณสามารถส่งเป็นพารามิเตอร์ pageToken เพื่อดึงหน้าถัดไป หากฟิลด์นี้ถูกข้ามไป จะไม่มีหน้าต่อไป.

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}'
การตอบกลับ

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