Subscription Management
You can manage subscriptions from the REST API provided by webMethods API Gateway. From this API you can create applications, view applications and get the application details for a specific package and plan. Alternatively, you can also use Developer Portal to manage subscriptions. To use the subscription APIs, you must have the Manage application permission.
webMethods 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. When the request is approved, the 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}
Update 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 that are created as applications. The API key is masked for all the subscriptions.
- GET/rest/apigateway/subscriptions/{applicationId}
Retrieves the details of a specific application. Provide the application ID as an 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. Provide the application ID of the required application as a 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. However, the from, size, and count parameters are optional. If you provide the from and sum parameters, the values that are specified in the from and number of records, which are specified in the size are fetched. If you set the count parameter to true, the API returns the number of records for specified query parameter.
- DELETE/rest/apigateway/subscriptions/{applicationId}
Deletes an application. Provide the application ID of the application to be deleted.