Skip to content

HPE GreenLake APIs for Subscription Management (latest)

With the HPE GreenLake APIs for Subscription Management you can add subscriptions, get subscription information, and update auto-subscription settings for your HPE GreenLake workspace.

Download OpenAPI description
Languages
Servers
Mock server

https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/

Url hostname

https://global.api.greenlake.hpe.com/

Subscriptions - v1

Operations

Add subscriptions

Request

Add one or more subscriptions to a workspace.

NOTE: You need to have the edit permission for the Devices and Subscription service to invoke this API.

This API provides an asynchronous response and will always return 202 Accepted if basic input validations are successful. The location header in the response provides the URI to be invoked for fetching progress of the subscription addition task. For details about the status fetch URL, refer to the API Get progress or status of async operations in subscriptions.

Rate limits are enforced on this API. Four requests per minute is supported per workspace, and the API returns a 429 status code if this threshold is breached.

Security
Bearer
Query
dry-runboolean

The dry-run query parameter is used to perform the resource update operation (POST, PUT, PATCH, DELETE) and return a response as if the operation had completed, but without actually creating, updating, or deleting the resource. This allows you to test if the request would succeed before making the change. If set to true, the request is validated but not executed.

Default false
Bodyapplication/jsonrequired

Maximum five subscriptions per request.

subscriptionsArray of objects(RequestPostSubscription)required

An array of subscription keys.

subscriptions[].​keystringrequired

A subscription key.

subscriptions[].​tagsobject
curl -i -X POST \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/subscriptions/v1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "subscriptions": [
      {
        "key": "string"
      }
    ]
  }'

Responses

Request accepted

Headers
Locationstring

The URI of the accepted asynchronous operation resource.

Example: "/subscriptions/v1/async-operations/22d6fbfb-d253-4455-984a-356da827e5fc"
Bodyapplication/json
codeinteger(int32)required

Three digit HTTP status code.

statusstringrequired

Three digit HTTPS status code and message.

Enum"100 CONTINUE""101 SWITCHING_PROTOCOLS""102 PROCESSING"
transactionIdstringrequired
Response
application/json
{ "code": 0, "status": "100 CONTINUE", "transactionId": "string" }

Update subscriptions

Request

Update subscriptions by passing one or more subscription IDs. Currently, the API supports adding and removing the tags for subscriptions. For each tag provided in the request body:

  • Tags are created and inserted into the specified subscriptions if the provided tags do not map to null and are not already present.

  • Tags are updated with the provided if the provided tag key is already present in a subscription, but the provided value differs from the existing value.

  • Tags are removed from subscriptions when a tag key is mapped to a null tag value. The tags are removed from any subscription with a matching tag with the same key.

This API provides an asynchronous response and returns 202 Accepted if basic input validations are successful. The location header in the response provides the URI used to fetch the progress of the subscription update task. For details about the status fetch URL, see Get progress or status of async operations in subscriptions.

Rate limits are enforced on this API. Five requests per minute are supported per workspace, and the API returns 429 if this threshold is breached.

NOTE: To call this API, you need edit permissions for the Devices and Subscription service.

Security
Bearer
Query
idArray of strings(UUID)uniquerequired

Subscription resourceIDs.

Examples:
id=05fc0c47-e517-5709-976e-c0b726977477&id=08a42d07-b144-5602-9a82-7927d6e44616
dry-runboolean

The dry-run query parameter is used to perform the resource update operation (POST, PUT, PATCH, DELETE) and return a response as if the operation had completed, but without actually creating, updating, or deleting the resource. This allows you to test if the request would succeed before making the change. If set to true, the request is validated but not executed.

Default false
Bodyapplication/merge-patch+jsonrequired

Provide a map of tags to create or delete for the given subscriptionID (or multiple subscriptionID's).

Tags are saved with the character casing preserved (uppercase, lowercase, mixed, and so on). However, tag searching is not case-sensitive. For example, adding a new tag with the key Location will fail if the subscription already has a tag with the key LOCATION as they are considered the same key.

Tag keys and tag values can comprise letters, numbers, spaces (represented in UTF-8), and only the characters: _, ., :, =, +, -, and @.

NOTE: Do not store sensitive data, such as personally identifiable information, in tags.

tagsobjectrequired
tags.​property name*object[ 1 .. 50 ] propertiesadditional property
curl -i -X PATCH \
  'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/subscriptions/v1/subscriptions?id=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{
    "tags": {
      "location": "San Jose",
      "purchase month": "April 2023",
      "Setup Option": "Default"
    }
  }'

