This repository was archived by the owner on May 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Make your first API call
Benjamin Diolez edited this page May 5, 2026
·
1 revision
You can find in this table the explanation of the main parameters. If you want more information, you can find them in the corresponding articles in the documentation in the category Parameters.
| PARAMETER | REQUIRED | DESCRIPTION |
|---|---|---|
| space | true | Analysis scope (single site or multi-sites). |
| columns | true | List of properties & metrics to query (separated by a comma). |
| period | true | Analysis period (single, multiple, relative). |
| filter | false | Filters to be applied on properties/metrics. |
| evo | false | To obtain the evolution of a group of metrics over a certain time period. |
| sort | true | List of properties / metrics according to which the results will be sorted. |
| max-results | true | Number of results in the results page. |
| page-num | true | Page number of the data set. |
| options | false | Additionnal parameters ignored_null_properties : Possible value “true” to configure if a line with all properties values to null should not appear in the result eco_mode : Possible value “true” to activate the eco mode |
| PARAMETER | SYNTAX |
|---|---|
| space | “space”: { “s”:[547656] } |
| columns | “columns”: [ “visit_device_type”, “m_visits” ] |
| period | “period”: { “p1”: [ { “type”: “D”, “start”: “2019-10-20”, “end”: “2019-10-24” } ] } |
| filter | “filter”: { “metric”: { “m_visits”: { “$eq”: 19 } }, } |
| evo | “evo”: { “granularity”: “D”, “top”: { “max-results”: 5, “page-num”: 1, “sort”: [“-m_visits”] } } |
| sort-by | “sort”: [ “m_visits” ] |
| max-results | “max-results”: 50 |
| page-num | “page-num”: 1 |
| options | “options”: {“ignore_null_properties”: true, “eco_mode”: true} |
You can find below few complete examples to see how it could work.
var data = JSON.stringify({
"columns": [
"device_type",
"m_visits",
"m_users"
],
"sort": [
"-m_visits"
],
"space": {
"s": [429023]
},
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-24",
"end": "2019-10-24"
}
]
},
"max-results": 50,
"page-num": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.atinternet.io/v3/data/getData");
xhr.setRequestHeader("x-api-key", "YOURAPIKEY");
xhr.send(data);curl -X POST \
https://api.atinternet.io/v3/data/getData \
-H 'x-api-key: YOURAPIKEY' \
-H 'Content-Type: application/json' \
-d '{
"columns": [
"device_type",
"m_visits",
"m_users"
],
"sort": [
"-m_visits"
],
"space": {
"s": [429023]
},
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-24",
"end": "2019-10-24"
}
]
},
"max-results": 50,
"page-num": 1
}'import http.client
conn = http.client.HTTPSConnection("api.atinternet.io")
payload = '''{
"columns": [
"device_type",
"m_visits",
"m_users"
],
"sort": [
"-m_visits"
],
"space": {
"s": [547656]
},
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-24",
"end": "2019-10-24"
}
]
},
"max-results": 50,
"page-num": 1
}
'''
headers = {
'x-api-key': "YOURAPIKEY",
'Content-type': "application/json"
}
conn.request("POST", "/v3/data/getData", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))request["x-api-key"] = 'YOURAPIKEY'
request.body = "{\n \"columns\": [\n \"device_type\",\n \"m_visits\",\n \"m_users\"\n ],\n \"sort\": [\n \"-m_visits\"\n ],\n\"space\": {\n \"s\": [\n 429023\n ]\n },\n \"period\": {\n \"p1\": [\n {\n \"type\": \"D\",\n \"start\": \"2019-10-24\",\n \"end\": \"2019-10-24\"\n }\n ]\n },\n \"max-results\": 50,\n \"page-num\": 1\n}"
response = http.request(request)
puts response.read_body-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android