Pause, resume or reauthorize a Briefing
Changes a Briefing's status, or saves its creator's current access. Send one change per request.
| To | Send | Who 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:
- Pause the Briefing if it is active, and wait until
hasActiveRunisfalse. - Create an access token for the creator with the
Token API:
endUserIdandtenantIdwith the samesecurityParamstheir dashboards use for a tenant user, ororgUserIdfor an organization user. - Call this endpoint with that token and
{"reauthorize": true}. - Resume the Briefing with
{"status": "ACTIVE"}.
Authorization
BearerAuth A project-scoped access token. Generate one via the Token API with your project ID and project secret.
In: header
Path Parameters
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"
}