Changing an action

Changes settings for the specified tag action.

Request syntax

counterId: ID of the tag whose action you want to change.

operationId: ID of the action that you want to change.

PUT https://api-metrika.yandex.net/management/v1/counter/{counterId}/operation/{operationId}

In the request body


{
    "operation" : {
        "action" :  < operation_type > ,
        "attr" :  < operation_attribute > ,
        "value" :  < string > ,
        "status" :  < operation_status > 
    }
}
Parameters Description
operation Action.
operation
action Action type.

Possible values:

  • cut_parameter: Remove specific parameter from URL.
  • replace_domain: Replace domain.
  • to_lower: Convert to lower case.
  • merge_https_and_http: Replace https:// with http://.
  • cut_fragment: Remove anchor from URL.
  • cut_all_parameters: Cut all parameters from URL.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
Parameters Description
operation Action.
operation
action Action type.

Possible values:

  • cut_parameter: Remove specific parameter from URL.
  • replace_domain: Replace domain.
  • to_lower: Convert to lower case.
  • merge_https_and_http: Replace https:// with http://.
  • cut_fragment: Remove anchor from URL.
  • cut_all_parameters: Cut all parameters from URL.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).

Sample request

PUT https://api-metrika.yandex.net/management/v1/counter/{counterId}/operation/{operationId}

Response format


{
    "operation" : {
        "id" :  < int > ,
        "action" :  < operation_type > ,
        "attr" :  < operation_attribute > ,
        "value" :  < string > ,
        "status" :  < operation_status > 
    }
}
Parameters Description
operation Action.
operation
id

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

action Action type.

Possible values:

  • cut_parameter: Remove specific parameter from URL.
  • replace_domain: Replace domain.
  • to_lower: Convert to lower case.
  • merge_https_and_http: Replace https:// with http://.
  • cut_fragment: Remove anchor from URL.
  • cut_all_parameters: Cut all parameters from URL.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
Parameters Description
operation Action.
operation
id

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

action Action type.

Possible values:

  • cut_parameter: Remove specific parameter from URL.
  • replace_domain: Replace domain.
  • to_lower: Convert to lower case.
  • merge_https_and_http: Replace https:// with http://.
  • cut_fragment: Remove anchor from URL.
  • cut_all_parameters: Cut all parameters from URL.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).