Creation of logs request

Creates logs request.

  1. Request syntax
  2. Response format

Request syntax

counterId — counter id.

https://api-metrica.yandex.net/management/v1/counter/{counterId}/logrequests
 ? [date1=<string>]
 & [date2=<string>]
 & [fields=<string>]
 & [source=<log_request_source>]
Query parameters
date1First day.
date2Last day (can't be the current day).
fieldsList of fields separated by commas.
sourceLogs source.

Allowed values:

  • hits — pageviews.
  • visits — sessions.

Request example

POST https://api-metrica.yandex.net/management/v1/counter/{counterId}/logrequests?date1=2016-01-01date2=2016-01-31fields=ym:pv:dateTime,ym:pv:referersource=hits

Response format


{
    "log_request" :  < log_request > 
}
Parameters Description
log_request Logs request.