Creating a segment from a metric object

Creates a segment from a metric with the specified parameters.

  1. Request syntax
  2. In the request body
  3. Response format

Request syntax

https://api-audience.yandex.ru/v1/management/segments/create_metrika
 ? 

In the request body


{
    "segment" : {
        "name" :  < string > ,
        "metrika_segment_type" :  < metrika_segment_type > ,
        "metrika_segment_id" :  < long > 
    }
}
Parameters Description
segment The segment with the specified parameters.
segment
name Segment name.
metrika_segment_type The type of object in Yandex.Metrica that the segment for Yandex.Audience will be created from.

Possible values:

  • counter_id – Tag.
  • goal_id – Goal.
  • segment_id – Segment.
metrika_segment_id ID of the object from Yandex.Metrica.
Parameters Description
segment The segment with the specified parameters.
segment
name Segment name.
metrika_segment_type The type of object in Yandex.Metrica that the segment for Yandex.Audience will be created from.

Possible values:

  • counter_id – Tag.
  • goal_id – Goal.
  • segment_id – Segment.
metrika_segment_id ID of the object from Yandex.Metrica.

Sample request

POST https://api-audience.yandex.ru/v1/management/segments/create_metrika?

Response format


{
    "segment" :  < _metrika_segment > 
}
Parameters Description
segment The segment with the specified parameters.
Parameters Description
segment The segment with the specified parameters.