English

Users

Contributors ciarm dmp-netapp Download PDF of this page

Use the methods listed in the following table to retrieve, create, modify, and delete subtenants.

HTTP Method Path Description

GET

/v2.1/users

Retrieve a list of all users.

GET

/v2.1/users/{id}

Retrieve a user by the user ID.

POST

/v2.1/users

Create a new user.

PUT

/v2.1/users/{id}

Modify the details of a user.

DELETE

/v2.1/users/{id}

Delete a user.

GET

/v2.1/users/{username}

Retrieve a user by the user name.

User attributes

The following table lists the user attributes.

Attribute Type Description

id

String

The unique identifier of the user.

username

String

The user name.

password

String

The user’s password.

firstName

String

The user’s first name.

lastName

String

The user’s last name.

displayName

String

The user’s display name.

email

String

The user’s email address.

phone

String

The user’s phone number.

profileImageURL

String

The URL of the users’ profile image.

tenant_id

String

The primary tenant identifier for this user.

tenancies

The tenancy to which the user belongs; an array consisting of:

  • tenant_id, and

  • role_name
    This is the user role; one of user, admin, read, partner, or root.

provider

String

Authentication provider: local or activeDirectory

provider data

Authentication provider details, consisting of:

  • email_address, and

  • member_of (group membership)

Retrieve all users

Use the method listed in the following table to retrieve all users.

HTTP Method Path Description Parameters

GET

/v2.1/users

Retrieve all users.

None

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "total_records": 1,
    "records": [
      {
        "id": "5dddbe0ef071fe0001b889fd",
        "username": "TestUser3",
        "firstName": "Test",
        "lastName": "User",
        "displayName": "",
        "email": "testuser@netapp.com",
        "tenancies": [
          {
            "id": "5d914499869caefed0f39eee",
            "name": "MyOrg",
            "code": "myorg",
            "role": "admin"
          }
        ]
      }
    ]
  }
}

Retrieve a user by ID

Use the method listed in the following table to retrieve a user by ID.

HTTP Method Path Description Parameters

GET

/v2.1/users

Retrieve a user by ID.

id (string): The unique identifier of the user.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "total_records": 1,
    "records": [
      {
        "id": "5e585df6896bd80001dd4b44",
        "username": "testuser01",
        "firstName": "",
        "lastName": "",
        "displayName": "",
        "email": "",
        "tenancies": [
          {
            "id": "5d914499869caefed0f39eee",
            "name": "MyOrg",
            "code": "myorg",
            "role": "user"
          }
        ]
      }
    ]
  }
}

Retrieve a user by user name

Use the method listed in the following table to retrieve a user by the user name.

HTTP Method Path Description Parameters

GET

/v2.1/users

Retrieve a user by user name.

username (string): The user name of the user.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "total_records": 1,
    "records": [
      {
        "id": "5e61aa814559c20001df1a5f",
        "username": "MyName",
        "firstName": "MyFirstName",
        "lastName": "MySurname",
        "displayName": "CallMeMYF",
        "email": "user@example.com",
        "tenancies": [
          {
            "id": "5e5f1c4f253c820001877839",
            "name": "MyTenant",
            "code": "testtenantmh",
            "role": "user"
          }
        ]
      }
    ]
  }
}

Create a user

Use the method listed in the following table to create a user.

HTTP Method Path Description Parameters

POST

/v2.1/users

Create a new user.

None

Required request body attributes: username, tenant_id, tenancies, provider

Request body example:

{
  "username": "MyUser",
  "password": "mypassword",
  "firstName": "My",
  "lastName": "User",
  "displayName": "CallMeMyUser",
  "email": "user@example.com",
  "phone": "string",
  "profileImageURL": "string",
  "tenant_id": "5e7c3af7aab46c00014ce877",
  "tenancies": [
    {
      "tenant_id": "5e7c3af7aab46c00014ce877",
      "role_name": "admin"
    }
  ],
  "provider": "local",
  "provider_data": {
    "email": "user@example.com",
    "member_of": "string"
  }
}

Response body example:

{
  "status": {
    "user_message": "Okay. New resource created.",
    "verbose_message": "",
    "code": 201
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed6f463129e5d000102f7e1",
        "username": "MyUser",
        "firstName": "My",
        "lastName": "User",
        "displayName": "CallMeMyUser",
        "email": "user@example.com",
        "tenancies": [
          {
            "id": "5e7c3af7aab46c00014ce877",
            "name": "MyTenant",
            "code": "mytenantcode",
            "role_name": "admin"
          }
        ]
      }
    ]
  }
}

Modify a user by ID

Use the method listed in the following table to modify a user by user ID.

HTTP Method Path Description Parameters

PUT

/v2.1/users/{id}

Modify a user identified by the user ID. You can modify the user name, display name, password, email address, phone number, profile image URL, and tenancy details.

id (string): The unique identifier of the user.

Required request body attributes: none

Request body example:

{
  "password": "MyNewPassword",
   "firstName": "MyFirstName",
   "lastName": "MySurname",
   "displayName": "CallMeMYF",
   "email": "user@example.com",
   "phone": "string",
  "profileImageURL": "string",
  "tenant_id": "5e5f1c4f253c820001877839",
  "tenancies": [
    {
      "tenant_id": "5e5f1c4f253c820001877839",
      "role_name": "user"
    }
  ]
}

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "total_records": 1,
    "records": [
      {
        "id": "5e61aa814559c20001df1a5f",
        "username": "MyName",
        "firstName": "MyFirstName",
        "lastName": "MySurname",
        "displayName": "CallMeMYF",
        "email": "user@example.com",
        "tenancies": [
          {
            "id": "5e5f1c4f253c820001877839",
            "name": "MyTenant",
            "code": "testtenantmh",
            "role": "user"
          }
        ]
      }
    ]
  }
}

Delete a user by ID

Use the method listed in the following table to delete a user by ID.

HTTP Method Path Description Parameters

DELETE

/v2.1/users/{name}

Delete the user identified by the ID.

id (string): The unique identifier of the user.

Required request body attributes: none

Request body example:

none

Response body example:

No content for succesful delete