Logs uploader
Create policy
Changed onCreate logs uploader policy.
post/cdn/logs_uploader/policies
Request
- Base URLhttps://api.gcore.com
- URLhttps://api.gcore.com/cdn/logs_uploader/policies
- AuthHTTP apikey
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",
"request_time",
"upstream_cache_status"
],
"file_name_template": "{{YYYY}}_{{MM}}_{{DD}}_{{HH}}_{{mm}}_{{ss}}_access.log.gz",
"format_type": "json",
"tags": {},
"field_remap": {},
"field_conversions": {
"request_time": {
"conversions": [
{
"type": "scale",
"config": {
"factor": 1000,
"precision": 0,
"rounding": "nearest"
}
}
]
},
"upstream_cache_status": {
"conversions": [
{
"type": "replace",
"config": {
"values": {
"HIT": "cached",
"MISS": "uncached"
},
"default": "other"
}
}
]
}
},
"log_sample_rate": 1
}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": {},
"field_remap": {},
"field_conversions": {},
"log_sample_rate": 1,
"related_uploader_configs": [
123
]
}Changes
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info