Skip to content

`POST /v1/orgs/{org}/compliance/exports`.

POST
/v1/orgs/{org}/compliance/exports
curl --request POST \
--url https://api.updawg.net/v1/orgs/example/compliance/exports \
--header 'Content-Type: application/json' \
--data '{ "group": "example", "kind": "hosts_csv", "since": "example", "until": "example" }'
org
required
string

Organization slug.

Media typeapplication/json
object
group

Only the hosts this group (grp_…) resolves to when the export is made.

string | null
kind
One of:

What an export contains.

string
Allowed values: hosts_csv resolutions_csv report_pdf
since

Start of the patch-latency period (RFC 3339), for resolutions_csv and report_pdf. Default: 90 days before until.

string | null
until

End of the period, exclusive. Default: now.

string | null

Queued. Poll it until status is ready, then GET its download. Audited as compliance.export_requested.

Media typeapplication/json
object
bytes
integer | null format: int64
created_at
required
string format: date-time
download

Where to GET the file, while it can be: the API path, relative to the API’s own address.

string | null
error

Why it failed.

string | null
expires_at
required

After this the file is no longer handed out.

string format: date-time
filename

What the download is called, once ready.

string | null
finished_at
string | null format: date-time
group
One of:

The group as it was named when the export was asked for. Absent for the whole organization.

object
id
required
string
name
required
string
id
required

exp_….

string
kind
required

What an export contains.

string
Allowed values: hosts_csv resolutions_csv report_pdf
requested_by

usr_…; absent once that person’s account is gone.

string | null
rows

Data rows, for a CSV.

integer | null format: int64
since
required
string format: date-time
status
required

Where an export is.

string
Allowed values: queued running ready failed
until
required
string format: date-time

Example

{
"kind": "hosts_csv",
"status": "queued"
}

No kind, or a period or group the report would refuse.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

No session.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Not permitted for this role, no CSRF token, or an API token: a person asks for an export. Or the plan does not include compliance reports (Business): plan-required.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

No such organization, or not yours.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Three exports are already being made for this organization: exports-busy.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

The organization’s data is in another region (wrong-region, DAWG-159). detail names that region’s API; send the request there.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Over the organization’s request limit. Retry-After says when to try again; RateLimit-Limit is the burst.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

This deployment has nowhere to put the files: exports-unavailable.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}