Logs uploader
Create policy
Create logs uploader policy.
post/cdn/logs_uploader/policies
Request body
Example request
{
"include_empty_logs": true,
"include_shield_logs": true,
"name": "Policy",
"description": "New policy",
"retry_interval_minutes": 32,
"rotate_interval_minutes": 32,
"rotate_threshold_mb": 252,
"rotate_threshold_lines": 5000,
"date_format": "[02/Jan/2006:15:04:05 -0700]",
"field_delimiter": ",",
"field_separator": ";",
"fields": [
"remote_addr",
"status"
],
"file_name_template": "{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz",
"format_type": "json",
"tags": {},
"log_sample_rate": 1,
"related_uploader_configs": [
123
]
}Response
Successful.
Example response
{
"id": 123,
"client_id": 123,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"include_empty_logs": true,
"include_shield_logs": true,
"name": "Policy",
"description": "New policy",
"retry_interval_minutes": 32,
"rotate_interval_minutes": 32,
"rotate_threshold_mb": 252,
"rotate_threshold_lines": 5000,
"date_format": "[02/Jan/2006:15:04:05 -0700]",
"field_delimiter": ",",
"field_separator": ";",
"fields": [
"remote_addr",
"status"
],
"file_name_template": "{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz",
"format_type": "json",
"tags": {},
"log_sample_rate": 1,
"related_uploader_configs": [
123
]
}