Manage Portal access requests
Approve or deny APIM 3.0 Developer Portal access requests. Environment admins use these APIs to manage requests for Developer Portal accounts.
| Approve Access | POST
https://{controlplane_path}/api/1/rest/public/developer_hub/approve |
| Deny Access | POST
https://{controlplane_path}/api/1/rest/public/developer_hub/deny |
Prerequisites
- Environment admin permissions.
Approve Access
POST https://{controlplane_path}/api/1/rest/public/developer_hub/approve
Approve a pending Developer Portal access request. The approved user receives an email notification and appears in the Manage Users list.
Example
This example uses basic authentication. For a JWT example, refer to Authentication.
The following cURL examples use my-environment for the environment name.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/developer_hub/approve' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"organization": "my-environment",
"username": "[email protected]",
"first_name": "Jane",
"last_name": "Smith"
}'
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
Request body
| Key | Type | Description |
|---|---|---|
organization |
string | The name of the environment (Org). |
username |
string | The email address of the user to approve. |
first_name |
string | (Optional) The first name of the user. |
last_name |
string | (Optional) The last name of the user. |
Response body
Returns the approved user document.
{
"response_map": {
"username": "[email protected]",
"organization": "my-environment",
"first_name": "Jane",
"last_name": "Smith",
"status": "approved"
},
"http_status_code": 200
}
Deny Access
POST https://{controlplane_path}/api/1/rest/public/developer_hub/deny
Deny a pending Developer Portal access request. The denied user does not appear in the Manage Users list.
Example
This example uses basic authentication. For a JWT example, refer to Authentication.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/developer_hub/deny' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"organization": "my-environment",
"username": "[email protected]"
}'
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
Request body
| Key | Type | Description |
|---|---|---|
organization |
string | The name of the environment (Org). |
username |
string | The email address of the user to deny. |
Response body
{
"response_map": {
"success": "ok"
},
"http_status_code": 200
}
Error handling
| HTTP status codes | Message | Resolution |
|---|---|---|
| 401 | Unauthorized | Verify your credentials and Environment admin privileges. |
| 403 | Not Allowed | You do not have permission to perform this action in this environment. |
| 404 | Not Found | Verify the environment name and username are correct. |