Deny a list of users
POST https://{controlplane_path}/api/1/rest/public/apim/deny_users
Deny access to the user ID or a list of user IDs that appear in created status under Subscription Manager.
Note: The denial process is unsuccessful if the user isn't registered in the
Classic APIM Developer Portal.
Important: This page describes a Classic APIM API.
Prerequisites
- Org admin (Environment admin) permissions
- Developer portal login credentials
- Specify the user ID or list of user IDs access denial
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
Example
This example uses basic authentication. For a JWT example, refer to Authentication.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/apim/deny_users' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"org_name": "acme",
"user_ids": ["[email protected]", "[email protected]"]
}'
Response
{
"response_map": {
"successful denials": [
{
"User IDs": [
"[email protected]",
"[email protected]"
]
}
],
"failed denials": [
{
"User [email protected]": "User is not registered"
},
{
"User [email protected]": "User is not registered"
}
]
}
}
| Key | Type | Description |
|---|---|---|
{ "Successful Denials" :
<list of usernames>(list of strings) }
|
array | The JSON object array contains the list of user IDs that are successfully denied. |
{ "Failed denials" : <
list of username: error when denying> }
|
array | The JSON object array contains the list of user IDs that failed the denial process. |
Error handling
| HTTP status codes | Message | Resolution |
|---|---|---|
| 400 | May not have Read permission for org: {org_name} | Verify you have Org admin permissions. |
| 401 | Unauthorized | Verify your credentials and that you have Org admin permissions. |