Responses

Request accepted

Headers
Locationstring

The URI of the accepted asynchronous operation resource.

Example: "/subscriptions/v1/async-operations/22d6fbfb-d253-4455-984a-356da827e5fc"
Bodyapplication/json
codeinteger(int32)required

Three digit HTTP status code.

statusstringrequired

Three digit HTTPS status code and message.

Enum"100 CONTINUE""101 SWITCHING_PROTOCOLS""102 PROCESSING"
transactionIdstringrequired
Response
application/json
{ "code": 0, "status": "100 CONTINUE", "transactionId": "string" }

Get subscriptions of a workspace

Request

Get subscriptions managed in a workspace. Filters can be passed to filter the subscriptions based on conditional expressions.

NOTE: You need to have view permission for the Devices and subscription service to invoke this API.

Rate limits are enforced on this API. 60 requests per minute is supported per workspace. API will result in 429 if this threshold is breached.

Security
Bearer
Query
filterstring

Filter expressions consisting of simple comparison operations joined by logical operators.

CLASSEXAMPLES
Typesinteger, decimal, timestamp, string, boolean, null
Comparisoneq, ne, gt, ge, lt, le, in
Logical Expressionsand, or, not

Subscriptions can be filtered based on the following properties:

  • id
  • subscriptionType
  • subscriptionStatus
  • key
  • quantity
  • availableQuantity
  • sku
  • skuDescription
  • contract
  • startTime
  • endTime
  • productType
  • tier
  • createdAt
  • updatedAt

The following is a non-exhaustive list of possible filtering options.

Examples:

Return subscriptions where a property equals a value. Example syntax, <property> eq <value>.

filter=key eq 'STIAPL6404'

Return subscriptions where a property does not equate to a value. Example syntax, <property> ne <value>.

filter=tier ne 'BRIDGE'

Return subscriptions where a property does not equal a value. Example syntax, not <property> eq <value>.

filter=not key eq 'STIAPL6404'

Return subscriptions where a property is greater or equal to a value. Example syntax, <property> ge <value>.

filter=createdAt ge '2024-01-18T19:53:51.480Z'

Return subscriptions where a property is less than or equal to a value. Example syntax, <property> le <value>.

filter=updatedAt le '2024-02-18T19:53:51.480Z'

The AND operator returns results that meet all filter queries. In the example, the query only returns subscriptions with the exact key and with the specified subscription type. Example syntax, <property> eq <value> and <property> eq <value>.

filter=key eq 'STIQQ4L04' and subscriptionType eq 'CENTRAL_STORAGE'

The OR operator returns results that meet any of the filter queries. In the example, the query returns subscriptions with the exact key or with the specified subscription type.

filter=key eq 'STIQQ4L04' or subscriptionType eq 'CENTRAL_STORAGE'

Return subscriptions where the property is one of multiple values. Example syntax, <property> in <value>,<value>.

filter=subscriptionType in 'CENTRAL_STORAGE', 'CENTRAL_CONTROLLER'

The AND, OR, and NOT operators can be combined to return results that satisfy all specified filter criteria.

filter=startTime gt '2024-01-23T00:00:00.000Z' and endTime lt '2025-02-22T00:00:00.000Z' and not productType eq 'SERVICE'
filter-tagsstring

Filter expressions consisting of simple comparison operations joined by logical operators to be applied on the assigned tags or their values.

CLASSEXAMPLES
Typesstring
Comparisoneq, ne
Logical Expressionsand, or
Examples:

Return subscriptions that have a pair of tags with the exact same tag key and tag value. Example syntax, <tagKey> eq <tagValue>.

filter-tags='city' eq 'London'

Return subscriptions that have a pair of tags with the exact same tag key and the exact different tag value. Example syntax, <tagKey> ne <tagValue>.

filter-tags='city' ne 'London'

