Информация о всех атрибутах

Возвращает информацию о системных и кастомных атрибутах.

Request

GET

https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/schema/attributes

Path parameters

Name

Description

counterId

Type: integer

Идентификатор счетчика.

Query parameters

Name

Description

entity_type

Type: string

Принадлежность атрибутов. Возможные значения:

  • CONTACT — принадлежность контактам.
  • COMPANY — принадлежность компаниям.
  • ORDER — принадлежность заказам.
  • SIMPLE_ORDER — принадлежность простым заказам.

Example: CONTACT

Responses

200 OK

OK

Body

application/json
{
  "system_attributes": [
    {
      "name": "example",
      "type_name": "example",
      "type_group": "example",
      "type_humanized": "example",
      "multivalued": true,
      "humanized": "example"
    }
  ],
  "custom_attributes": [
    null
  ]
}

Name

Description

custom_attributes

Type: Attribute[]

Список кастомных атрибутов.

Example
[
  {
    "name": "example",
    "type_name": "example",
    "type_group": "example",
    "type_humanized": "example",
    "multivalued": true,
    "humanized": "example"
  }
]

system_attributes

Type: Attribute[]

Список системных атрибутов.

Example
[
  {
    "name": "example",
    "type_name": "example",
    "type_group": "example",
    "type_humanized": "example",
    "multivalued": true,
    "humanized": "example"
  }
]

Attribute

Описание объекта Attribute.

Name

Description

multivalued

Type: boolean

Определяет, может ли атрибут иметь несколько значений.

name

Type: string

Идентификатор атрибута.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

Example: example

humanized

Type: string

Название атрибута.

Min length: 0

Max length: 4096

Example: example

type_group

Type: string

Группа типа атрибута. Возможные значения:

  • PREDEFINED — скалярный тип атрибута. Примеры значений type_name: numeric, date, datetime, email, text.
  • CUSTOM_LIST — произвольный тип атрибута.
  • SYSTEM_LIST — список продуктов, type_name: product.

Example: example

type_humanized

Type: string

Название типа атрибута.

Example: example

type_name

Type: string

Идентификатор типа атрибута.

Example: example

Example
{
  "name": "example",
  "type_name": "example",
  "type_group": "example",
  "type_humanized": "example",
  "multivalued": true,
  "humanized": "example"
}

No longer supported, please use an alternative and newer version.