Exports

Create an export job

Create an export job containing the information required to generate an export. The export job will be queued and subsequently processed by Comply. If the export job finishes successfully, a new export will be available to download.

To use this endpoint, you must have one of the following roles: comply-admin comply-operator

post/v1/export-job

Request

Request body

descriptionstring

A description of the export to be generated.

namestring

The name of the export to be generated. If no name is supplied, one will be automatically generated.

type'compliance_status_detailed' | 'compliance_status_summary' required

The type of export to be generated. compliance_status_detailed includes the status of each rule for each node, whereas compliance_status_summary includes just the compliance scores for each node.

Example request

{
  "description": "Compliance summary for production Red Hat nodes.",
  "name": "compliance_summary_production_redhat",
  "node_filters": {
    "environments": [
      "production"
    ],
    "name": [
      "my-node-789.prod.example.com"
    ],
    "node_groups": [
      "auditable nodes"
    ],
    "operating_systems": [
      "redhat 7",
      "redhat 8"
    ]
  },
  "type": "compliance_status_summary"
}

Response

CreateExportJobResponse represents the response to a create export job request.

created_atstring date-time required

The time at which the export job was created.

descriptionstring required

A description of the export to be generated.

export_file_locationstring nullable

The location of the generated export file for download, if the export job has finished successfully.

idinteger required

The ID of the export job.

namestring required

The name of the export to be generated.

status'queued' | 'processing' | 'successful' | 'failed' required

The status of the export job.

type'compliance_status_detailed' | 'compliance_status_summary' required

The type of export to be generated.

Example response

{
  "created_at": "2023-09-25T13:57:16.743Z",
  "description": "Compliance summary for production Red Hat nodes.",
  "export_file_location": "/api/public/v1/export/456/file",
  "id": 123,
  "name": "compliance_summary_production_redhat",
  "node_filters": {
    "environments": [
      "production"
    ],
    "name": [
      "my-node-789.prod.example.com"
    ],
    "node_groups": [
      "auditable nodes"
    ],
    "operating_systems": [
      "redhat 7",
      "redhat 8"
    ]
  },
  "status": "successful",
  "type": "compliance_status_summary"
}

Changes

No recorded changes to this operation across all 1 revision of this API.