Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Migration of unmigrated content due to installation of a new plugin

...

Retrieve report data

Блок кода
languagebash
GET https://uireporting.getintent.com/api/v1v2/bigdata/reports?token=<token>&dataset_name=<dataset>&start=<start_date>&end=<end_date>

Parameters:

ParameterDescriptionRequiredValues
By default
DefaultExample
token 
It

User's

required.

Validates if method is available for particular user.

Affects on data available for report building according to access settings.

access token, affects available reporting info.

yes

User's token

It's string value. Can be found at "My Settings" menu at API tab

null../reports?token=tokenstring
format
Manages report's
Reporting format.no

json - json report format

text - text report format divided by tab

csv - comma separated values, see csv_separator parameter for possible options

text../reports?token=<token>&format=json
csv_separator
Single character which is used as a separator in case format is CSV.no

; - semicolon

, - comma

\t - tab
../reports?token=<token>&format=json&csv_separator=;
dataset_nameDataset name
dataset_name - the name of registered
.yes

Registered reporting data set

 

name


null../reports?token=<token>&dataset_name=available_inventory
start

Report

's period

start date.

End date is required also.
yes

Date at YYYY-mm-dd format

null../reports?token=<token>&start=2015-05-01&end=2015-05-31
end

Report

's period

end date.

Start date is required also.
yes

Date at YYYY-mm-dd format

null../reports?token=<token>&start=2015-05-01&end=2015-05-31
timezone
Timezone report's period
Reporting timezone.noTimezone nameUTC../reports?token=<token>&timezone=Europe/Moscow
keys

"Group by"

report data fields.

Fields can be found at Meta Data

Comma-separated field names

reporting option - reporting data can be grouped by desired keys.

noGrouping keys (available values can be retrieved by meta_data API)null../reports?token=<token>&keys=country,os
valuesOnly specified "value_fields" will be outputed.noValue fields names (available values can be retrieved by meta_data API)all columns../reports?token=<token>&values=imps,cpm
filter[]
Array for report's output data filtering values

Filtering by key.

no

Filter value's format is

op

<op>:

field

<field>:

values

<values>

Each separated value should be specified at new filter[] key

op - comparison operation. Available options

are

: eq (is equal)

and

/ ne (is not equal). Backwards compatibility: you can use is_not

(

for "is not equal

)

".

field - field name

values - CSV values for filtered

field. If several values are needed, just list them with comma.

key.

null../reports?token=<token>&filter[]=eq:country:RU,UA&filter[]=
is_not
ne:advertiser_id:27
having[]Filtering by value.no

Having value's format is <op>:<field>:<values>

Each separated value should be specified at new having[] key

op - comparison operation. Available options: lt (less than) / le (less or equal) / gt (greater than) / ge (greater or equal).

field - field name

values - CSV values for filtered key.

null../reports?token=<token>&having[]=ge:clicks:100&having[]=lt:imps:1000000
limit

Output rows

number cap

limit.

Max
noInteger max rows number
expected
10000

../reports?token=<token>&limit=2000

relations

Adds a node with relations info (e.g. for campaigns:

  • campaign id
  • campaign name
  • advertiser id)
nobinary value (0 or 1)0
../reports?token=<token>&relations=1


Meta Data

Returns Meta Data for report building.

Блок кода
languagebash
GET https://uireporting.getintent.com/api/v1/bigdata/reports/meta_datav2/metadata?token=<token>

Returns Meta Data for report building.

...

output example:

Блок кода
languagejs
titleExample
{
	"datasets": [
		{
			"name": "browser_traffic",
			"display_name": {
				"en": "Campaigns",
				"ru": "Кампании"
			},
			"bq_dataset_name": "browser_traffic",
			"key_fields": {
				"deal_id": "STRING",
				"geo_available": "STRING",
				"day": "TIMESTAMP",
				...
				"zip_code": "STRING"
			},
			"value_fields": {
				"imps": "INTEGER",
				"deliv_imps": "INTEGER",
				"unique_imps": "INTEGER",
				"clicks": "INTEGER",
				...
				"p_convs": "FLOAT"
			},
			"dates": [
				"2013_12_25",
				"2013_12_26",
				"2013_12_27",
				"2013_12_28",
				...
				"2015_07_11",
				"2015_07_12",
				"2015_07_13"
			],
			"sorting_key_default": {
				"day": "asc",
				"hour": "asc",
				"month": "asc"
			}
		},
 
		...
		
		{
			"name": "pixel_traffic",
			...
		}
	]
}

...