Approve a list of users

POST https://{controlplane_path}/api/1/rest/public/apim/approve_users      

Approve a user ID or a list of user IDs that appear in the created status under Subscription Manager.

Note: The approval process is unsuccessful if the user is not registered in 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 for approval

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/approve_users' \
  -H 'Authorization: Basic {base64_encoded email:password}' \
  -H 'Content-Type: application/json' \
  -d '{
  "org_name": "acme",
  "user_ids": [
    "[email protected]",
    "[email protected]"
  ]
}'

Path parameters

Key Description
controlplane_path Required. The path to the SnapLogic control plane: elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For example:
  • uat.elastic.snaplogic.com
  • emea.snaplogic.com

Query parameters

None.

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Request body


{
  "org_name": "Automation2",
  "user_ids": [
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ]
}
Key Type Description
org_name string The name of the SnapLogic Environment/Org.
user_ids array/string An array that contains the user ID or a list of user IDs.

Response


{
  "response_map": {
    "successful approvals": [
      {
        "User IDs": [
          "[email protected]",
          "[email protected]"
        ]
      }
    ],
    "failed approvals": [
      {
        "User [email protected]": "User has not requested access to this org"
      },
      {
        "User [email protected]": "User has not requested access to this org"
      }
    ]
  }
}        
Key Type Description
{ "Successful Approvals" : <list of usernames> } array The JSON object array contains the list of user IDs that are successfully approved.
{ "Failed Approvals" : <list of username: error when approving> } array The JSON object array contains the list of user IDs that failed the approval 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.