Creating a traffic report¶
Note
At least one attribute domains or vhosts must be defined in the body.
Sends a POST request to the endpoint /reports-v2.
Description¶
The Create-Traffic-Report request allows the user to create a new traffic report.
Requirements¶
Values of the request: none
Objects: CreateReportVO
Request¶
To create a traffic report, no additional information needs to be added to the path of the request.
For a detailed specification of which information is required to create a report, the object CreateReportVO with the following attributes needs to be defined in the body:
| Attribute | Description | Values |
|---|---|---|
fromDate |
The start date of the report period in ISO 8601 format. | string($date) |
toDate |
The end date of the report period in ISO 8601 format. | string($date) |
domains |
An array of domain names to be included in the traffic report. The system extends each domain with its subdomains during creation.NoteTo include a domain with all its virtual hosts, the attribute vhosts must be empty. |
array[string] |
vhosts |
An array of subdomain names to include in the traffic report.NoteTo include only specific virtual hosts, the attribute domains can be empty. |
array[string] |
language |
The language of the traffic report output. |
|
name |
The name of the traffic report. | string |
The following attributes are optional:
| Attribute | Description | Values |
|---|---|---|
comment |
A comment for the traffic report. | string |
The system responds by returning the new report object with the information about the created entry.
Example¶
Example request body:
{
"domains": [
"string"
],
"vhosts": [
"string"
],
"language": "string",
"fromDate": "string",
"toDate": "string",
"comment": "string",
"name": "string"
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The request has succeeded and a new object has been created. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |