Get campaign log
Description
Retrieves campaign logs.
Request URL
Method: POST
https://example.com/api/v1.1/campaigns/log_v2
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format By default – json |
from_time | string | "2018-08-10T00:00:00.000Z" | No | Logs starting time |
id | int | 1 | Yes | Campaign ID |
limit | int | 2 | No | Log entries limit By default – 1000 |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"limit": 2
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>1</id>
<limit>2</limit>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"level": "INFO",
"message": "Campaign finished",
"time": "2024-04-02T17:57:01.504Z",
"state": "end",
"value": ""
},
{
"level": "INFO",
"message": "Total time spent",
"time": "2024-04-02T17:57:01.505Z",
"state": "",
"value": "138.351985ms"
}
],
"error": 0,
"error_text": "Successful operation",
"total_count": 140
}
<xml>
<data>
<level>"INFO"</level>
<message>"Campaign finished"</message>
<state>"end"</state>
<time>"2024-05-28T16:40:59.207Z"</time>
<value>""</value>
</data>
<data>
<level>"INFO"</level>
<message>"Total time spent"</message>
<state>""</state>
<time>"2024-05-28T16:40:59.208Z"</time>
<value>"351.155547ms"</value>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>9</total_count>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
level | string | Logging level |
message | string | Log entry |
state | string | Entry status |
time | date | Entry registration date |
value | string | Event associated value |
Logging levels:
DEBUG
INFO
WARNING
ERROR
Event entry status:
start
– campaign startend
– campaign finish