---
sidebar_position: 2
description: Get post statistics and other functions to work with VK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, VK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get post statistics
 Gets statistics in terms of posts



`Function GetPostStatistics(Val PostIDsArray, Val Parameters = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | PostIDsArray | --posts | Array of string, number | &#x2714; | Array of post IDs |
  | Parameters | --auth | Structure Of String | &#x2716; | Authorization parameters. See GetAuthParameters |

  
  Returns:  Array of Arbitrary - Array of post statistics data



```bsl title="1C:Enterprise/OneScript code example"
    Parameters = GetVKParameters();

    ArrayOfPosts = New Array;
    ArrayOfPosts.Add(214);
    ArrayOfPosts.Add(215);

    Result = OPI_VK.GetPostStatistics(ArrayOfPosts, Parameters);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint vk GetPostStatistics \
             --posts "['214','215']" \
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint vk GetPostStatistics ^
             --posts "['214','215']" ^
             --auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
        ```
    </TabItem>
</Tabs>


```json title="Result"
[
 {
  "post_id": 214,
  "hide": 0,
  "join_group": 0,
  "links": 0,
  "reach_subscribers": 0,
  "reach_total": 2,
  "reach_viral": 0,
  "reach_ads": 0,
  "report": 0,
  "to_group": 1,
  "unsubscribe": 0
 },
 {
  "post_id": 215,
  "hide": 0,
  "join_group": 0,
  "links": 0,
  "reach_subscribers": 0,
  "reach_total": 3,
  "reach_viral": 0,
  "reach_ads": 0,
  "report": 0,
  "to_group": 0,
  "unsubscribe": 0
 }
]
```
