Epic Online Services (EOS) Sanctions インターフェース は、ユーザーに対して取られる懲戒処分を管理します。懲戒処分には、特定のユーザーに対して製品の社会的側面を制限するゲームプレイ、通信、またはその他の一時的または永続的な禁止が含まれる場合があります。製品の懲戒処分を定義して、ユースケースに基づいた好ましくない行動に対処します。
Sanctions Web API を使用して、信頼できるサーバー アプリケーションの EOS C SDK を補うことができます。Sanctions Web API を呼び出す前に、Web API の概要 で標準、認証、エラーコードを確認してください。
API エンドポイント
https://api.epicgames.dev/sanctions/
特定のプレイヤーにアクティブな処罰を一括クエリする
ポリシー
使用するクライアントポリシーでは、sanctions:findActiveSanctionsForAnyUser アクションを許可する必要があります。
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP リクエスト
GET /sanctions/v1/productUser/{ProductUserId}/active
HTTP ヘッダ
名前 |
説明 |
---|---|
Authorization |
|
Content-Type |
|
Path Parameters
名前 |
型 |
説明 |
必須 |
---|---|---|---|
ProductUserId |
文字列 |
処罰をクエリする EOS ProductUserId |
必須 |
クエリ パラメータ
名前 |
型 |
説明 |
必須 |
---|---|---|---|
アクション |
文字列 |
任意のアクション フィルタ。Supports multiple values: action=action1&action=action2 Max items:5 |
No |
リクエストの例
curl "https://api.epicgames.dev/sanctions/v1/productUser/<ProductUserId>/active"
\
-H "accept: application/json" \
-H "Authorization:Bearer <EOSAccessToken>"
レスポンス
HTTP Response 200 - OK:Success.
HTTP ヘッダ
名前 |
説明 |
---|---|
Content-Type |
application/json |
JSON ペイロード
名前 |
型 |
説明 |
---|---|---|
要素 |
配列 |
アクティブな処罰の一覧 |
CompactSanction
CompactSanction | ||
referenceId |
String |
Unique identifier for this sanction |
timestamp |
int64 |
Epoch timestamp in seconds when this sanction was placed |
action |
String |
Action string associated with this sanction |
expirationTimestamp |
int64 |
Epoch timestamp in seconds when this expiration expires, or null if the sanction is permanent |
処罰を外部サービスに同期する
ポリシー
使用するクライアントポリシーでは、Sanctions:syncSanctionEvents アクションを許可する必要があります。
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
GET /sanctions/v1/sync | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Query Parameters | |||
Name |
Type |
Description |
Required |
lastLogId |
String |
Optional ID of the last sanction event entry processed in the previous call. |
No |
リクエストの例
curl "https://api.epicgames.dev/sanctions/v1/sync" \
-H "accept: application/json" \
-H "Authorization:Bearer <EOSAccessToken>" \
-G \
-d lastLogId=<LastLogId>
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<SanctionEvent> |
List of sanction events |
SanctionEvent | ||
productUserId |
String |
Sanctioned user's EOS ProductUserId |
action |
String |
Action string associated with this sanction |
justification |
String |
Justification string associated with this sanction |
source |
String |
Source which created this sanction, e.g. ‘developer-portal' |
eventType |
Integer |
1:Sanction was created 2:Sanction was updated 3:Sanction was deleted |
tags |
Array<String> |
List of tags associated with this sanction |
logId |
String |
Unique identifier for a SanctionEvent log entry.This value can be used to request incremental updates from the sync API. |
referenceId |
String |
Unique identifier for this sanction |
timestamp |
String |
Time when this sanction was placed |
expirationTimestamp |
String |
Time when this expiration expires, or null if the sanction is permanent |
batchUuid |
String |
UUID for the request associated with this sanction.One request may create multiple sanctions as a batch. |
epicAccountName |
String |
Name of the Epic Games account that placed this sanction |
epicAccountId |
String |
ID of the Epic Games account that placed this sanction |
eosClientId |
String |
Client credential ID which was used to place this sanction |
eosClientRole |
String |
Role of the client credential which was used to place this sanction |
createdAt |
String |
Time when this sanction request was received by the Sanctions service backend |
updatedAt |
String |
Time when this sanction was updated |
trustedPartner |
String |
The trusted partner that placed this sanction on behalf of the developer |
deploymentId |
String |
EOS DeploymentId that this sanction applies to |
pending |
Boolean |
True if this sanction is currently pending |
automated |
Boolean |
True if this sanction was created by any method other than manual action in the developer portal website |
metadata |
SanctionMetadata |
Arbitrary metadata key/value pairs associated with this sanction |
displayName |
String |
Display name of sanctioned user |
identityProvider |
String |
Identity provider that the sanctioned user authenticated with |
accountId |
String |
Sanctioned user's account ID with the specified identityProvider |
modifications |
SanctionModification |
List of modifications associated with a sanction update.This field is only set when eventType is 2. |
SanctionMetadata | ||
Metadata key/value pairs.Max item count:25.Item key max length:64.Item value max length:128. |
SanctionModification | ||
updated_at |
String |
Time when this modification was made |
Additional key/value pairs from SanctionEvent indicating what was changed in the update |
複数のプレイヤーにアクティブな処罰を一括クエリする
ポリシー
使用するクライアントポリシーでは、以下のいずれかのアクションが必要です。
sanctions:findActiveSanctionsForAnyUser
sanctions:findSanctionsForAnyUser
sanctions:findAllSanctions
sanctions:syncSanctionEvents
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
GET /sanctions/v1/{deploymentId}/active-sanctions | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
Query Parameters | |||
Name |
Type |
Description |
Required |
productUserId |
String |
Required product user ID filter.Supports multiple values: productUserId=productUserId1&productUserId=productUserId2 Max items:100 |
Yes |
action |
String |
Required action filter.Supports multiple values: action=action1&action=action2 Max items:5 |
Yes |
リクエストの例
curl "https://api.epicgames.dev/sanctions/v1/deploymentId1/active-sanctions?productUserId=productUserId1&productUserId=productUserId2&action=action1&action=action2" \
-H "accept: application/json" \
-H "Authorization:Bearer <EOSAccessToken>"
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<CompactSanctionWithPuid> |
List of active sanctions |
CompactSanctionWithPuid | ||
productUserId |
String |
The product user ID |
referenceId |
String |
Unique identifier for this sanction |
timestamp |
String |
Time when this sanction was placed in ISO-8601 format |
action |
String |
Action string associated with this sanction |
expirationTimestamp |
String |
Time when this expiration expires in ISO-8601 format, or null if the sanction is permanent |
レスポンスの例
{
"elements": [
{
"productUserId": "productUserId1",
"referenceId": "example_reference_id_1",
"timestamp":"2020-04-15T13:18:25.431762Z",
"action": "action1",
"expirationTimestamp": null
},
{
"productUserId": "productUserId2",
"referenceId": "example_reference_id_2",
"timestamp":"2020-04-15T13:32:44.261711Z",
"action": "action2",
"expirationTimestamp": null
}
]
}
処罰を作成する
ポリシー
使用するクライアントポリシーでは、sanctions:createSanction
アクションを許可する必要があります。
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
POST /sanctions/v1/{deploymentId}/sanctions | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
JSON Payload | |||
Type |
Description | ||
Array<SanctionPostPayload> |
List of sanctions to create |
リクエストの例
curl --request POST "https://api.epicgames.dev/sanctions/v1/deploymentId1/sanctions" \
-H "Content-Type: application/json" \
-H "Authorization:Bearer <EOSAccessToken>" \
--data-raw '[
{
"action":"EXAMPLE_ACTION",
"duration":0,
"justification": "example_justification",
"source": "example_source",
"productUserId": "example_product_user_id",
"pending": false,
"automated": true,
"tags": ["example_tag_1", "example_tag_2"],
"metadata": {
"example_metadata_1":"meta_1",
"example_metadata_2":"meta_2"
},
"displayName": "example_display_name",
"identityProvider": "example_identity_provider",
"accountId": "example_account_id"
}
]
SanctionPostPayload | |||
Name |
Type |
Description |
Required |
productUserId |
String |
Sanctioned user's EOS ProductUserId |
Yes |
action |
String |
Action string associated with this sanction.Format: [a-zA-Z0-9_-]+.Min length:1.Max length:64. |
Yes |
justification |
String |
Justification string associated with this sanction.Min length:1 Max length:2048 |
Yes |
source |
String |
Source which created this sanction, e.g. ‘developer-portal'.Format: [a-zA-Z0-9_-]+.Min length:2.Max length:64. |
Yes |
tags |
Array<String> |
List of tags associated with this sanction.Items are case insensitive and unique.Item format: [a-zA-Z0-9_-]+.Item max length:16 |
No |
pending |
Boolean |
True if this sanction is currently pending |
No |
metadata |
SanctionMetadata |
Arbitrary metadata key/value pairs associated with this sanction |
No |
displayName |
String |
Display name of sanctioned user.Max length:64 |
No |
identityProvider |
String |
Identity provider that the sanctioned user authenticated with.Max length:64 |
No |
accountId |
String |
Sanctioned user's account ID with the specified identityProvider.Max length:64 |
No |
duration |
integer |
The length of the sanction in seconds |
No |
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<Sanction> |
List of sanctions created |
Sanction | ||
productUserId |
String |
Sanctioned user's EOS ProductUserId |
action |
String |
Action string associated with this sanction |
justification |
String |
Justification string associated with this sanction |
source |
String |
Source which created this sanction, e.g. ‘developer-portal' |
tags |
Array<String> |
List of tags associated with this sanction |
referenceId |
String |
Unique identifier for this sanction |
timestamp |
String |
Time when this sanction was placed. |
expirationTimestamp |
String |
Time when this expiration expires, or null if the sanction is permanent |
batchUuid |
String |
UUID for the request associated with this sanction.One request may create multiple sanctions as a batch. |
epicAccountName |
String |
Name of the Epic Games account that placed this sanction |
epicAccountId |
String |
ID of the Epic Games account that placed this sanction |
eosClientId |
String |
Client credential ID which was used to place this sanction |
eosClientRole |
String |
Role of the client credential which was used to place this sanction |
createdAt |
String |
Time when this sanction request was received by the Sanctions service backend. |
updatedAt |
String |
Time when this sanction was updated. |
trustedPartner |
String |
The trusted partner that placed this sanction on behalf of the developer |
deploymentId |
String |
EOS DeploymentId that this sanction applies to |
pending |
Boolean |
True if this sanction is currently pending |
automated |
Boolean |
True if this sanction was created by any method other than manual action in the developer portal website |
metadata |
SanctionMetadata |
Arbitrary metadata key/value pairs associated with this sanction |
displayName |
String |
Display name of sanctioned user |
identityProvider |
String |
Identity provider that the sanctioned user authenticated with |
accountId |
String |
Sanctioned user's account ID with the specified identityProvider |
status |
String |
The status of this sanction.Including Active, Pending, Expired, Removed |
注記: ISO 8601 と RFC3339 で定義された時間。For example: 2021-01-01T00:00:00.000Z
レスポンスの例
{
"elements": [
{
"referenceId":"7cd6de84-b5be-405a-8fa1-55c11c821a1e",
"timestamp":"2022-03-02T19:54:42.402355Z",
"expirationTimestamp": null,
"batchUuid":"645eba40-dd53-4cea-95d3-3e22459bb84d",
"epicAccountName": null,
"epicAccountId": "",
"eosClientId": "example_client_id",
"eosClientRole": "",
"createdAt":"2022-03-02T19:54:42.402243Z",
"updatedAt": null,
"trustedPartner": null,
"metadata": {
"example_metadata_1": "meta_1",
"example_metadata_2": "meta_2"
},
"deploymentId": "deploymentId1",
"productUserId": "example_product_user_id",
"pending": false,
"automated": true,
"source": "example_source",
"justification": "example_justification",
"tags": [
"example_tag_1",
"example_tag_2"
],
"action":"EXAMPLE_ACTION",
"displayName": "example_display_name",
"identityProvider": "example_identity_provider",
"accountId": "example_account_id",
"status":"Active"
}
]
}
すべての処罰をクエリする
ポリシー
使用するクライアントポリシーでは、以下のいずれかのアクションが必要です。
sanctions:findSanctionsForAnyUser
sanctions:findAllSanctions
sanctions:syncSanctionEvents
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
GET /sanctions/v1/{deploymentId}/sanctions | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
Query Parameters | |||
Name |
Type |
Description |
Required |
limit |
integer |
The number of elements to return.Default 100. |
No |
offset |
integer |
The number of elements to skip.Default 0. |
No |
リクエストの例
curl --request GET "https://api.epicgames.dev/sanctions/v1/deploymentId1/sanctions" \
-H "Content-Type: application/json" \
-H "Authorization:Bearer <EOSAccessToken>"
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<Sanction> |
List of sanctions ordered by createdAt descending. |
paging |
Object<Paging> |
Pagination information |
レスポンスの例
{
"elements": [
{
"referenceId":"7cd6de84-b5be-405a-8fa1-55c11c821a1e",
"timestamp":"2022-03-02T19:54:42.402355Z",
"expirationTimestamp": null,
"batchUuid":"645eba40-dd53-4cea-95d3-3e22459bb84d",
"epicAccountName": null,
"epicAccountId": "",
"eosClientId": "example_client_id",
"eosClientRole": "",
"createdAt":"2022-03-02T19:54:42.402243Z",
"updatedAt": null,
"trustedPartner": null,
"metadata": {
"example_metadata_1": "meta_1",
"example_metadata_2": "meta_2"
},
"deploymentId": "deploymentId1",
"productUserId": "example_product_user_id",
"pending": false,
"automated": true,
"source": "example_source",
"justification": "example_justification",
"tags": [
"example_tag_1",
"example_tag_2"
],
"action":"EXAMPLE_ACTION",
"displayName": "example_display_name",
"identityProvider": "example_identity_provider",
"accountId": "example_account_id",
"status":"Active"
}
],
"paging": {
"total":1,
"offset":0,
"limit":100
}
}
プレイヤーのすべての処罰をクエリする
ポリシー
使用するクライアントポリシーでは、以下のいずれかのアクションが必要です。
sanctions:findSanctionsForAnyUser
sanctions:findSanctionsForLocalUser
sanctions:findAllSanctions
sanctions:syncSanctionEvents
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
GET /sanctions/v1/{deploymentId}/users/{productUserId} | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
productUserId |
String |
The productUserId to query for |
Yes |
Query Parameters | |||
Name |
Type |
Description |
Required |
limit |
integer |
The number of elements to return.Default 100. |
No |
offset |
integer |
The number of elements to skip.Default 0. |
No |
リクエストの例
curl --request GET "https://api.epicgames.dev/sanctions/v1/deploymentId1/users/example_product_user_id" \
-H "Content-Type: application/json" \
-H "Authorization:Bearer <EOSAccessToken>"
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<Sanction> |
List of sanctions ordered by createdAt descending. |
|
|
|
レスポンスの例
{
"elements": [
{
"referenceId":"7cd6de84-b5be-405a-8fa1-55c11c821a1e",
"timestamp":"2022-03-02T19:54:42.402355Z",
"expirationTimestamp": null,
"batchUuid":"645eba40-dd53-4cea-95d3-3e22459bb84d",
"epicAccountName": null,
"epicAccountId": "",
"eosClientId": "example_client_id",
"eosClientRole": "",
"createdAt":"2022-03-02T19:54:42.402243Z",
"updatedAt": null,
"trustedPartner": null,
"metadata": {
"example_metadata_1": "meta_1",
"example_metadata_2": "meta_2"
},
"deploymentId": "deploymentId1",
"productUserId": "example_product_user_id",
"pending": false,
"automated": true,
"source": "example_source",
"justification": "example_justification",
"tags": [
"example_tag_1",
"example_tag_2"
],
"action":"EXAMPLE_ACTION",
"displayName": "example_display_name",
"identityProvider": "example_identity_provider",
"accountId": "example_account_id",
"status":"Active"
}
],
"paging": {
"total":1,
"offset":0,
"limit":100
}
}
処罰を更新する
ポリシー
使用するクライアントポリシーでは、sanctions:updateSanction
アクションを許可する必要があります。
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
PATCH /sanctions/v1/{deploymentId}/sanctions | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
JSON Payload | |||
Type |
Description | ||
Array<SanctionPatchPayload> |
List of sanctions update to apply |
リクエストの例
curl --request PATCH "https://api.epicgames.dev/sanctions/v1/deploymentId1/sanctions" \
-H "Content-Type: application/json" \
-H "Authorization:Bearer <EOSAccessToken>" \
--data-raw '[{
"referenceId":"7cd6de84-b5be-405a-8fa1-55c11c821a1e",
"updates" : {
"tags": ["updated_example_tag_1","updated_example_tag_2"],
"justification": "updated_example_justification",
"metadata": {
"updated_example_metadata_1":"updated_example_metadata_1",
"updated_example_metadata_2":"updated_example_metadata_2"
}
}
}]'
SanctionPatchPayload | |||
Name |
Type |
Description |
Required |
referenceId |
String |
Unique identifier for this sanction |
Yes |
updates |
UpdatableFields |
Fields to be updated and their new values. |
Yes |
UpdatableFields | |||
Name |
Type |
Description |
Required |
tags |
Array<String> |
List of tags associated with this sanction.Items are case insensitive and unique.Item format: [a-zA-Z0-9_-]+.Item max length:16 |
No |
metadata |
SanctionMetadata |
Arbitrary metadata key/value pairs associated with this sanction |
No |
justification |
String |
Justification string associated with this sanction.Min length:1 Max length:2048 |
No |
レスポンス
HTTP Response 200 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<Sanction> |
List of sanctions updated |
レスポンスの例
{
"elements": [
{
"referenceId":"7cd6de84-b5be-405a-8fa1-55c11c821a1e",
"timestamp":"2022-03-02T19:54:42.402355Z",
"expirationTimestamp": null,
"batchUuid":"645eba40-dd53-4cea-95d3-3e22459bb84d",
"epicAccountName": null,
"epicAccountId": "",
"eosClientId": "example_client_id",
"eosClientRole": "",
"createdAt":"2022-03-02T19:54:42.402243Z",
"updatedAt":"2022-03-02T20:01:12.311744Z",
"trustedPartner": null,
"metadata": {
"updated_example_metadata_1": "updated_example_metadata_1",
"updated_example_metadata_2": "updated_example_metadata_2"
},
"deploymentId": "deploymentId1",
"productUserId": "example_product_user_id",
"pending": false,
"automated": true,
"source": "example_source",
"justification": "updated_example_justification",
"tags": [
"updated_example_tag_1",
"updated_example_tag_2"
],
"action":"EXAMPLE_ACTION",
"displayName": "example_display_name",
"identityProvider": "example_identity_provider",
"accountId": "example_account_id",
"status":"Active"
}
]
}
処罰を削除する
ポリシー
使用するクライアントポリシーでは、sanctions:deleteSanction
アクションを許可する必要があります。
認証
この呼び出しには、Connect インターフェス から取得した EOS クライアント認証アクセス トークンを使用した Bearer トークン認証が必要です。
リクエスト
HTTP Request |
DELETE /sanctions/v1/{deploymentId}/sanctions | ||
HTTP Headers | |||
Name |
Value | ||
Authorization |
Bearer <EOSAccessToken> | ||
Content-Type |
application/json | ||
Path Parameters | |||
Name |
Type |
Description |
Required |
deploymentId |
String |
The deploymentId to query for |
Yes |
JSON Payload | |||
Type |
Description | ||
SanctionDeletePayload |
The sanctions to delete and its justification |
リクエストの例
curl --request DELETE "https://api.epicgames.dev/sanctions/v1/{deploymentId}/sanctions" \
-H "Content-Type: application/json" \
-H "Authorization:Bearer <EOSAccessToken>" \
--data-raw '{
"referenceIds": ["7cd6de84-b5be-405a-8fa1-55c11c821a1e"],
"justification" : "example_delete_justification"`
}
SanctionDeletePayload | |||
Name |
Type |
Description |
Required |
referenceIds |
Array<String> |
Unique identifiers of the sanctions to be removed |
Yes |
justification |
String |
Justification string associated with this sanction removal.Min length:1 Max length:2048 |
No |
レスポンス
HTTP Response 204 - OK:Success. | ||
HTTP Headers | ||
Name |
Value | |
Content-Type |
application/json | |
JSON Payload | ||
Name |
Type |
Description |
elements |
Array<Sanction> |
List of sanctions removed |
Paging | ||
offset |
Integer |
The pagination offset |
limit |
Integer |
The sanctions count returned per call |
total |
Integer |
The total sanctions count |