Skip to navigation

Create Schedule

Create a new schedule.

This will create a schedule to fetch data from the TSP.

It also creates a schedule to refresh or exchange the connection details for a short lived credential, such as an access token.

For now only Catena admins can create schedules.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

connection_idstringRequiredformat: "uuid"

Request

This endpoint expects an object.
resourceenumRequired

The type of resource to fetch on this schedule (e.g., VEHICLE, DRIVER, HOS, IFTA).

execution_interval_secondsintegerOptionalDefaults to 600

The interval between scheduled executions in seconds. Defaults to 10 minutes (600 seconds).

consecutive_error_thresholdintegerOptionalDefaults to 15
The number of consecutive errors allowed before the schedule is automatically set to INACTIVE. Defaults to 15.
max_concurrent_executionsintegerOptionalDefaults to 1
The maximum number of concurrent executions allowed for this schedule. Defaults to 1.
statusenumOptional
The initial status of the schedule. Defaults to ACTIVE.
cursorstring or nullOptional

Resource-specific state used to resume incremental fetching.

last_data_atdatetime or nullOptional
Timestamp of the most recent data point received from the TSP.
fetch_window_end_atdatetime or nullOptional
End timestamp of the last fetch window. Used by chunked adapters to advance backfills across executions.

Response

Successful Response
idstringformat: "uuid"
Unique identifier for the schedule.
connection_idstringformat: "uuid"
The ID of the connection that this schedule belongs to.
resourceenum

The type of resource being fetched on this schedule (e.g., VEHICLE, DRIVER, HOS, IFTA).

execution_interval_secondsinteger
The interval between scheduled executions in seconds.
statusenum

The current status of the schedule (ACTIVE, INACTIVE).

consecutive_error_countinteger
The number of consecutive errors that have occurred for this schedule.
consecutive_error_thresholdinteger
The number of consecutive errors allowed before the schedule is automatically set to INACTIVE.
max_concurrent_executionsinteger
The maximum number of concurrent executions allowed for this schedule.
cursorstring or nullOptional

Resource-specific state used to resume incremental fetching.

last_data_atdatetime or nullOptional
Timestamp of the most recent data point received from the TSP.
fetch_window_end_atdatetime or nullOptional
End timestamp of the last fetch window. Used by chunked adapters to advance backfills across executions.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
405
Method Not Allowed Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
504
Gateway Timeout Error