Manage Portal user account
| Reset Password | POST
https://{controlplane_path}/api/1/rest/public/developer_hub/password/reset |
| Update Password | POST
https://{controlplane_path}/api/1/rest/public/developer_hub/password |
| Get Site URL | GET
https://{controlplane_path}/api/1/rest/public/developer_hub/site_url |
Reset a password, update a password, and retrieve the Developer Portal site URL. APIM 3.0 Developer Portal users use these APIs to manage their own accounts.
Prerequisites
- Reset Password: No authentication required (public endpoint).
- Update Password and Get Site URL: APIM 3.0 Developer Portal authorization.
Reset Password
POST https://{controlplane_path}/api/1/rest/public/developer_hub/password/reset
Reset a Developer Portal user password. This is a two-step process:
- Call this endpoint with
generateset totrueto send a password reset email to the user. - Extract the
reset_codefrom the reset URL in the email (the value aftercode=), then call this endpoint again with thereset_codeand newpassword.
Example
The following cURL examples use my-environment for the environment name.
Step 1: Generate a reset code.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/developer_hub/password/reset' \
-H 'Content-Type: application/json' \
-d '{
"org_name": "my-environment",
"email": "[email protected]",
"generate": true
}'
Step 2: Reset the password using the code from the email.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/developer_hub/password/reset' \
-H 'Content-Type: application/json' \
-d '{
"org_name": "my-environment",
"email": "[email protected]",
"reset_code": "abc123def456",
"password": "newSecurePassword"
}'
Request header
| Key | Description |
|---|---|
Content-Type |
application/json |
Request body
| Key | Type | Description |
|---|---|---|
org_name |
string | Required. The name of the environment (Org). |
email |
string | Required. The email address of the user. |
generate |
boolean | Required for Step 1. Set to true to send a password reset
email. Default: false. |
reset_code |
string | Required for Step 2. The reset code from the password reset email (the value
after code= in the reset URL). |
password |
string | Required for Step 2. The new password. |
Response
{
"response_map": {
"success": "An email has been sent to the email address you entered. If you do not receive the email within 30 minutes, please check your spam folder, and then contact support {support_contact}"
},
"http_status_code": 200
}
The response returns the same message whether or not the system recognizes the email address, to prevent account enumeration.
Update Password
POST https://{controlplane_path}/api/1/rest/public/developer_hub/password
Update an APIM 3.0 Developer Portal user password. After updating, the system invalidates the user's existing session and the user must log in with the new password.
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/password' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"org_name": "my-environment",
"email": "[email protected]",
"password": "currentPassword",
"new_password": "newSecurePassword"
}'
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 |
|---|---|---|
org_name |
string | Required. The name of the environment (Org). |
email |
string | Required. The email address of the user. |
password |
string | Required. The current password. |
new_password |
string | Required. The new password. |
Response
{
"response_map": {
"success": "Ok"
},
"http_status_code": 200
}
Get Site URL
GET https://{controlplane_path}/api/1/rest/public/developer_hub/site_url?org_name={org_name}
Retrieve the deployed APIM 3.0 Developer Portal site URL for an environment.
Example
This example uses Basic authentication. For a JWT example, refer to Authentication.
curl -X 'GET' \
'https://elastic.snaplogic.com/api/1/rest/public/developer_hub/site_url?org_name=my-environment' \
-H 'Authorization: Basic {base64_encoded email:password}'
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
Query parameters
| Key | Type | Description |
|---|---|---|
org_name |
string | Required. The name of the environment (Org). |
Response
{
"response_map": {
"url": "https://developer.snaplogic.com/api-portal"
},
"http_status_code": 200
}
| Key | Type | Description |
|---|---|---|
url |
string | The full URL of the deployed APIM 3.0 Developer Portal site. |
Error handling
| HTTP status codes | Message | Resolution |
|---|---|---|
| 401 | Unauthorized | Verify your credentials and APIM 3.0 Developer Portal authorization. |
| 404 | Not Found | Verify the environment name is correct. |