Manage Portal applications

Create POST https://{controlplane_path}/api/1/rest/public/service_application
Get GET https://{controlplane_path}/api/1/rest/public/service_application
Delete DELETE https://{controlplane_path}/api/1/rest/public/service_application
Important: This API applies to APIM 3.0, not Classic APIM.

Create, list, or delete APIM 3.0 Developer Portal applications. APIM 3.0 Developer Portal users use these APIs to manage their applications for Service subscriptions.

Prerequisites

A user account with access to the APIM 3.0 Developer Portal.

Create application

POST https://{controlplane_path}/api/1/rest/public/service_application

Create a new APIM 3.0 Developer Portal application.

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/service_application' \
  -H 'Authorization: Basic {base64_encoded email:password}' \
  -H 'Content-Type: application/json' \
  -d '{
  "org_name": "my-environment",
  "application_name": "my-app"
}'

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).
application_name string Required. The name for the new application.

Response


{
  "response_map": {
    "application_id": "abc-123",
    "status": "created"
  },
  "http_status_code": 200
}
Key Type Description
application_id string The unique ID of the new application.
status string Always "created".

Get applications

GET https://{controlplane_path}/api/1/rest/public/service_application?org_name={org_name}

List APIM 3.0 Developer Portal applications and their details.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'GET' \
  'https://elastic.snaplogic.com/api/1/rest/public/service_application?org_name=my-environment&detailed=true&filter_by_user=true' \
  -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).
application_names array Optional. Filter by application names.
permissions array Optional. Filter by permission types.
detailed boolean Optional. Include subscription details. Default: false.
filter_by_user boolean Optional. Show only applications owned by the caller. Default: false.

Response


{
  "response_map": {
    "abc-123": {
      "application_name": "my-app",
      "created_by": "[email protected]",
      "permissions": { ... },
      "subscriptions": [ ... ]
    }
  },
  "http_status_code": 200
}
Key Type Description
<application_id> object An object keyed by application ID. Each value contains the fields below.
application_name string The name of the application.
created_by string The email address of the user who created the application.
permissions object The permission assignments for the application.
subscriptions array The list of subscriptions associated with the application. Included when detailed=true.

Delete application

DELETE https://{controlplane_path}/api/1/rest/public/service_application?org_name={org_name}&application_name={application_name}

Delete an APIM 3.0 Developer Portal application. Deleting an application also deletes all its subscriptions.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'DELETE' \
  'https://elastic.snaplogic.com/api/1/rest/public/service_application?org_name=my-environment&application_name=my-app' \
  -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).
application_name string Required. The name of the application to delete.

Response


{
  "response_map": {
    "application_id": "abc-123",
    "status": "deleted"
  },
  "http_status_code": 200
}
Key Type Description
application_id string The unique ID of the deleted application.
status string Always "deleted".

Error handling

HTTP status codes Message Resolution
401 Unauthorized Verify your credentials and APIM 3.0 Developer Portal authorization.
403 Not Allowed You do not have write permission for this application.
404 Not Found Verify the environment name and application name are correct.
409 Conflict An application with this name already exists.