Return subscriptions containing the tag key and the corresponding value that satisfy all conditionals. Example syntax, <property> eq <value> and <property> eq <value>.

filter-tags='city' eq 'London' and 'street' eq 'Piccadilly'

Return subscriptions containing the tag key and the corresponding value that satisfy at least one of the conditionals. Example syntax, <property> eq <value> or <property> eq <value>.

filter-tags='street' eq 'Oxford Street' or 'street' eq 'Piccadilly'
sortstring

A comma separated list of sort expressions. A sort expression is a property name optionally followed by a direction indicator asc or desc. The default is ascending order.

Example: sort=key, quote desc
selectArray of stringsunique

A comma separated list of select properties to display in the response. The default is that all properties are returned.

Example: select=id,key
limitinteger(int64)[ 1 .. 50 ]

Specifies the number of results to be returned. The default value is 50.

Default 50
offsetinteger(int64)

Specifies the zero-based resource offset to start the response from. The default value is 0.

Default 0
curl -i -X GET \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/subscriptions/v1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful response

Bodyapplication/json
itemsArray of objects(V1Beta1SubscriptionDetail)required
items[].​idstring[ 0 .. 36 ] charactersrequired

The primary unique identifier of the subscription.

Example: "64343c3c-3016-4234-baee-765651aa4bb3"
items[].​typestringrequired

The type of the resource.

Example: "subscriptions/subscription"
items[].​subscriptionTypestring

Type of the subscription.

Enum"CENTRAL_AP""CENTRAL_SWITCH""CENTRAL_CONTROLLER"
items[].​subscriptionStatusstring

The status of the subscription. This property indicates if the subscription is started, ended, suspended, cancelled, or locked.

Enum"STARTED""ENDED""SUSPENDED"
items[].​createdAtstring

Time of subscription creation.

Example: "2024-02-07T11:20:35.290Z"
items[].​updatedAtstring

Time when subscription was last updated.

Example: "2024-02-07T11:22:35.290Z"
items[].​keystring

The subscription key.

items[].​quantitystring

Total quantity of the subscription

Example: 20
items[].​availableQuantitystring

Available quantity of the subscription.

Example: 10
items[].​isEvalboolean

A boolean that states if the subscription is an evaluation subscription or not.

items[].​skustring

The stock keeping unit (SKU).

items[].​skuDescriptionstring

A description of the stock keeping unit.

items[].​contractstring
items[].​startTimestring

Start time of the subscription.

Example: "2024-04-01T00:00:00.000Z"
items[].​endTimestring

End time of the subscription.

Example: "2024-04-30T00:00:00.000Z"
items[].​tagsobject
items[].​productTypestring

Product type of the subscription.

Enum"DEVICE""SERVICE""MANDATORY_ATTACHED"
items[].​tierstring

Tier of the subscription.

Enum"AP Device - DM""Switch Device - DM""Service"
countinteger(int32)required

The number of items returned.

Example: 30
offsetinteger(int32)

Zero-based resource offset.

Example: 0
totalinteger(int32)

Total number of items in the collection that match the filter query, if one was provided in the request otherwise total number of items for a given resource.

Example: 100
Response
application/json
{ "items": [ {} ], "count": 30, "offset": 0, "total": 100 }

Get information on a subscription

Request

Get detailed information for a single subscription by id.

NOTE: You need to have the view permission of device management to invoke this API.

Rate limits are enforced on this API. 20 requests per minute is supported per workspace. The API returns 429 if this threshold is breached.

Security
Bearer
Path
idstringrequired

The unique identifier of the subscription.

curl -i -X GET \
  'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/subscriptions/v1/subscriptions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful response

Bodyapplication/json
idstring[ 0 .. 36 ] charactersrequired

The primary unique identifier of the subscription.

Example: "64343c3c-3016-4234-baee-765651aa4bb3"
typestringrequired

The type of the resource.

Example: "subscriptions/subscription"
subscriptionTypestring

Type of the subscription.

Enum"CENTRAL_AP""CENTRAL_SWITCH""CENTRAL_CONTROLLER"
subscriptionStatusstring

The status of the subscription. This property indicates if the subscription is started, ended, suspended, cancelled, or locked.

Enum"STARTED""ENDED""SUSPENDED"
createdAtstring

Time of subscription creation.

