- Print
- DarkLight
- PDF
profiles/{Profile ID}/periods returns the time periods for a given report.
Method: GET
URI: /profiles/{Profile ID}/periods/
Note: Add any optional parameters to the end of the URI. If you change the order of URI or required parameters, or place optional parameters before them, the call will not work.
The version number you will use is dependant upon the version of Analytics you have installed. Analytics versions 9.5 and below, use v2_0. Analytics versions 9.5.1 and above will use v2_1.
Example Request
https://myDomain.com/{version}/ReportService/profiles/K729vc8Qqj5/periods/?format=xml
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<Periods>
<list name="Report">
<string>2023m12d08</string>
<string>2023m12d09</string>
<string>2023m12d10</string>
<string>2023w50</string>
<string>2023m12</string>
<string>2023q04</string>
<string>2023</string>
<string>2023m12d11</string>
<string>2023m12d12</string>
<string>2023m12d13</string>
<string>2023m12d14</string>
<string>2023w51</string>
...
<string>2024m03d21</string>
<string>2024m03d22</string>
<string>2024w12</string>
<string>2024m03</string>
<string>2024m03d23</string>
<string>2024m03d24</string>
<string>2024w13</string>
<string>2024m03d25</string>
<string>2024m03d26</string>
<string>2024m03d27</string>
<string>2024m03d28</string>
<string>2024m03d29</string>
</list>
<list name="Realtime">
<string>2024m01d12</string>
</list>
</Periods>
Parameters:
Format
format = return data format
Example: specifying data formats
Data format | Parameter and value |
---|---|
JSON | format=json |
XML | format=xml |
XML2 ("XPath-friendly" XML for dynamic applications) | format=xml2 |
For report data requests, all formats are supported. For "list" requests, only XML and JSON formats are supported.
Suppress error codes
Set the suppress_error_codes parameter to true if you do not want to be notified of error conditions for a request (the default is false).
suppress_error_codes = {true|false}
Example: Suppress errors for a request
suppress_error_codes=true