API Gateway 10.11 | Using API Gateway | REST APIs in API Gateway | Subscription Management
 
Subscription Management
You can manage subscriptions from the REST API provided by API Gateway. This API allows you to create application, view applications, get the application details for a specific package and plan, and so on. Alternatively, you can also use Developer Portal to manage subscriptions. To use the subscription APIs, you must have the manage application permission.
API Gateway provides the following REST API and the resources to manage subscriptions:
*POST/rest/apigateway/subscriptions. Creates a subscription and generates an audit log event. The newly generated event is returned. If the approval is enabled, the application details are returned without the API key. Once the request is approved, user can get subscription details and can view the access key. If the approval is not enabled, then the response contains all the application details, except for the API key. The API key is masked and only the requester can view it.
*PUT/rest/apigateway/subscriptions/{applicationId}. Updates the subscription details. You can change the package and plan of a subscription. This API can be used only to update the package and plan details.
*GET/rest/apigateway/subscriptions. Retrieves the subscriptions created as applications. The API key is masked for all the subscriptions.
*GET/rest/apigateway/subscriptions/{applicationId}. Retrieves the details of a specific application. You must provide the application ID as input parameter.
*GET/rest/apigateway/subscriptions?packageId={packageId}&planId={planId}. Retrieves the application details for a specific combination of package and plan.
*GET/rest/apigateway/subscriptions/usage. Retrieves the subscription usage details of all the subscriptions for the current cycle of only the existing subscriptions.
*GET/rest/apigateway/subscriptions/{applicationId}/usage. Retrieves the usage details for a specific application. You must provide the application ID of the required application, as an parameter.
GET/rest/apigateway/subscriptions/usage?name={applicationName}&
package={packageName}&plan={planName}&from={startingIndexOfSearchResult}&
size={numberOfRecordsToFetch}&count={boolean}
. Retrieves the usage details for a specific application's package and plan. The package name, application name, and plan name are given as input parameters. The from, size, and, count parameters are optional. If you provide the from and sum parameters, the values specified in the from and number of records, specified in the size are fetched. If you set the count parameter to true, the API returns number of records for specified query parameter.
*DELETE/rest/apigateway/subscriptions/{applicationId}. Deletes an application. You must provide the application ID of the application to be deleted.
For details about the REST API, see https://github.com/SoftwareAG/webmethods-api-gateway/blob/10.11/apigatewayservices/APIGatewayApplication.json.