เส้นทางทรัพยากรของการจำกัดผู้ใช้
รูปแบบ:
- universes/{universe_id}/user-restrictions/{user_restriction_id}
- universes/{universe_id}/places/{place_id}/user-restrictions/{user_restriction_id}.
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
แทนที่การจำกัดบนผู้ใช้
เส้นทางทรัพยากรของการจำกัดผู้ใช้
รูปแบบ:
เวลาที่ตรวจสอบล่าสุดเมื่อการจำกัดผู้ใช้ได้รับการอัปเดตครั้งล่าสุด. สตริงนี้มีรูปแบบประทับเวลา
ผู้ใช้ที่ได้รับผลกระทบ.
ผู้ใช้ถูกห้ามจากจักรวาลหรือสถานที่แม่.
https://apis.roblox.com
{
"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
}
}
รายการข้อจํากัดการใช้งานสําหรับผู้ใช้ที่เคยถูกแบนในจักรวาลหรือสถานที่เฉพาะ
ID ของจักรวาล.
จํานวนข้อจํากัดผู้ใช้สูงสุดที่จะส่งคืนบริการอาจ返回值น้อยกว่านี้หากไม่ระบุ จะมีการส่งความจํากัดผู้ใช้สูงสุด 10 รายมูลค่าสูงสุดคือ 100 และมูลค่าที่สูงกว่าจะถูกตั้งเป็น 100.
โทเค็นหน้าที่ได้รับจากการโทรก่อนหน้านี้เพื่อดึงหน้าต่อไป
เมื่อจัดหน้า พารามิเตอร์อื่น ๆ ทั้งหมดที่ให้กับการโทรต่อไปจะต้องตรงกับการโทรที่ให้โทเค็นหน้า.
รายการข้อจํากัดผู้ใช้ในคอลเลกชันราก
ข้อจํากัดผู้ใช้จากจักรวาลหรือสถานที่ที่ระบุ.
โทเคนที่คุณสามารถส่งเป็นพารามิเตอร์ pageToken เพื่อดึงหน้าถัดไป หากฟิลด์นี้ถูกข้ามไป จะไม่มีหน้าต่อไป.
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"
}
รับการจำกัดผู้ใช้
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
}
}
อัปเดตการจํากัดผู้ใช้
ID ของจักรวาล.
รหัสการจํากัดผู้ใช้.
รายการฟิลด์ที่จะอัปเดต
ฟิลด์ game_join_restriction ต้องได้รับการปรับปรุงอย่างอะตอม; ฟิลด์หน้ากากที่สามารถดัชนีได้ใน game_join_restriction (เช่น "game_join_restriction.active" ) ไม่ได้รับการสนับสนุน. สตริงนี้มีรูปแบบ FieldMask
กุญแจพิเศษที่ใช้สำหรับการไม่สามารถใช้งานได้.
เวลาที่ส่งคำขอแรก เมื่อส่ง
หากนี้อยู่ในอดีตมากกว่าอายุการใช้งานของกุญแจการไม่สามารถ (ซึ่ง อาจ เกินอายุการใช้งานขั้นต่ำที่ระบุ) เซิร์ฟเวอร์ จะต้อง ส่งคืนข้อผิดพลาด. สตริงนี้มีรูปแบบประทับเวลา
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
}
}
รายการการเปลี่ยนแปลงทรัพยากรข้อจํากัดผู้ใช้ภายในจักรวาลที่กำหนด ซึ่งรวมถึงข้อจํากัดระดับจักรวาลและระดับสถานที่
สำหรับบันทึกการจำกัดระดับจักรวาล ฟิลด์ place จะว่างเปล่า
ID ของจักรวาล.
จํานวนสูงสุดของบันทึกการจํากัดผู้ใช้ที่จะส่งคืนบริการอาจส่งคืนน้อยกว่าค่านี้หากไม่ระบุ จะมีการส่งคืนไม่เกิน 10 บันทึกการจํากัดผู้ใช้มูลค่าสูงสุดคือ 100 และมูลค่าที่สูงกว่าจะถูกตั้งเป็น 100.
โทเค็นหน้าที่ได้รับจากการโทรก่อนหน้านี้เพื่อดึงหน้าต่อไป
เมื่อจัดหน้า พารามิเตอร์อื่น ๆ ทั้งหมดที่ให้กับการโทรต่อไปจะต้องตรงกับการโทรที่ให้โทเค็นหน้า.
ฟิลด์นี้สามารถตั้งค่าเพื่อกรองล็อกที่ส่งคืนได้
ฟิลด์ filter สนับสนุนจํานวน CEL ที่น้อยมาก:
เป็นตัวอย่างการกรองสำหรับผู้ใช้และสถานที่ใช้แบบฟอร์ม filter="user == 'users/123'" && "place == 'places/456'".
ส่งคืนรายการบันทึกการเปลี่ยนแปลงที่ใช้กับทรัพยากร UserRestriction
บันทึกการจำกัดสิทธิ์ผู้ใช้จากจักรวาลที่ระบุ.
โทเคนที่คุณสามารถส่งเป็นพารามิเตอร์ pageToken เพื่อดึงหน้าถัดไป หากฟิลด์นี้ถูกข้ามไป จะไม่มีหน้าต่อไป.
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"
}