Stream status

Returns a list of streams for each event type. Each stream contains a list of 5-minute windows with data sizes and the composition of export fields.

Request format

GET https://api.appmetrica.yandex.ru/datastream/v1/application/{id}/status

id

App ID

Response format

{
    "status": {
        "streams": [
            {
                "data_type": string,
                "stream_windows": [
                    {
                        "stream_window_timestamp": int,
                        "export_schema_id": int,
                        "payload_bytes": int,
                        "event_count": int,
                        "update_timestamp": int
                    },
                    ...
                ]
            },
            ...
        ],
        "export_fields": [
            {
                "export_schema_id": int,
                "field_names": [
                    "event_datetime",
                    "event_json",
                    "event_name",
                    "event_timestamp",
                    "session_id",
                    "installation_id",
                    "appmetrica_device_id",
                    "city",
                    "connection_type",
                    "country_iso_code",
                    ...
                ]
            },
            ...
        ]
    }
}

status

API response.

status.streams

List of streams with export data.

status.streams.data_type

The type of data the stream is generated from.

Possible values:

  • event;
  • installation;
  • session_start;
  • push_token;
  • crash;
  • error;
  • click;
  • revenue.

status.streams.stream_windows

List of stream windows.

status.streams.stream_windows.stream_window_timestamp

Unix timestamp in seconds pointing to the data window. It is used to specify a window for downloading data.

status.streams.stream_windows.export_schema_id

ID of the set of CSV fields.

status.streams.stream_windows.payload_bytes

The size of the CSV file in bytes, excluding the CSV header.

status.streams.stream_windows.event_count

The number of events in the CSV file.

status.streams.stream_windows.update_timestamp

Unix timestamp in seconds. Indicates the time of the last data change in this window. Changes occur in the last windows to which data is currently being appended.

status.export_fields

Contains a list of sets of CSV fields that were used to generate data windows.

status.export_fields.export_schema_id

ID of the set of CSV fields.

status.export_fields.field_names

List of string names of fields selected for export. For more information about the fields, see Data types for export.

Example

Request:

curl -X GET 'https://api.appmetrica.yandex.ru/datastream/v1/application/1111/status' \
-H 'Authorization: OAuth oauth_token'

Response:

{
    "status": {
        "streams": [
            {
                "data_type": string,
                "stream_windows": [
                    {
                        "stream_window_timestamp": int,
                        "export_schema_id": int,
                        "payload_bytes": int,
                        "event_count": int,
                        "update_timestamp": int
                    },
                    ...
                ]
            },
            ...
        ],
        "export_fields": [
            {
                "export_schema_id": int,
                "field_names": [
                    "event_datetime",
                    "event_json",
                    "event_name",
                    "event_timestamp",
                    "session_id",
                    "installation_id",
                    "appmetrica_device_id",
                    "city",
                    "connection_type",
                    "country_iso_code",
                    ...
                ]
            },
            ...
        ]
    }
}

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support