You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
---
|
|
sidebar_position: 6
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get counters list
|
|
Gets a list of available counters with or without filtering
|
|
|
|
|
|
|
|
`Function GetCountersList(Val Token, Val Filter = Undefined) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Auth token |
|
|
| Filter | --filter | Structure of KeyAndValue | ✖ | List filter. See GetCounterFilterStructure |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Method at API documentation: [List of available counters](https://yandex.ru/dev/metrika/en/management/openapi/counter/counters)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
|
CounterID = "98875788";
|
|
|
|
Result = OPI_YandexMetrika.GetCountersList(Token);
|
|
|
|
// filter by IDs list
|
|
|
|
Filter = New Structure;
|
|
|
|
CountersArray = New Array;
|
|
CountersArray.Add(CounterID);
|
|
|
|
Filter.Insert("counter_ids", CountersArray);
|
|
|
|
Result = OPI_YandexMetrika.GetCountersList(Token, Filter);
|
|
```
|
|
|
|
|
|
|
|
|
|
|