OrganizationsOrganization settings
Create a worker credential
POST
A worker claiming with it takes only this organization's jobs, of its types. The platform's workers share those jobs unless they run only on the organization's own workers (PATCH above). The secret is in this answer only.
Who may call it: An owner or security admin of the organization. API keys: no.
sessioncookie
gamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Host- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
slug*stringThe organization's slug, as in its URL.
application/json- body
name*stringLength
1 <= length <= 100types*array<>Items
1 <= items <= 20Created.
application/json- response
credential*What one of the organization's own job workers claims with. Its secret is shown once, on creation.
secret*stringExample Request
curl -X POST 'http://localhost:3000/api/organizations/string/workers' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "types": [ "string" ]}'Example Response
{ "credential": { "id": "string", "name": "string", "types": [ "string" ], "start": "string", "createdAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z" }, "secret": "string"}