Manage Portal user account

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.

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

Prerequisites

  • Reset Password: No authentication required (public endpoint).
  • Update Password and Get Site URL: APIM 3.0 Developer Portal authorization.
Note: To get a response from these APIs for a given environment, the Allow Access to APIM 3.0 Portal pages without login setting must be enabled on the API Management 3.0 settings page in Admin Manager. If disabled, all pages except the login page require users to log in.

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:

  1. Call this endpoint with generate set to true to send a password reset email to the user.
  2. Extract the reset_code from the reset URL in the email (the value after code=), then call this endpoint again with the reset_code and new password.

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 The name of the environment (Org).
email string The email address of the user.
generate boolean (Optional) Set to true to generate a reset code and send a password reset email. Default: false.
reset_code string (Optional) The reset code from the password reset email. Required when setting a new password.
password string (Optional) The new password. Required together with reset_code.

Response body


{
  "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 The name of the environment (Org).
email string The email address of the user.
password string The current password.
new_password string The new password.

Response body


{
  "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 body


{
  "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.