Assigning job user roles

Use the following endpoint to assign a job role to a user on a given job:

  • POST /job/v1/jobs/{jobId}/user-roles/assign

The request body must specify the user, group, and role using the syntax below.

{
    "data": {
        "attributes": {
          "group": "<groupId>",
          "role": {
            "code": "<UserRolesCode>"
          },
          "user": "<userId>"
        }
    }
}

Each call consist of one role being assigned to a group and user. If that role was already assigned to another user, it is reassigned to the specified user. Beyond that, other assignments on the job are not affected.

For example, the following assigns the role of Auditor to Betty Baker (pc:220) from Eastern Region Underwriting (pc:1117) on job pc:9.

POST /job/v1/jobs/pc:9/user-roles/assign

{
    "data": {
        "attributes": {
          "group": "pc:1117",
          "role": {
            "code": "Auditor"
          },
          "user": "pc:220"
        }
    }
}