GET /v1/users/<requestNumber>
Get all users on a request.

Examples

GET /v1/users/<requestNumber>
GET /v1/users/<requestNumber>/<resourceRepositoryKey>
{
  "message": null,
  "result": [
    {
      "resourceRepositoryKey": 145121,
      "resourceName": "bridges2-rm.psc.xsede.org",
      "username": "rlight",
      "comment": "updated by mjyoder"
    },
        {
      "resourceRepositoryKey": 145214,
      "resourceName": "bridges2-gpu.psc.xsede.org",
      "username": "mjyoder",
      "comment": "updated by mjyoder"
    }
  ]
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

Returns

Code: 200

Description:

OK

Param name Description
resourceRepositoryKey
required

Validations:

  • Must be a Integer

resourceName
required

Validations:

  • Must be a String

username
required

Validations:

  • Must be a String

comment
required

Validations:

  • Must be a String


POST /v1/users/<requestNumber>
Add user(s) to a resource/request.

Examples

POST /v1/users/<requestNumber>
{
  "comment": "updated by mjyoder",
  "users": [
    {
      "resourceRepositoryKey": 145121,
      "username": "rlight"
    },
    {
      "resourceRepositoryKey": 145121,
      "username": "mjyoder"
    },
    {
      "resourceRepositoryKey": 145123,
      "username": "rlight"
    }
  ]
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

Returns

Code: 200

Description:

Success.

Param name Description

GET /v1/users/<requestNumber>/<resourceRepositoryKey>
Get the users for a request on a resource.

Examples

GET /v1/users/<requestNumber>
GET /v1/users/<requestNumber>/<resourceRepositoryKey>
{
  "message": null,
  "result": [
    {
      "resourceRepositoryKey": 145121,
      "resourceName": "bridges2-rm.psc.xsede.org",
      "username": "rlight",
      "comment": "updated by mjyoder"
    },
        {
      "resourceRepositoryKey": 145214,
      "resourceName": "bridges2-gpu.psc.xsede.org",
      "username": "mjyoder",
      "comment": "updated by mjyoder"
    }
  ]
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

resourceRepositoryKey
required

The resource’s repo key

Validations:

  • Must be a String

Returns

Code: 200

Description:

OK

Param name Description
resourceRepositoryKey
required

Validations:

  • Must be a Integer

resourceName
required

Validations:

  • Must be a String

username
required

Validations:

  • Must be a String

comment
required

Validations:

  • Must be a String


POST /v1/users/<requestNumber>/<resourceRepositoryKey>
Add users to a resource on a request.

Examples

POST /v1/users/<requestNumber>
{
  "comment": "updated by mjyoder",
  "users": [
    {
      "resourceRepositoryKey": 145121,
      "username": "rlight"
    },
    {
      "resourceRepositoryKey": 145121,
      "username": "mjyoder"
    },
    {
      "resourceRepositoryKey": 145123,
      "username": "rlight"
    }
  ]
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

resourceRepositoryKey
required

The resource’s repo key

Validations:

  • Must be a String

Returns

Code: 200

Description:

Success.

Param name Description

GET /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
Check if a user is on a resource/request.

Examples

GET /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
{
  "message": null,
  "result": {
    "resourceRepositoryKey": 145121,
    "resourceName": "bridges2-rm.psc.xsede.org",
    "username": "mjyoder",
    "comment": "updated by mjyoder"
  }
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

resourceRepositoryKey
required

The resource’s repo key

Validations:

  • Must be a String

username
required

The user’s name

Validations:

  • Must be a String

Returns

Code: 200

Description:

The resource/request has a user with that name.

Param name Description

Code: 404

Description:

The resource/request has no user with that name.

Param name Description

POST /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
Add a user to a resource/request.

Examples

POST /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
{
  "comment": "added by mjyoder"
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

resourceRepositoryKey
required

The resource’s repo key

Validations:

  • Must be a String

username
required

The user’s name

Validations:

  • Must be a String

Returns

Code: 200

Description:

The resource/request has a user with that name.

Param name Description

Code: 400

Description:

Invalid grant number, or some usernames were not found, or the resources are missing or have no active allocations on the request.

Param name Description

DELETE /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
Remove a user from a resource/request.

Examples

DELETE /v1/users/<requestNumber>/<resourceRepositoryKey>/<username>
{
  "comment": "removed by mjyoder"
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

resourceRepositoryKey
required

The resource’s repo key

Validations:

  • Must be a String

username
required

The user’s name

Validations:

  • Must be a String

Returns

Code: 200

Description:

The resource/request has a user with that name.

Param name Description