List Logpush jobs for a dataset
client.logpush.datasets.jobs.get("access_requests" | "account_abuse_protection_events" | "audit_logs" | 34 moredatasetID, JobGetParams { account_id, zone_id } params?, RequestOptionsoptions?): SinglePage<LogpushJob { id, dataset, destination_conf, 13 more } | 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.
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)
List Logpush jobs for a dataset
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const logpushJob of client.logpush.datasets.jobs.get('gateway_dns', {
account_id: 'account_id',
})) {
console.log(logpushJob.id);
}{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": 1,
"dataset": "http_requests",
"destination_conf": "s3://mybucket/logs?region=us-west-2",
"enabled": false,
"error_message": "error_message",
"filter_attack_traffic": true,
"frequency": "high",
"kind": "",
"last_complete": "2019-12-27T18:11:19.117Z",
"last_error": "2019-12-27T18:11:19.117Z",
"logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
"max_upload_bytes": 5000000,
"max_upload_interval_seconds": 30,
"max_upload_records": 1000,
"name": "example.com",
"output_options": {
"batch_prefix": "batch_prefix",
"batch_suffix": "batch_suffix",
"CVE-2021-44228": true,
"field_delimiter": "field_delimiter",
"field_names": [
"ClientIP",
"EdgeStartTimestamp",
"RayID"
],
"merge_subrequests": true,
"output_type": "ndjson",
"record_delimiter": "record_delimiter",
"record_prefix": "record_prefix",
"record_suffix": "record_suffix",
"record_template": "record_template",
"sample_rate": 1,
"timestamp_format": "unixnano"
}
}
]
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": 1,
"dataset": "http_requests",
"destination_conf": "s3://mybucket/logs?region=us-west-2",
"enabled": false,
"error_message": "error_message",
"filter_attack_traffic": true,
"frequency": "high",
"kind": "",
"last_complete": "2019-12-27T18:11:19.117Z",
"last_error": "2019-12-27T18:11:19.117Z",
"logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339",
"max_upload_bytes": 5000000,
"max_upload_interval_seconds": 30,
"max_upload_records": 1000,
"name": "example.com",
"output_options": {
"batch_prefix": "batch_prefix",
"batch_suffix": "batch_suffix",
"CVE-2021-44228": true,
"field_delimiter": "field_delimiter",
"field_names": [
"ClientIP",
"EdgeStartTimestamp",
"RayID"
],
"merge_subrequests": true,
"output_type": "ndjson",
"record_delimiter": "record_delimiter",
"record_prefix": "record_prefix",
"record_suffix": "record_suffix",
"record_template": "record_template",
"sample_rate": 1,
"timestamp_format": "unixnano"
}
}
]
}