Information about all attributes

Returns information about system and custom attributes.

Request

GET

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

Path parameters

Name

Description

counterId

Type: integer

Counter ID.

Query parameters

Name

Description

entity_type

Type: string

Attribute ownership. Possible values:

  • CONTACT: Attributes belong to contacts.
  • COMPANY: Attributes belong to companies.
  • ORDER: Attributes belong to orders.
  • SIMPLE_ORDER: Attributes belong to simple orders.

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[]

List of custom attributes.

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

system_attributes

Type: Attribute[]

List of system attributes.

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

Attribute

Description of the Attribute object.

Name

Description

multivalued

Type: boolean

Determines whether the attribute can have multiple values.

name

Type: string

Attribute ID.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

Example: example

humanized

Type: string

Attribute name.

Min length: 0

Max length: 4096

Example: example

type_group

Type: string

Attribute type group. Possible values:

  • PREDEFINED: Scalar attribute type. Examples of type_name values: numeric, date, datetime, email, and text.
  • CUSTOM_LIST: Arbitrary attribute type.
  • SYSTEM_LIST: Product list, type_name: product.

Example: example

type_humanized

Type: string

Attribute type name.

Example: example

type_name

Type: string

Attribute type ID.

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.