IBM Cloud API Docs

Introduction

Manage the users that will receive notifications for the alerts with this API.

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 400 type response is some sort of failure, and a 500 type response usually indicates an internal system error.

Methods

listUsers

List a summary of each user.

GET /users/v1

Request

Custom Headers

  • Allowable values: [application/json,text/plain]

Response

Status Code

  • Successful request

  • Authorization failed

  • Forbidden

  • Internal system error

No Sample Response

This method does not specify any sample responses.

addUser

Create a new user.

POST /users/v1

Request

Custom Headers

  • Allowable values: [application/json,text/plain]

Query Parameters

  • Send the user a welcome email upon successful creation. Set to true or false

User object

Response

Status Code

  • User successfully created

  • Invalid request

  • Authorization failed

  • Forbidden

  • User already exists

  • Invalid media type

  • Internal system error

No Sample Response

This method does not specify any sample responses.

deleteUser

Delete a user. Will fail for users that:
1. a policy depends on
2. are assigned to a current or future shift
3. were created outside of Alert Notification

DELETE /users/v1/{id}

Request

Custom Headers

  • Allowable values: [application/json,text/plain]

Path Parameters

  • IBM ID of the user or 'current' for the current user

Response

Status Code

  • Successful request

  • Cannot delete user

  • Authorization failed

  • Forbidden

  • Unable to locate user

  • Internal system error

No Sample Response

This method does not specify any sample responses.

getUser

Get a user's contact information, preferences, group membership, and roles.

GET /users/v1/{id}

Request

Custom Headers

  • Allowable values: [application/json,text/plain]

Path Parameters

  • IBM ID of the user or 'current' for the current user

Response

Status Code

  • Successful request

  • Authorization failed

  • Forbidden

  • Unable to locate user

  • Internal system error

No Sample Response

This method does not specify any sample responses.

modifyUser

Set a user's contact information, preferences, group membership, and roles.

PUT /users/v1/{id}

Request

Custom Headers

  • Allowable values: [application/json,text/plain]

Path Parameters

  • IBM ID of the user or 'current' for the current user

User object

Response

Status Code

  • Successful request

  • Invalid request

  • Authorization failed

  • Forbidden

  • Unable to locate user

  • Invalid media type

  • Internal system error

No Sample Response

This method does not specify any sample responses.