Creating an action

Creates an action for the counter.

Request

POST

https://api-metrika.yandex.net/management/v1/counter/{counterId}/operations

Path parameters

Name

Description

counterId

Type: integer

ID of the counter to create an action for.

Body

application/json
{
  "operation": {
    "id": 0,
    "action": "example",
    "attr": "example",
    "value": "example",
    "status": "example"
  }
}

Name

Description

operation

Type: OperationE

List of structures with information on counter actions.

Example
{
  "id": 0,
  "action": "example",
  "attr": "example",
  "value": "example",
  "status": "example"
}

OperationE

List of structures with information on counter actions.

Name

Description

action

Type: string

Action type:

  • cut_fragment: Remove an anchor from the URL.
  • cut_parameter: Remove a specific parameter from the URL.
  • cut_all_parameters: Remove all parameters from the URL.
  • merge_https_and_http: Replace https:// with http://.
  • to_lower: Convert to lower case.
  • replace_domain: Replace a domain.

Example: example

attr

Type: string

Field for filtering:

  • referer: Referrer.
  • url: Page URL.

Example: example

status

Type: string

Action status:

  • active: Action is used.
  • disabled: Action is disabled (but not deleted).

Example: example

id

Type: integer

Action ID (needs to be specified while changing a counter action).

value

Type: string

Value for replacement.

Example: example

Example
{
  "id": 0,
  "action": "example",
  "attr": "example",
  "value": "example",
  "status": "example"
}

Responses

200 OK

OK

Body

application/json
{
  "operation": {
    "id": 0,
    "action": "example",
    "attr": "example",
    "value": "example",
    "status": "example"
  }
}

Name

Description

operation

Type: OperationE

List of structures with information on counter actions.

Example
{
  "id": 0,
  "action": "example",
  "attr": "example",
  "value": "example",
  "status": "example"
}

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