Sinatra Docs
API ReferenceRecurring tasks

List recurring tasks

Lists the workspace's recurring tasks, newest first, each with its owner, its most recent run and when it next runs.

Any workspace member can list them. A recurring task starts a task on its schedule, as the member who created it, until someone pauses or deletes it.

GET/v1/workspaces/{workspaceId}/recurring-tasks
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.

Response Body

curl -X GET "https://api.sinatra.dev/v1/workspaces/string/recurring-tasks"
{
  "tasks": [
    {
      "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",
      "owner": {
        "id": "string",
        "name": "string",
        "githubLogin": "string"
      },
      "lastRun": {
        "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"
      }
    }
  ]
}
{
  "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"
}