Xsolla-logo

カタログフィルタールールを更新Server-sideAdmin

put/v2/project/{project_id}/admin/user/attribute/rule/{rule_id}

ユーザー属性に適用される特定のルールを更新します。指定されていないプロパティはデフォルト値が使用されます(プロパティが必須でない場合)。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

プロジェクトID。このパラメータは、ドメインページのプロジェクト名の横にあります。

Example: 44056
rule_id
required
number

ルールID。

Example: 1
Request Body schema: application/json
name
required
string [ 1 .. 255 ] characters ^\S

ルールの読みやすい名前。パブリッシャーアカウントでルールを表示するために使用します。

is_enabled
required
boolean

ルールが有効な場合。

required
Array of type = string (objects) or Array of type = date (objects) or Array of type = number (objects)
One of:

ユーザー属性値と比較される条件。 動作が有効になるためには、すべての条件が満たされなければなりません。

[ 1 .. 100 ] items
Array ([ 1 .. 100 ] items)
attribute
required
string [ 1 .. 255 ] characters ^[-_.\\d\\w]+$

ユーザー属性コード。

operator
required
string

条件によって実行される操作のタイプ。string属性タイプの場合。

Enum: Description
eq

イコール

ne

ノットイコール

value
required
string <= 255 characters

ユーザー属性値の比較対象となる条件値。ライプは属性タイプに依存します。

type
required
string

ユーザー属性タイプ。

Value: "string"
can_be_missing
boolean

Indicates that the condition is met even if attribute is missing from user attributes. Pass true to show the item to users who don't have this attribute. Users who have the attribute, but the value does not match that specified in the condition, will not see the item. False — users who have the attribute, but the value does not match that specified in the condition, or the attribute is missing, will not see the item.

required
Array of objects or objects [ 1 .. 100 ] items
Array ([ 1 .. 100 ] items)
One of:

属性値が条件を満たした場合に、ユーザーに表示されるアイテム。

item_id
required
number

アイテムID。

is_satisfied_for_unauth
boolean

アイテムを無許可のユーザーに表示するかどうか。「true」の場合、カタログ表示ルールに関係なく、アイテムは権限のないユーザーに表示されます。デフォルトでは「false」です。

Responses
204

更新に成功しました。

401

認証に失敗しましたか、誤りがあります。認証または正しい認証情報を使用したことを確認してください。

422

リクエスト検証エラー。

Request samples
application/json
{
  • "attribute_conditions": [
    ],
  • "is_enabled": true,
  • "is_satisfied_for_unauth": false,
  • "items": [
    ],
  • "name": "Ork race armor rule"
}
Response samples
application/json
{
  • "errorCode": 1501,
  • "errorMessage": "[0401-1501]: Authorization failed: Authorization header not sent",
  • "statusCode": 401,
  • "transactionId": "x-x-x-x-transactionId-mock-x-x-x"
}