Get Logpush job details
logpush.jobs.get(intjob_id, JobGetParams**kwargs) -> LogpushJob
GET/{accounts_or_zones}/{account_or_zone_id}/logpush/jobs/{job_id}
Gets the details of a Logpush job.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Get Logpush job details
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
logpush_job = client.logpush.jobs.get(
job_id=1,
account_id="account_id",
)
print(logpush_job.id){
"errors": [],
"messages": [],
"result": {
"dataset": "gateway_dns",
"destination_conf": "s3://mybucket/logs?region=us-west-2",
"enabled": false,
"error_message": null,
"filter": "{\"where\":{\"and\":[{\"key\":\"ClientRequestPath\",\"operator\":\"contains\",\"value\":\"/static\"},{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}]}}",
"id": 1,
"kind": "",
"last_complete": null,
"last_error": null,
"max_upload_bytes": 5000000,
"max_upload_interval_seconds": 30,
"max_upload_records": 1000,
"name": "example.com",
"output_options": {
"CVE-2021-44228": false,
"batch_prefix": "",
"batch_suffix": "",
"field_delimiter": ",",
"field_names": [
"Datetime",
"DstIP",
"SrcIP"
],
"output_type": "ndjson",
"record_delimiter": "",
"record_prefix": "{",
"record_suffix": "}\n",
"sample_rate": 1,
"timestamp_format": "unixnano"
}
},
"success": true
}Returns Examples
{
"errors": [],
"messages": [],
"result": {
"dataset": "gateway_dns",
"destination_conf": "s3://mybucket/logs?region=us-west-2",
"enabled": false,
"error_message": null,
"filter": "{\"where\":{\"and\":[{\"key\":\"ClientRequestPath\",\"operator\":\"contains\",\"value\":\"/static\"},{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}]}}",
"id": 1,
"kind": "",
"last_complete": null,
"last_error": null,
"max_upload_bytes": 5000000,
"max_upload_interval_seconds": 30,
"max_upload_records": 1000,
"name": "example.com",
"output_options": {
"CVE-2021-44228": false,
"batch_prefix": "",
"batch_suffix": "",
"field_delimiter": ",",
"field_names": [
"Datetime",
"DstIP",
"SrcIP"
],
"output_type": "ndjson",
"record_delimiter": "",
"record_prefix": "{",
"record_suffix": "}\n",
"sample_rate": 1,
"timestamp_format": "unixnano"
}
},
"success": true
}