Semaphor

Pause, resume or reauthorize a Briefing

Changes a Briefing's status, or saves its creator's current access. Send one change per request.

ToSendWho can
Pause{"status": "PAUSED"}The creator, or an organization Admin
Resume{"status": "ACTIVE"}The creator, or an organization Admin
Reauthorize{"reauthorize": true}Only the creator

Whose access a Briefing runs with. A Briefing runs with the access of the user who created it, saved when they created it: who they are and the security parameters (securityParams) on their access token. Pausing, resuming, editing or running it never changes that, whoever does it.

Reauthorize saves the creator's current access in its place. Do it when the creator's security parameters change, or when resuming answers 409 with code BRIEFING_REAUTHORIZATION_REQUIRED:

  1. Pause the Briefing if it is active, and wait until hasActiveRun is false.
  2. Create an access token for the creator with the Token API: endUserId and tenantId with the same securityParams their dashboards use for a tenant user, or orgUserId for an organization user.
  3. Call this endpoint with that token and {"reauthorize": true}.
  4. Resume the Briefing with {"status": "ACTIVE"}.
PATCH
/api/v1/briefings/{briefingId}

Authorization

BearerAuth
AuthorizationBearer <token>

A project-scoped access token. Generate one via the Token API with your project ID and project secret.

In: header

Path Parameters

briefingId*string

The Briefing's id, from List Briefings.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X patch "https://semaphor.cloud/api/v1/briefings/string" \  -H "Content-Type: application/json" \  -d '{    "status": "PAUSED"  }'
{
  "briefing": {
    "id": "string",
    "name": "string",
    "description": "string",
    "status": "ACTIVE",
    "scheduleExpr": "0 8 * * 1",
    "timezone": "America/New_York",
    "nextRunAt": "2019-08-24T14:15:22Z",
    "scope": {
      "type": "organization",
      "label": "string",
      "tenantId": "string",
      "tenantName": "string"
    },
    "creator": {
      "type": "organization",
      "id": "string",
      "name": "string",
      "email": "string",
      "label": "string"
    },
    "deliveryConfig": {
      "recipients": [
        {
          "type": "tenant_user",
          "tenantUserId": "string"
        }
      ],
      "channels": [
        "EMAIL"
      ],
      "subject": "string",
      "message": "string"
    },
    "source": {},
    "body": {},
    "attachments": [
      {}
    ],
    "presentation": {},
    "lastRunAt": "2019-08-24T14:15:22Z",
    "lastRunStatus": "string",
    "hasActiveRun": true,
    "canManage": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}