Creating or Updating a Security Administrator
Function
This API is used to create or update a security administrator.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/security/admin
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
X-Auth-Token |
Yes |
String |
IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
manager_type |
No |
String |
Administrator type. The value can be USER or USER_GROUP. |
|
manager_id |
No |
String |
Administrator ID. If the administrator type is user, set this parameter to the IAM user ID. If the administrator type is user group, set this parameter to the IAM user group ID. |
|
manager_name |
No |
String |
Administrator name. If the administrator type is user, set this parameter to the IAM username. If the administrator type is user group, set this parameter to the IAM user group name. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
manager_type |
String |
Administrator type. The value can be USER or USER_GROUP. |
|
manager_id |
String |
Administrator ID. If the administrator type is user, set this parameter to the IAM user ID. If the administrator type is user group, set this parameter to the IAM user group ID. |
|
manager_name |
String |
Administrator name. If the administrator type is user, set this parameter to the IAM username. If the administrator type is user group, set this parameter to the IAM user group name. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/admin
{
"manager_type" : "USER",
"manager_id" : "0833a5737480d53b2f25c010dc1a7b88",
"manager_name" : "test_user"
}
Example Responses
Status code: 200
OK
{
"manager_type" : "USER",
"manager_id" : "0833a5737480d53b2f25c010dc1a7b88",
"manager_name" : "test_user"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.