Sinatra Docs
API ReferenceRecurring tasks

Get a recurring task

Returns a recurring task and its runs, newest first, 50 at a time.

Any workspace member can read it. Pass next as before to read older runs.

GET/v1/workspaces/{workspaceId}/recurring-tasks/{taskId}
AuthorizationBearer <token>

A personal access token, which starts with sntr_. Create one on the dashboard's CLI & API page (https://app.sinatra.dev/tokens). It acts as you in every workspace you belong to, with your role in each, and expires after at most 365 days. The CLI's browser sign-in sends an OAuth access token here instead.

In: header

Path Parameters

workspaceIdstring

The workspace's id, from GET /v1/me.

taskIdstring

The recurring task's id, from GET /v1/workspaces/{workspaceId}/recurring-tasks. Not the id of a task a run started.

Query Parameters

before?string

The next value from the previous page, to read older runs.

Response Body

curl -X GET "https://api.sinatra.dev/v1/workspaces/string/recurring-tasks/string?before=string"
{
  "task": {
    "id": "string",
    "workspaceId": "string",
    "ownerUserId": "string",
    "name": "string",
    "prompt": "string",
    "cadence": {
      "times": [
        "string"
      ],
      "weekdays": [
        0
      ],
      "dayOfMonth": 1
    },
    "timezone": "string",
    "notifyByEmail": true,
    "nextRunAt": "2019-08-24T14:15:22Z",
    "pausedAt": "2019-08-24T14:15:22Z",
    "pausedReason": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "runs": [
    {
      "id": "string",
      "workspaceId": "string",
      "recurringTaskId": "string",
      "scheduledFor": "2019-08-24T14:15:22Z",
      "trigger": "string",
      "ownerUserId": "string",
      "message": "string",
      "taskName": "string",
      "outcome": "string",
      "reason": "string",
      "reasonText": "string",
      "workstreamId": "string",
      "notifiedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "startedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "next": "string"
}
{
  "error": "string",
  "reason": "string",
  "requestId": "string",
  "refusal": "string",
  "billingUrl": "string",
  "settingsUrl": "string",
  "plan": "string",
  "running": 0,
  "queued": 0,
  "taskId": "string",
  "messageId": "string"
}
{
  "error": "string",
  "reason": "string",
  "requestId": "string",
  "refusal": "string",
  "billingUrl": "string",
  "settingsUrl": "string",
  "plan": "string",
  "running": 0,
  "queued": 0,
  "taskId": "string",
  "messageId": "string"
}
{
  "error": "string",
  "reason": "string",
  "requestId": "string",
  "refusal": "string",
  "billingUrl": "string",
  "settingsUrl": "string",
  "plan": "string",
  "running": 0,
  "queued": 0,
  "taskId": "string",
  "messageId": "string"
}
{
  "error": "string",
  "reason": "string",
  "requestId": "string",
  "refusal": "string",
  "billingUrl": "string",
  "settingsUrl": "string",
  "plan": "string",
  "running": 0,
  "queued": 0,
  "taskId": "string",
  "messageId": "string"
}
{
  "error": "string",
  "reason": "string",
  "requestId": "string",
  "refusal": "string",
  "billingUrl": "string",
  "settingsUrl": "string",
  "plan": "string",
  "running": 0,
  "queued": 0,
  "taskId": "string",
  "messageId": "string"
}