Xsolla-logo

カタログフィルタルールを修正Server-sideAdmin

patch/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
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.

is_enabled
boolean

ルールが有効な場合。

is_satisfied_for_unauth
boolean

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

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

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

item_id
required
number

アイテムID。

name
string [ 1 .. 255 ] characters ^\S

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

Responses
204

更新に成功しました。

401

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

422

リクエスト検証エラー。

Request samples
application/json
{
  • "is_enabled": false
}
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"
}