Raw LogsUpdate Raw Logs Configuration

Update Raw Logs Configuration

Updates raw logs configuration. Accepts two distinct payload variants on the same endpoint:

Variant A — Resource assignment (application/json): Replaces the resource list for a specific delivery type (api, s3, or syslog). Returns the full updated RawLogsApiResponse envelope including the refreshed data object.

Variant B — Syslog endpoint create/update (application/x-www-form-urlencoded): Creates a new syslog endpoint (omit syslogid) or updates an existing one (include syslogid). Returns a minimal success envelope; the client reloads the full config afterwards via GET /account/logs.

Anonymization constraint: a resource may have anonymization (v4 or v6 ≠ '0') active on at most one syslog endpoint at a time. The server returns a validation error if conflicting anonymization is attempted.

curl -X POST "https://api.5centscdn.com/v2/account/logs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "resources": [
    "12345",
    "67890"
  ],
  "type": "api"
}'
{
  "result": "success",
  "data": {
    "id": 10001,
    "hashid": "abc123def456",
    "resources_api": [
      "12345",
      "67890"
    ],
    "resources_s3": [
      "12345"
    ],
    "resources_syslog": {
      "0": {
        "id": "42",
        "hostname": "syslog.example.com",
        "port": "514",
        "protocol": "udp",
        "format": "json",
        "anonymize": {
          "v4": "0",
          "v6": "0"
        },
        "resources": [
          "12345"
        ]
      }
    },
    "counts": {
      "s3": 1,
      "api": 2,
      "syslog": 1,
      "bySyslog": {
        "42": 1
      }
    },
    "resources_syslog_curr": [
      "12345"
    ],
    "limit": 10,
    "available": 9
  }
}
POST
/account/logs
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json, application/x-www-form-urlencoded
resourcesarray
Required

Complete replacement list of resource IDs. Overwrites all previously assigned resources for the given delivery type.

typestring
Required

Log delivery type to update.

Options: api, s3, syslog
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

resourcesarray
Required

Complete replacement list of resource IDs. Overwrites all previously assigned resources for the given delivery type.

Example:
["12345","67890"]
typestring
Required

Log delivery type to update.

Allowed values:apis3syslog

Responses

resultstring

Operation outcome.

Allowed values:successfailure
dataobject

Complete raw logs configuration for a service account. Returned by GET and embedded in successful POST responses.

messagestring

Human-readable error description. Present only when result is not 'success'.