/auth/v1/users: POST
Creates a user.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
Χ | Χ | Χ | ✓ | Χ |
Synopsis of the request URL
curl -k -H 'Content-Type: application/json' -H ‘Authorization: Bearer <token>’ -X POST
https://<spectrum_discover_host>/auth/v1/users -d ‘<json details of user>’
The details of a user can be the following:
- Name
- Password
- Description
- Project
- Default project
Supported request types and response formats
Supported request types:
- POST
- JSON
Examples
The following example shows how to create a user.
Request:
curl -k -H 'Content-Type: application/json' -H ‘Authorization: Bearer <token>’ -X POST
https://<spectrum_discover_host>/auth/v1/users -d ‘{"name":"testuser","password":"testpass",
"email":"testuser@ibm.com"}’
Response:
201 Created