Record Operations API

Prev Next

Record Collections exposes 13 API functions for reading and managing records and bulk jobs. These functions power the Record Collections UI and serve as a reference for the underlying platform API endpoints.

The functions are grouped into four areas: Collections, Records, Bulk Operations, and Client-Only.

Collections

These functions retrieve information about collections in a workspace.

Function

Method

Endpoint

Description

getCollections

/workspaces/:workspaceId/:resourceType/submissions

List all collections for a workspace. Filter by type: module, model, or workflow. Supports limit and offset for pagination.

getCollectionStats

GET

/modules/submissions/stats
/workflows/submissions/stats
/datamodels/records/stats

Retrieve record counts and active job indicators for a set of collection IDs. The endpoint used depends on the collection type.

Records

These functions retrieve individual records or lists of records.

Function

Method

Endpoint

Description

getRecords

GET

/records

List records for a collection. Filter by includeActive and includeDeleted. Supports limit and offset for pagination.

getRecord

GET

/records/:recordId

Retrieve a single record by ID. Accepts options to include archived or deleted records.

Bulk Operations

These functions create and manage import and export jobs.

Function

Method

Endpoint

Description

createExportJob

POST

/bulkOperations/export

Begin an export job for a collection. Parameters: name, fileFormat, exportFullRecord, numberOfFilesToGenerate, resourceId, targetRecordType (ALL, ACTIVE, or ARCHIVED).

createImportJob

POST

/bulkOperations/import

Begin an import job for a collection. Parameters: name, fallbackRecordOwner, fileFormat, fileLocation, resourceId, storeInData.

createUploadLink

POST

/bulkOperations/uploadLink

Generate a pre-signed upload URL. Call this before createImportJob to retrieve the upload destination. The returned URL is passed to uploadFile.

createDownloadLink

POST

/bulkOperations/downloadLink

Generate a download URL for a completed export batch file. Pass the fileLocation from the batch record.

getJobs

GET

/bulkOperations/jobs

List jobs for a collection, paginated. Uses dataModelId for Data Model collections and moduleId for all other collection types.

getJob

GET

/bulkOperations/jobs/:jobId

Retrieve the current state of a single job, including its batches and status.

cancelJob

POST

/bulkOperations/jobs/:jobId/cancel

Cancel a running job. Terminal jobs (Completed, Failed, Canceled) cannot be canceled.

Client-Only Functions

These two functions require browser APIs and cannot be called from server actions.

Function

Description

getServiceUsers

Retrieve service users available as fallback record owners during import.

uploadFile

POST a file to the pre-signed upload URL returned by createUploadLink. Returns a fileKey that is passed to createImportJob as the fileLocation parameter. Maximum file size is 100 MB.

Import Flow

The import process uses the following three functions in sequence:

  1. Call createUploadLink to retrieve a pre-signed URL for the file upload.

  2. Call uploadFile to upload the file to that URL. This function requires the browser File API and cannot run in a server action.

  3. Call createImportJob with the fileKey returned by uploadFile to begin the import job.

File Formats

The fileFormat parameter accepts the following values:

Value

Label

Description

CSV

A single comma-separated values file.

ZIPWITHCSV

ZIP CSV

A ZIP archive containing a CSV file.

JSON

JSON Lines

A single file with one JSON object per line.

ZIPWITHJSON

ZIP JSON Lines

A ZIP archive containing a JSON Lines file.

ZIPWITHMULTIPLEJSON

ZIP with Multiple JSON Files

A ZIP archive containing one JSON file per record.


Changelog

Date

Change

2026-09-01

Initial publication.