Projects

Add a Worker

Add a worker to project.

The user must already exist before being added to a project.

post/v1/project/{project_id}/worker/

Request

  • Base URL
    https://developer.beta.salussafety.io
  • URL
    https://developer.beta.salussafety.io/v1/project/{project_id}/worker/
  • Auth
    • HTTP bearer
    • or OAuth 2
      Client credentials
      Token URL: https://guardian.beta.salussafety.io/token
    • or OAuth 2
      Authorization code: https://guardian.beta.salussafety.io/authorize
      Token URL: https://guardian.beta.salussafety.io/token

Path parameters

project_idinteger required

Request body

isAdminboolean

Indicates if the user is an administrator, this flag can only be true, only if role is also company_owner otherwise this flag is set to False.

documentAccess'none' | 'read' | 'write'

Company user access type enumeration.

feedAccess'none' | 'read' | 'write'

Company user access type enumeration.

userIdinteger required

The user identifier of the worker to add to the project.

Example request

{
  "userId": 2
}

Response

Successful Response

errorboolean

A boolean error indicator.

messagestring nullable

Optional message.

Example response

{
  "data": {
    "userId": 2,
    "id": 1,
    "companyId": 2,
    "siteId": 2
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.