Cloudflare.AccountLogpushJob (Cloudflare v0.5.0)

Copy Markdown View Source

Logpush jobs for an account

List fields

GET /accounts/{account_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.

Responses

200 List fields response.

Data is at body["result"]

{}
4XX List fields response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

List Logpush jobs for a dataset

GET /accounts/{account_id}/logpush/datasets/{dataset_id}/jobs

Lists Logpush jobs for an account for a dataset.

Responses

200 List Logpush jobs for a dataset response.

Data is at body["result"]

[
  {
    "dataset": "*string*",
    "destination_conf": "*string*",
    "enabled": "*boolean*",
    "error_message": "*string*",
    "frequency": "*string*",
    "id": "*integer*",
    "kind": "*string*",
    "last_complete": "*string*",
    "last_error": "*string*",
    "logpull_options": "*string*",
    "max_upload_bytes": "*integer*",
    "max_upload_interval_seconds": "*integer*",
    "max_upload_records": "*integer*",
    "name": "*string*",
    "output_options": {
      "CVE-2021-44228": "*boolean*",
      "batch_prefix": "*string*",
      "batch_suffix": "*string*",
      "field_delimiter": "*string*",
      "field_names": [
        null
      ],
      "output_type": "*string*",
      "record_delimiter": "*string*",
      "record_prefix": "*string*",
      "record_suffix": "*string*",
      "record_template": "*string*",
      "sample_rate": "*number*",
      "timestamp_format": "*string*"
    }
  }
]
4XX List Logpush jobs for a dataset response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Create Logpush job

POST /accounts/{account_id}/logpush/jobs

Creates a new Logpush job for an account.

Responses

200 Create Logpush job response.

Data is at body["result"]

{
  "dataset": "*string*",
  "destination_conf": "*string*",
  "enabled": "*boolean*",
  "error_message": "*string*",
  "frequency": "*string*",
  "id": "*integer*",
  "kind": "*string*",
  "last_complete": "*string*",
  "last_error": "*string*",
  "logpull_options": "*string*",
  "max_upload_bytes": "*integer*",
  "max_upload_interval_seconds": "*integer*",
  "max_upload_records": "*integer*",
  "name": "*string*",
  "output_options": {
    "CVE-2021-44228": "*boolean*",
    "batch_prefix": "*string*",
    "batch_suffix": "*string*",
    "field_delimiter": "*string*",
    "field_names": [
      "*string*"
    ],
    "output_type": "*string*",
    "record_delimiter": "*string*",
    "record_prefix": "*string*",
    "record_suffix": "*string*",
    "record_template": "*string*",
    "sample_rate": "*number*",
    "timestamp_format": "*string*"
  }
}
4XX Create Logpush job response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

List Logpush jobs

GET /accounts/{account_id}/logpush/jobs

Lists Logpush jobs for an account.

Responses

200 List Logpush jobs response.

Data is at body["result"]

[
  {
    "dataset": "*string*",
    "destination_conf": "*string*",
    "enabled": "*boolean*",
    "error_message": "*string*",
    "frequency": "*string*",
    "id": "*integer*",
    "kind": "*string*",
    "last_complete": "*string*",
    "last_error": "*string*",
    "logpull_options": "*string*",
    "max_upload_bytes": "*integer*",
    "max_upload_interval_seconds": "*integer*",
    "max_upload_records": "*integer*",
    "name": "*string*",
    "output_options": {
      "CVE-2021-44228": "*boolean*",
      "batch_prefix": "*string*",
      "batch_suffix": "*string*",
      "field_delimiter": "*string*",
      "field_names": [
        null
      ],
      "output_type": "*string*",
      "record_delimiter": "*string*",
      "record_prefix": "*string*",
      "record_suffix": "*string*",
      "record_template": "*string*",
      "sample_rate": "*number*",
      "timestamp_format": "*string*"
    }
  }
]
4XX List Logpush jobs response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Update Logpush job

PUT /accounts/{account_id}/logpush/jobs/{job_id}

Updates a Logpush job.

Responses

200 Update Logpush job response.

Data is at body["result"]

{
  "dataset": "*string*",
  "destination_conf": "*string*",
  "enabled": "*boolean*",
  "error_message": "*string*",
  "frequency": "*string*",
  "id": "*integer*",
  "kind": "*string*",
  "last_complete": "*string*",
  "last_error": "*string*",
  "logpull_options": "*string*",
  "max_upload_bytes": "*integer*",
  "max_upload_interval_seconds": "*integer*",
  "max_upload_records": "*integer*",
  "name": "*string*",
  "output_options": {
    "CVE-2021-44228": "*boolean*",
    "batch_prefix": "*string*",
    "batch_suffix": "*string*",
    "field_delimiter": "*string*",
    "field_names": [
      "*string*"
    ],
    "output_type": "*string*",
    "record_delimiter": "*string*",
    "record_prefix": "*string*",
    "record_suffix": "*string*",
    "record_template": "*string*",
    "sample_rate": "*number*",
    "timestamp_format": "*string*"
  }
}
4XX Update Logpush job response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Get Logpush job details

GET /accounts/{account_id}/logpush/jobs/{job_id}

Gets the details of a Logpush job.

Responses

200 Get Logpush job details response.

Data is at body["result"]

{
  "dataset": "*string*",
  "destination_conf": "*string*",
  "enabled": "*boolean*",
  "error_message": "*string*",
  "frequency": "*string*",
  "id": "*integer*",
  "kind": "*string*",
  "last_complete": "*string*",
  "last_error": "*string*",
  "logpull_options": "*string*",
  "max_upload_bytes": "*integer*",
  "max_upload_interval_seconds": "*integer*",
  "max_upload_records": "*integer*",
  "name": "*string*",
  "output_options": {
    "CVE-2021-44228": "*boolean*",
    "batch_prefix": "*string*",
    "batch_suffix": "*string*",
    "field_delimiter": "*string*",
    "field_names": [
      "*string*"
    ],
    "output_type": "*string*",
    "record_delimiter": "*string*",
    "record_prefix": "*string*",
    "record_suffix": "*string*",
    "record_template": "*string*",
    "sample_rate": "*number*",
    "timestamp_format": "*string*"
  }
}
4XX Get Logpush job details response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Delete Logpush job

DELETE /accounts/{account_id}/logpush/jobs/{job_id}

Deletes a Logpush job.

Responses

200 Delete Logpush job response.

Data is at body["result"]

{
  "id": "*integer*"
}
4XX Delete Logpush job response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Get ownership challenge

POST /accounts/{account_id}/logpush/ownership

Gets a new ownership challenge sent to your destination.

Responses

200 Get ownership challenge response.

Data is at body["result"]

{
  "filename": "*string*",
  "message": "*string*",
  "valid": "*boolean*"
}
4XX Get ownership challenge response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Validate ownership challenge

POST /accounts/{account_id}/logpush/ownership/validate

Validates ownership challenge of the destination.

Responses

200 Validate ownership challenge response.

Data is at body["result"]

{
  "valid": "*boolean*"
}
4XX Validate ownership challenge response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Validate destination

POST /accounts/{account_id}/logpush/validate/destination

Validates destination.

Responses

200 Validate destination response.

Data is at body["result"]

{
  "message": "*string*",
  "valid": "*boolean*"
}
4XX Validate destination response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Check destination exists

POST /accounts/{account_id}/logpush/validate/destination/exists

Checks if there is an existing job with a destination.

Responses

200 Check destination exists response.

Data is at body["result"]

{
  "exists": "*boolean*"
}
4XX Check destination exists response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Validate origin

POST /accounts/{account_id}/logpush/validate/origin

Validates logpull origin with logpull_options.

Responses

200 Validate origin response.

Data is at body["result"]

{
  "message": "*string*",
  "valid": "*boolean*"
}
4XX Validate origin response failure.
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Summary

Functions

client(opts \\ [])

create(body, opts \\ [])

@spec create(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  {:ok, map()} | {:error, term()}

create!(body, opts \\ [])

@spec create!(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  map() | no_return()

delete(id, opts \\ [])

@spec delete(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

delete!(id, opts \\ [])

@spec delete!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

index(opts \\ [])

@spec index(opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

index!(opts \\ [])

@spec index!(opts :: Restlax.Resource.action_options()) :: map() | no_return()

ownership_challenge(body, opts \\ [])

Gets an ownership challenge for a Logpush destination.

path_for(id, opts \\ [])

@spec path_for(term(), [{:action, String.t()}]) :: String.t()

show(id, opts \\ [])

@spec show(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

show!(id, opts \\ [])

@spec show!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

update(id, body, opts \\ [])

@spec update(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: {:ok, map()} | {:error, term()}

update!(id, body, opts \\ [])

@spec update!(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: map() | no_return()

validate_ownership(body, opts \\ [])

Validates an ownership challenge for a Logpush destination.