List of segments for a tag
Returns a list of segments created via the API and associated with the specified tag.
Request
GET
https://api-metrika.yandex.net/management/v1/counter/{counterId}/apisegment/segments
Path parameters
|
Name |
Description |
|
counterId |
Type: integer Tag ID. |
Responses
200 OK
OK
Body
application/json
{
"segments": [
{
"segment_id": 0,
"counter_id": 0,
"name": "example",
"expression": "example",
"status": "example",
"segment_source": "example",
"create_time": "2025-01-01T00:00:00Z"
}
]
}
|
Name |
Description |
|
segments |
Type: Segment[] Example
|
Segment
Segment.
|
Name |
Description |
|
counter_id |
Type: integer Tag ID. |
|
create_time |
Type: string<date-time> Segment creation time. Example: |
|
expression |
Type: string An expression that matches the value of the Min length: Max length: Example: |
|
name |
Type: string Segment name. Min length: Max length: Example: |
|
segment_id |
Type: integer Segment ID. |
|
segment_source |
Type: string Segment source. Shows how this segment was created. Accepts the value Example: |
|
status |
Type: string Segment status. Possible values:
Example: |
Example
{
"segment_id": 0,
"counter_id": 0,
"name": "example",
"expression": "example",
"status": "example",
"segment_source": "example",
"create_time": "2025-01-01T00:00:00Z"
}