Logpush

Logpush

Logpush

Datasets

Logpush.Datasets

Logpush.Datasets.Fields

Methods

get(, , ):
get/{accounts_or_zones}/{account_or_zone_id}/logpush/datasets/{dataset_id}/fields

Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.

Logpush.Datasets.Jobs

Methods

get(, , ): < | null>
get/{accounts_or_zones}/{account_or_zone_id}/logpush/datasets/{dataset_id}/jobs

Lists Logpush jobs for an account or zone for a dataset.

Logpush.Edge

Methods

get(, ): < | null>
get/zones/{zone_id}/logpush/edge/jobs

Lists Instant Logs jobs for a zone.

create(, ): | null
post/zones/{zone_id}/logpush/edge/jobs

Creates a new Instant Logs job for a zone.

Domain types

InstantLogpushJob{…}

Logpush.Jobs

Methods

list(, ): < | null>
get/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs

Lists Logpush jobs for an account or zone.

get(, , ): | null
get/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs/{job_id}

Gets the details of a Logpush job.

create(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs

Creates a new Logpush job for an account or zone.

update(, , ): | null
put/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs/{job_id}

Updates a Logpush job.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Logs Write

Parameters
jobId: number
(minimum: 1)

Unique id of the job.

account_id?: string

Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: string

Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

destination_conf?: string
(format: uri, maxLength: 4096)

Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.

enabled?: boolean

Body param: Flag that indicates if the job is enabled.

filter?: string | null

Body param: The filters to select the events to include and/or remove from your logs. For more information, refer to Filters.

frequency?: "high" | "low" | null
Deprecated

Body param: This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

kind?: "" | "edge"

Body param: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

logpull_options?: string | null
(format: uri-reference, maxLength: 4096)
Deprecated

Body param: This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes?: 0 | number | null

Body param: The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds?: 0 | number | null

Body param: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records?: 0 | number | null

Body param: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name?: string | null
(maxLength: 512)

Body param: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

output_options?: | null

Body param: The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

ownership_challenge?: string
(maxLength: 4096)

Body param: Ownership challenge token to prove destination ownership.

Returns
| null
id?: number
(minimum: 1)

Unique id of the job.

dataset?: "access_requests" | "audit_logs" | "audit_logs_v2" | 27 more... | null
(default: "http_requests")

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

destination_conf?: string
(format: uri, maxLength: 4096)

Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.

enabled?: boolean

Flag that indicates if the job is enabled.

error_message?: string | null

If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.

frequency?: "high" | "low" | null
(default: "high")
Deprecated

This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

kind?: "" | "edge"

The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

last_complete?: string | null
(format: date-time)

Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty.

last_error?: string | null
(format: date-time)

Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field.

logpull_options?: string | null
(format: uri-reference, maxLength: 4096)
Deprecated

This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes?: 0 | number | null

The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds?: 0 | number | null

The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records?: 0 | number | null

The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name?: string | null
(maxLength: 512)

Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

output_options?: | null

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

Request example
200default
delete(, , ):
delete/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs/{job_id}

Deletes a Logpush job.

Domain types

LogpushJob{…}
OutputOptions{…}

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

Logpush

Ownership

Logpush.Ownership

Methods

create(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/ownership

Gets a new ownership challenge sent to your destination.

validate(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/ownership/validate

Validates ownership challenge of the destination.

Domain types

OwnershipValidation{…}
Logpush

Validate

Logpush.Validate

Methods

destination(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/validate/destination

Validates destination.

destinationExists(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/validate/destination/exists

Checks if there is an existing job with a destination.

origin(, ): | null
post/{accounts_or_zones}/{account_or_zone_id}/logpush/validate/origin

Validates logpull origin with logpull_options.