With the HPE GreenLake APIs for Subscription Management you can add subscriptions, unclaim subscriptions, get subscription information, and update auto-subscription settings for your HPE GreenLake workspace.
HPE GreenLake APIs for Subscription Management (latest)
https://global.api.greenlake.hpe.com/
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription/
Request
Unclaim subscriptions in bulk by passing one or more subscription IDs.
Note: You must have edit permission for the Devices and Subscription service to use this API.
You can unclaim up to 10 subscriptions in a single request. This endpoint provides an asynchronous response and always returns 202 Accepted if basic input validation is successful. The Location header in the response contains the URI to check the progress of the unclaim task. For details about the status fetch URL, see Get progress or status of async operations in subscriptions
Rate limits apply to this endpoint. If the threshold is exceeded, the API returns a 429 Too Many Requests response.
Provide a list of subscription IDs to unclaim. The API endpoint supports unclaiming up to 10 subscriptions in a single request.
You can fetch the subscription IDs using the Get subscriptions of a workspace API.
- Url hostname
https://global.api.greenlake.hpe.com/subscriptions/v2beta1/subscriptions/bulk
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription/subscriptions/v2beta1/subscriptions/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
https://global.api.greenlake.hpe.com/subscriptions/v2beta1/subscriptions/bulk \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"id": "64343c3c-3016-4234-baee-765651aa4bb3"
},
{
"id": "64343c3c-3016-4234-baee-765651aa4bb4"
}
]
}'{ "code": 202, "status": "202 ACCEPTED", "transactionId": "5652cd26-d577-47cd-b075-8e94885a63ab" }