Access
Preview

The organization's newest archive

An organization that has never built an archive has no newest one; that is not an error, so it answers 204.

GET
/organization/exports/latest
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

Response Body

The newest archive, whatever its state.

application/json
  1. response
id*string
Formatuuid
status*OrganizationExportStatus

building, ready or failed, and expired once the seven days an archive is kept are over (it then has no data to download).

Value in"building""ready""failed""expired"
createdAt*string
Formatdate-time
requestedBy*string

The id of the person who asked for the archive.

builtAt?string

When the build ended, finished or failed. Absent while it builds.

Formatdate-time
sizeBytes?integer

The size of the zip. Absent until the archive is ready.

Formatint64
counts*
error?string

Why a build failed. Absent otherwise.

Example Request
curl -X GET 'https://wardn.example.com/api/v1/organization/exports/latest'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "building",  "createdAt": "2019-08-24T14:15:22Z",  "requestedBy": "string",  "builtAt": "2019-08-24T14:15:22Z",  "sizeBytes": 0,  "counts": {    "snapshots": 0,    "auditEntries": 0,    "settingsGroups": 0  },  "error": "string"}