Skip to content

List a module's records

GET
/modules/{slug}/records
curl --request GET \
--url 'https://safe-api.safetyradar.com/v2/modules/jsa/records?limit=50&includeDeleted=true&updatedAfter=2026-09-01T00%3A00%3A00Z&updatedBefore=2026-09-30T00%3A00%3A00Z&fieldFilters=%5B%7B%22key%22%3A%22hazard_level%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A%22high%22%7D%5D&fieldSort=%7B%22key%22%3A%22hazard_level%22%2C%22direction%22%3A%22desc%22%7D' \
--header 'Authorization: Bearer <token>' \
--header 'x-team: my-team-slug'

List the records of a custom module, newest first, paged by an opaque cursor. Removed records are left out unless includeDeleted=true.

Poll for changes with updatedAfter / updatedBefore — exclusive on both ends, the same on every v2 endpoint that takes them. Either one changes the order to updatedAt ascending; page with nextCursor until it is null, then pass the updatedAt of the last record as the next updatedAfter. A write can become visible with an updatedAt a little older than the cursor you already hold, so poll with an overlap: pass updatedAfter = the last updatedAt you saw minus 5 minutes, and de-duplicate on id.

Filter and sort on your organization’s custom fields with fieldFilters and fieldSort — JSON in the query string. A key your organization has not defined, or an operator its type does not accept, is a 400 rather than an ignored filter. GET /v2/modules/{slug}/fields lists the keys, types and the operators each one accepts.

slug
required

The custom module’s slug, unique within your organization. Core modules (action_item) have their own routes.

string
>= 1 characters
Example
jsa

The custom module’s slug, unique within your organization. Core modules (action_item) have their own routes.

limit

Results per page (default: 50, max: 200). A larger value is refused with a 400 validation_error; it is not clamped.

integer
default: 50 <= 200
Example
50

Results per page (default: 50, max: 200). A larger value is refused with a 400 validation_error; it is not clamped.

cursor

The nextCursor of the previous page, as given. Send it with the same filters and sort: a cursor taken under a different order is refused with a 400.

string
>= 1 characters

The nextCursor of the previous page, as given. Send it with the same filters and sort: a cursor taken under a different order is refused with a 400.

includeDeleted

Also list removed records (deletedAt set). Default false.

string
Allowed values: true false

Also list removed records (deletedAt set). Default false.

updatedAfter

Only records updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Changes the order to updatedAt ascending: page with nextCursor until it is null, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.

string format: date-time
Example
2026-09-01T00:00:00Z

Only records updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Changes the order to updatedAt ascending: page with nextCursor until it is null, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.

updatedBefore

Only records updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.

string format: date-time
Example
2026-09-30T00:00:00Z

Only records updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.

fieldFilters

JSON array of custom-field filters, ANDed together. Each entry is {“key”,“op”,“value”}; isNull / isNotNull take no value and in takes an array. The operators a field accepts are returned as ops by GET /v2/modules/{slug}/fields.

string
Example
[{"key":"hazard_level","op":"eq","value":"high"}]

JSON array of custom-field filters, ANDed together. Each entry is {“key”,“op”,“value”}; isNull / isNotNull take no value and in takes an array. The operators a field accepts are returned as ops by GET /v2/modules/{slug}/fields.

fieldSort

JSON custom-field sort: {“key”,“direction”} with direction “asc” or “desc” (default “asc”). Records holding no value for the key sort last. Replaces the default order, including the updatedAt order of a poll.

string
Example
{"key":"hazard_level","direction":"desc"}

JSON custom-field sort: {“key”,“direction”} with direction “asc” or “desc” (default “asc”). Records holding no value for the key sort last. Replaces the default order, including the updatedAt order of a poll.

x-team

Deprecated — accepted but ignored; the v2 API is org-scoped.

string
Example
my-team-slug

Deprecated — accepted but ignored; the v2 API is org-scoped.

A page of records

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string format: uuid
externalId
required

The record’s own correlation id, unique per module. The upsert key.

string
title
required
string
description
required
string
nullable
recordDate
required

The record’s calendar date as an ISO instant. A date-only value is stored at 08:00 UTC: read its date in UTC.

string
nullable
statusId
required
string format: uuid
nullable
statusName
required
string
nullable
statusGroup
required
string
nullable
Allowed values: new in_progress complete on_hold cancelled
statusExternalId
required
string
nullable
ownerId
required
string format: uuid
nullable
ownerName
required
string
nullable
ownerExternalId
required
string
nullable
assignedToUserId
required
string format: uuid
nullable
assignedToUserName
required
string
nullable
assignedToUserExternalId
required
string
nullable
locationId
required
string format: uuid
nullable
locationName
required
string
nullable
locationExternalId
required
string
nullable
fields
required

The organization’s custom fields for this module, keyed by definition key. Always present; a defined key this record holds no value for is absent rather than null. A user (person) or asset (location / equipment) field is read back as { id, name, externalId } in place of its uuid; every other type is its plain value. Discover the keys, types and filter operators at GET /v2/modules/{slug}/fields.

object
key
additional properties
any
createdAt
required
string
updatedAt
required
string
deletedAt
required

Set when the record was removed. A removed record is listed only with includeDeleted=true; sending its external id in a bulk upsert restores it.

string
nullable
meta
required
object
pagination
required
object
limit
required
number
total
required

Records matching the filters, all pages.

number
hasNext
required
boolean
nextCursor
required

Pass as cursor for the next page; null on the last one.

string
nullable
Example
{
"data": [
{
"externalId": "JSA-00042",
"statusGroup": "new",
"fields": {
"task_steps": "Rig the load; clear the swing radius",
"hazard_level": "high",
"supervisor": {
"id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6",
"name": "Jordan Lee",
"externalId": "EMP-0123"
}
}
}
]
}

Malformed cursor, fieldFilters or fieldSort, or a key or operator the organization’s definitions refuse

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Missing or invalid API key (unauthorized)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

No custom module with this slug is installed for your organization

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Rate limit exceeded (rate_limit_exceeded)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unexpected server error (internal_error)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Version bd999fd · Released November 23, 2026