Database APIs

Creating a Database Export Job

To export a database, create a database export job:

POST https://app.pixiebrix.com/api/databases/records/jobs/

The payload should contain an export job request:

{
  // A name/label for the export. Will be included export artifact name
  name: string,
  // One or more databases from which to export
  databases: UUID[],
  // Export type, defaults to "application/json"
  media_type?: "application/json" | "application/xlsx" | "text/csv",
  filters?: {
    // ISO8601 timestamp
    start_date?: Timestamp,
    end_date?: Timestamp,
  }
}

PixieBrix will respond with a job:

{"id":"6a3a88cc-797d-40c1-82ce-9fd15e0e3d02","status":"STARTED"}

Call the GET https://app.pixiebrix.com/api/databases/records/jobs/:id/ endpoint to fetch the job details.

Upon success, the job detail will include a data link to the exported data.

Last updated