XRAS doesn’t keep track of users on resources, only whether or not a person has a “User” role on a request. However, this endpoint passes the resource information on to the accounting service and can be used to keep roles in XRAS and the accounting service in sync.

Accepts a JSON body like the following:

[
  {"username": "mshapiro", "resources": [531001, 530299]},
  {"username": "hackwort", "resources": []}
]

XRAS will retrieve user information from the accounting service and perform the necessary requests to the accounting service to add or remove users from resources.

If a username is not referenced in the POSTed body, no action will be taken for that user.

For allocations processes without an accounting service, this route will return a 501/Not Implemented. Use /v1/roles/:requestNumber/User/:username instead.

Params

Param name Description
requestNumber
required

Validations:

  • Must be a String

_json
optional

Validations:

  • Must be an Array of nested elements

_json[username]
required

Validations:

  • Must be a String

_json[resources]
required

Validations:

  • Must be an array of Integer

Returns

Code: 200

Description:

OK

Param name Description

Code: 404

Description:

Not Found

Param name Description
message
required

“requestNumber ‘<requestNumber>’ not found”

Validations:

  • Must be a String

Code: 501

Description:

Not Implemented

Param name Description
message
required

“No accounting service available”

Validations:

  • Must be a String