Overview
IAM
- Account
- Users
- API Tokens
CDN
- IP addresses list
- CDN service
- Origins
- CDN resources
- CDN activity logs
- Log forwarding
- Log viewer
- Logs uploader
- GETGet policies list
- POSTCreate policy
- GETGet policy details
- PUTChange policy
- DELDelete policy
- PATCHChange policy
- GETGet policy fields
- GETGet targets list
- POSTCreate target
- GETGet target details
- PUTChange target
- DELDelete target
- PATCHChange target
- POSTValidate target
- GETGet configs list
- POSTCreate config
- GETGet config details
- PUTChange config
- DELDelete config
- PATCHChange config
- POSTValidate config
- GETGet AWS regions list
- GETGet Alibaba regions list
- GET
- Tools
- Rules
- Rule templates
- Purge history
- SSL certificates
- CA certificates
- CDN Statistics
- Advanced analytics
- Origin shielding
- Let's Encrypt certificates
Managed DNS
- Analyze
- Locations
- Lookup
- Metrics
- Pickers
- DNS Clients
- Zones
- DNSSEC
- RRsets
Cloud
- Bare Metal
- Container as a Service
- Cost Reports
- DDOS Protection
- File Shares
- Firewalls
- Floating IPs
- Function as a Service
- GPU Cloud
- IP Ranges
- Images
- Inference Instances
- Instances
- Load Balancers
- Logging
- Managed Kubernetes
- Managed PostgreSQL
- Networks
- Placement Groups
- Projects
- Quotas
- Regions
- Registry
- Reservations
- Reserved IPs
- Routers
- SSH Keys
- Secrets
- Service Endpoints
- Snapshot Schedules
- Snapshots
- Tasks
- User Actions
- User Role Assignments
- Volumes
Security
- Event Logs
- BGP announces
- Security Templates
- Profiles
FastEdge
- Apps
- Binaries
- FastEdge Clients
- FastEdge Secrets
- Stats
- FastEdge Templates
WAAP
- WAAP Service
- Domains
- Policies
- Analytics
- Custom Page Sets
- Custom Rules
- Firewall Rules
- Advanced Rules
- Tags
- Network Organizations
- API Discovery
- IP Spotlight
- Security Insights
Web Security
- Billing Statistics
- Resources
Video Streaming
- Streams
- Overlays
- Broadcasts
- Restreams
- Videos
- Subtitles
- Directories
- Playlists
- QualitySets
- Players
- AI
- Streaming Statistics
Object Storage
- Notifications
- Key
- Location
- Storage
- Storage Statistics
Logs uploader
Create policy
Create logs uploader policy.
POST
/
cdn
/
logs_uploader
/
policies
Copy
Ask AI
curl --request POST \
--url https://api.gcore.com/cdn/logs_uploader/policies \
--header 'APIKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"include_empty_logs": false,
"include_shield_logs": false,
"name": "Policy",
"description": "<string>",
"retry_interval_minutes": 60,
"rotate_interval_minutes": 5,
"rotate_threshold_mb": null,
"rotate_threshold_lines": 0,
"date_format": "<string>",
"field_delimiter": "\"",
"field_separator": " ",
"fields": [
"remote_addr",
"-",
"remote_user",
"time_local",
"request",
"status",
"body_bytes_sent",
"http_referer",
"http_user_agent",
"bytes_sent",
"hostname",
"scheme",
"host",
"request_time",
"upstream_response_time",
"request_length",
"http_range",
"dc",
"upstream_cache_status",
"upstream_response_length",
"upstream_addr",
"gcdn_api_client_id",
"gcdn_api_resource_id",
"uid_got",
"uid_set",
"geoip2_country_code",
"geoip2_city",
"shield_type",
"real_server_addr",
"server_port",
"upstream_status",
"-",
"upstream_connect_time",
"upstream_header_time",
"shard_addr",
"geoip2_data_asnumber",
"connection",
"connection_requests",
"http_traceparent",
"http_x_forwarded_proto",
"gcdn_internal_status_code",
"ssl_cipher",
"ssl_session_id",
"ssl_session_reused",
"sent_http_content_type",
"real_tcpinfo_rtt",
"server_country_code",
"gcdn_tcpinfo_snd_cwnd",
"gcdn_tcpinfo_total_retrans",
"gcdn_rule_id"
],
"file_name_template": "{{YYYY}}/{{MM}}/{{DD}}/{{HH}}/{{mm}}/{{ss}}/{{HOST}}_{{CNAME}}_access.log.gz",
"format_type": "<string>",
"tags": {}
}'
Copy
Ask AI
{
"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": "<string>",
"description": "<string>",
"retry_interval_minutes": 32,
"rotate_interval_minutes": 32,
"rotate_threshold_mb": 252,
"rotate_threshold_lines": 5000,
"date_format": "<string>",
"field_delimiter": "<string>",
"field_separator": "<string>",
"fields": [
"<string>"
],
"file_name_template": "<string>",
"format_type": "<string>",
"tags": {},
"related_uploader_configs": [
123
]
}
Authorizations
API key for authentication.
Body
application/json
Response
201
application/json
Successful.
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.gcore.com/cdn/logs_uploader/policies \
--header 'APIKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"include_empty_logs": false,
"include_shield_logs": false,
"name": "Policy",
"description": "<string>",
"retry_interval_minutes": 60,
"rotate_interval_minutes": 5,
"rotate_threshold_mb": null,
"rotate_threshold_lines": 0,
"date_format": "<string>",
"field_delimiter": "\"",
"field_separator": " ",
"fields": [
"remote_addr",
"-",
"remote_user",
"time_local",
"request",
"status",
"body_bytes_sent",
"http_referer",
"http_user_agent",
"bytes_sent",
"hostname",
"scheme",
"host",
"request_time",
"upstream_response_time",
"request_length",
"http_range",
"dc",
"upstream_cache_status",
"upstream_response_length",
"upstream_addr",
"gcdn_api_client_id",
"gcdn_api_resource_id",
"uid_got",
"uid_set",
"geoip2_country_code",
"geoip2_city",
"shield_type",
"real_server_addr",
"server_port",
"upstream_status",
"-",
"upstream_connect_time",
"upstream_header_time",
"shard_addr",
"geoip2_data_asnumber",
"connection",
"connection_requests",
"http_traceparent",
"http_x_forwarded_proto",
"gcdn_internal_status_code",
"ssl_cipher",
"ssl_session_id",
"ssl_session_reused",
"sent_http_content_type",
"real_tcpinfo_rtt",
"server_country_code",
"gcdn_tcpinfo_snd_cwnd",
"gcdn_tcpinfo_total_retrans",
"gcdn_rule_id"
],
"file_name_template": "{{YYYY}}/{{MM}}/{{DD}}/{{HH}}/{{mm}}/{{ss}}/{{HOST}}_{{CNAME}}_access.log.gz",
"format_type": "<string>",
"tags": {}
}'
Copy
Ask AI
{
"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": "<string>",
"description": "<string>",
"retry_interval_minutes": 32,
"rotate_interval_minutes": 32,
"rotate_threshold_mb": 252,
"rotate_threshold_lines": 5000,
"date_format": "<string>",
"field_delimiter": "<string>",
"field_separator": "<string>",
"fields": [
"<string>"
],
"file_name_template": "<string>",
"format_type": "<string>",
"tags": {},
"related_uploader_configs": [
123
]
}
Assistant
Responses are generated using AI and may contain mistakes.