Skip to content
Start here

Get a single export job

client.zeroTrust.casb.posture.exports.get(stringid, ExportGetParams { account_id } params, RequestOptionsoptions?): ExportGetResponse { id, status, type, 5 more }
GET/accounts/{account_id}/data-security/posture/exports/{id}

Retrieves a single export job by its unique identifier

Security

API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Zero Trust ReadZero Trust Write
ParametersExpand Collapse
id: string
params: ExportGetParams { account_id }
account_id: string

Cloudflare account ID for the user making the request.

ReturnsExpand Collapse
ExportGetResponse { id, status, type, 5 more }

Information about an export job.

id: string

Unique identifier for the export job.

formatuuid
status: "Pending" | "Success" | "Failure" | 2 more

Status of an export job.

One of the following:
"Pending"
"Success"
"Failure"
"Rescheduled"
"In-Progress"
type: "finding" | "findingInstance" | "content" | "remediationJob"

Type of export job.

One of the following:
"finding"
"findingInstance"
"content"
"remediationJob"
user_id: string

ID of the export-requesting user.

maxLength128
download_url?: string | null

The URL by which the successfully created export can be downloaded by the end users.

formaturi
maxLength1024
errors?: string | null

Contains information on errors which may have occurred during export creation.

file_name?: string | null

The base name of the file that is/was generated by the export job.

maxLength256
file_path?: string | null

The full path of the file that is stored within external storage (currently R2).

maxLength512

Get a single export job

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const _export = await client.zeroTrust.casb.posture.exports.get('id', {
  account_id: '46148281d8a93d002ef242d8b0d5f9f6',
});

console.log(_export.id);
{
  "errors": [
    {
      "code": 1000,
      "message": "Request processed successfully",
      "documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
      "source": {
        "pointer": "/data/attributes/name"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "Request processed successfully",
      "documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
      "source": {
        "pointer": "/data/attributes/name"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "45ce02c2-e797-4a71-98cb-937244352fd4",
    "status": "Success",
    "type": "finding",
    "user_id": "e7712d506b1ee4c5ede0802815f55a75",
    "download_url": "https://example.com/45ce02c2-e797-4a71-98cb-937244352fd4",
    "errors": null,
    "file_name": "findings_export_2024-02-27.csv",
    "file_path": "/exports/finding-instances/2024/02/27/Finding_Instances_2024-02-27T04:05:26Z.csv"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "Request processed successfully",
      "documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
      "source": {
        "pointer": "/data/attributes/name"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "Request processed successfully",
      "documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
      "source": {
        "pointer": "/data/attributes/name"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "45ce02c2-e797-4a71-98cb-937244352fd4",
    "status": "Success",
    "type": "finding",
    "user_id": "e7712d506b1ee4c5ede0802815f55a75",
    "download_url": "https://example.com/45ce02c2-e797-4a71-98cb-937244352fd4",
    "errors": null,
    "file_name": "findings_export_2024-02-27.csv",
    "file_path": "/exports/finding-instances/2024/02/27/Finding_Instances_2024-02-27T04:05:26Z.csv"
  }
}