Creating a traffic report subscription¶
Note
At least one attribute domains or vhosts must be defined in the body.
Sends a POST request to the endpoint /report-subscriptions.
Description¶
The Create-Subscription request allows the user to create a new report subscription.
Requirements¶
Values of the request: none
Objects: CreateSubscriptionVO
Request¶
To create a report subscription, 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 traffic report subscription, the object CreateSubscriptionVO with the following attributes needs to be defined in the body:
| Attributes | Description | Values |
|---|---|---|
name |
The name of the subscription. | string |
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 reports generated by this subscription. | string |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
active |
Defines whether the subscription is active. Default: true. |
|
comments |
A comment for the subscription. | string |
The system responds by returning the new subscription object with the information about the created entry.
Example¶
Example request body:
{
"name": "string",
"domains": [
"string"
],
"vhosts": [
"string"
],
"language": "string",
"active": true,
"comments": "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. |