Example: "2024-02-07T11:20:35.290Z"
updatedAtstring

Time when subscription was last updated.

Example: "2024-02-07T11:22:35.290Z"
keystring

The subscription key.

quantitystring

Total quantity of the subscription

Example: 20
availableQuantitystring

Available quantity of the subscription.

Example: 10
isEvalboolean

A boolean that states if the subscription is an evaluation subscription or not.

skustring

The stock keeping unit (SKU).

skuDescriptionstring

A description of the stock keeping unit.

contractstring
startTimestring

Start time of the subscription.

Example: "2024-04-01T00:00:00.000Z"
endTimestring

End time of the subscription.

Example: "2024-04-30T00:00:00.000Z"
tagsobject
productTypestring

Product type of the subscription.

Enum"DEVICE""SERVICE""MANDATORY_ATTACHED"
tierstring

Tier of the subscription.

Enum"AP Device - DM""Switch Device - DM""Service"
Response
application/json
{ "id": "64343c3c-3016-4234-baee-765651aa4bb3", "type": "subscriptions/subscription", "subscriptionType": "CENTRAL_AP", "subscriptionStatus": "STARTED", "createdAt": "2024-02-07T11:20:35.290Z", "updatedAt": "2024-02-07T11:22:35.290Z", "key": "string", "quantity": 20, "availableQuantity": 10, "isEval": true, "sku": "string", "skuDescription": "string", "contract": "string", "startTime": "2024-04-01T00:00:00.000Z", "endTime": "2024-04-30T00:00:00.000Z", "tags": { "property1": "string", "property2": "string" }, "productType": "DEVICE", "tier": "AP Device - DM" }

Get progress or status of async operations in subscriptions

Request

Use this API to find the status of the asynchronous Add and update subscriptions API.

An asynchronous resource is generated to track the status of an asynchronous operation. An asynchronous resource that has reached a terminal state (SUCCEEDED, FAILED, TIMEOUT) will no longer be accessible 24 hours after reaching the terminal state.

An asynchronous resource is set to the TIMEOUT state if the resource has been in an INITIALIZED or RUNNING state for a period greater than the timeout set. If an asynchronous operation resource coming from an asynchronous request consists of multiple subscriptions, a breakdown of succeeded subscriptions and failed subscriptions, if there are any, is returned as the response. In this case, the subscription key identifies each subscription.

Note: You need view permissions for the Devices and Subscription service to invoke this API.

Rate limits are enforced on this API. 30 requests per minute is supported per workspace. The API returns 429 if this threshold is breached.

Security
Bearer
Path
idstringrequired

The unique identifier returned by an asynchronous API operation.

curl -i -X GET \
  'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/subscription-management/public/openapi/nbapi-subscription-latest/subscriptions/v1/async-operations/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful response

Bodyapplication/json
idstringrequired

The unique identifier of the asynchronous operation.

Example: "3292c36d-30ef-4£26-823b-76b5d213b670"
typestringrequired

The type of the resource.

Example: "subscriptions/asyncOperation"
statusstring

The current status of the asynchronous operation.

Enum"INITIALIZED""RUNNING""FAILED"
startedAtstring(date-time)

Time the asynchronous operation started.

endedAtstring(date-time)

Time the asynchronous operation ended.

progressPercentinteger(int32)

Percentage completion of the asynchronous operation.

suggestedPollingIntervalSecondsinteger(int32)

The suggested time to wait (in minutes) before calling the operation again.

timeoutMinutesinteger(int32)

The number of minutes before the operation will time out.

resultobject

An array that provides information on successful or unsuccessful operations.

resultTypestring

Relates individual subscriptions to a result category that indicates successfull or unsuccessful operations

Response
application/json
{ "status": "INITIALIZED", "startedAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "progressPercent": 0, "suggestedPollingIntervalSeconds": 0, "timeoutMinutes": 0, "result": {}, "resultType": "string", "id": "3292c36d-30ef-4£26-823b-76b5d213b670", "type": "subscriptions/asyncOperation" }

Subscriptions - v1alpha1

Operations

Subscriptions - v1beta1

Operations

Auto Subscriptions settings - v1alpha1

Operations

Auto Subscriptions settings - v1

Operations