Skip to content

HPE GreenLake APIs for Device Management (latest)

With the HPE GreenLake APIs for Device Management you can view, manage, and onboard devices in your workspace. The API allows you to invoke any operation or task that is available through the HPE GreenLake edge-to-cloud platform user interface.

Download OpenAPI description
Languages
Servers
Mock server

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

Url hostname

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

Devices - v2beta1

Operations

Devices - v1

Operations

Devices - v1beta1

Operations

Get devices managed in a workspaceDeprecated

Request

With this API, you can:

  • Retrieve a list of devices managed in a workspace.
  • Filter devices based on conditional expressions.

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

Rate limits are enforced on this API. 160 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

The following examples are not an exhaustive list of all possible filtering options.

Examples:

Return devices with where a property equals a value. <property> eq <value>

filter=serialNumber eq 'STIAPL6404'

Return devices where a property does not equal a value not <property> eq <value>

filter=not serialNumber eq 'STIAPL6404'

Return devices with where a property greater or equal a value. <property> ge <value>

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

Return devices with where a property lesser or equal a value. <property> ge <value>

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

Return devices where property is populated and property contains value. <property> eq <value> and <property> eq <value>

filter=deviceType eq 'STORAGE' and partNumber eq 'RTICXL6413'

Return devices where property is populated and property contains value. <property> eq <value> or <property> eq <value>

filter=serialNumber eq 'STIAPL6404' or partNumber eq 'RTICXL6413'

Return devices where property is one of multiple values. <property> in <value>,<value>

filter=deviceType in 'COMPUTE', 'STORAGE'
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, in
Logical Expressionsand, or, not
Examples:

Return devices with where a tag key equal a tag value. <tagKey> eq <tagValue>

filter-tags='city' eq 'London'

Return devices with where a tag key does not equal a tag value. not <property> eq <value>

filter-tags=not 'city' eq 'Tokyo'

Return devices containing the tag key and the corresponding value. <property> eq <value> and <property> eq <value>

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

Return devices containing the tag key and the corresponding value. <property> eq <value> or <property> eq <value>

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

Return devices containing the tag key and at least one of the specified values. <property> in <value>,<value>

filter-tags='street' in 'Regent Street', 'Oxford Street', '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=serialNumber,macAddress 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=serialNumber,macAddress
limitinteger(int64)[ 1 .. 2000 ]

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

Default 2000
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/device-management/public/openapi/nbapi-inventory-latest/devices/v1beta1/devices \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful response

Headers
Deprecationstring

Wed, 15 Jan 2025 23:59:59 GMT

Sunsetstring

Tue, 15 Apr 2025 23:59:59 GMT

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

The unique identifier of the device.

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

Identifier of the a device component or part.

Example: "BHD31D9J"
items[].​serialNumberstringrequired

The serial number of the device.

Example: "AX17PR347J"
items[].​typestringrequired

The type of the resource.

Example: "devices/device"
items[].​macAddressstring^([0-9a-fA-F]{2})(:[0-9a-fA-F]{2}){5}$

The media access control (MAC) address of the device

Example: "21:01:18:21:12:22"
items[].​deviceTypestring

The category (type) the device belongs to.

Enum"ALS""AP""BLE"
items[].​assignedStatestring

The current assignment state of the device.

  • ASSIGNED_TO_ACTIVATE_CONFIG—The device was moved to the custom activate configuration.
  • ASSIGNED_TO_DEDICATED_PLATFORM—The device is used in a dedicated platform workspace.
  • ASSIGNED_TO_SERVICE—The device is assigned to a service.
  • UNASSIGNED—The device is available for service provisioning.
Enum"ASSIGNED_TO_ACTIVATE_CONFIG""ASSIGNED_TO_DEDICATED_PLATFORM""ASSIGNED_TO_SERVICE"
items[].​createdAtstring

Date and time the device was created in UTC.

Example: "2024-02-13T09:00:22.920Z"
items[].​updatedAtstring

Date and time the device was last updated in UTC.

Example: "2024-02-13T19:30:32.920Z"
items[].​modelstring

Hardware model of the device

Example: "COMPUTE"
items[].​archivedboolean

A boolean that indicates whether the device has been archived or not. Archived devices are no longer in service.

Example: false
items[].​applicationobject(ResponseApplication)
items[].​regionstring

The region of the application the device is provisioned in

Example: "us-west"
items[].​tagsobject
items[].​subscriptionArray of objects(ResponseSubscription)
items[].​tenantWorkspaceIdstring

The unique identifier of the tenant workspace belonging to an MSP. This field is populated only for MSP-owned inventory tenants (the MSP owns the devices and subscriptions and also manages the workspace on behalf of their customers).

Example: "3292c36d-30ef-4f26-823b-76b5d213b670"
items[].​locationobject(ResponseLocation)
items[].​warrantyobject(ResponseWarranty)

The warranty information for the device.

countinteger(int32)required

Number of items returned

Example: 10
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

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

Add devicesDeprecated

Request

Add one or more devices to a workspace. 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 the progress of the device addition task. For details about the status fetch URL, refer to the API Get progress or status of async operations in devices.

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

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

Security
Bearer
Bodyapplication/jsonrequired

Accepts a maximum of five devices per request, combining the count of network, compute, and storage devices.

computeArray of objects(RequestCompute)required
compute[].​partNumberstringrequired

Identifier of a product component or part.

compute[].​serialNumberstringrequired

The serial number of the device.

compute[].​tagsobject
networkArray of objects(RequestNetwork)required
network[].​macAddressstringrequired

The media access control (MAC) address of the device.

network[].​serialNumberstringrequired

The serial number of the device.

network[].​tagsobject
storageArray of objects(RequestStorage)required
storage[].​serialNumberstringrequired

The serial number of the device.

storage[].​partNumberstringrequired

The part number of the device.

storage[].​tagsobject
curl -i -X POST \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/device-management/public/openapi/nbapi-inventory-latest/devices/v1beta1/devices \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "network": [
      {
        "serialNumber": "string",
        "macAddress": "string"
      }
    ],
    "compute": [
      {
        "serialNumber": "string",
        "partNumber": "string"
      }
    ],
    "storage": [
      {
        "serialNumber": "string",
        "partNumber": "string"
      }
    ]
  }'

Responses

Request accepted

Headers
Deprecationstring

Wed, 15 Jan 2025 23:59:59 GMT

Sunsetstring

Tue, 15 Apr 2025 23:59:59 GMT

Locationstring

The URI of the accepted asynchronous operation resource

Example: "/devices/v1beta1/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

The unique identifier of the transaction.

Response
application/json
{ "code": 0, "status": "100 CONTINUE", "transactionId": "string" }

Update devicesDeprecated

Request

Update devices by passing one or more device IDs. The API currently supports:

  • Assigning and unassigning devices to and from a service.
  • Applying and removing subscriptions to and from devices.
To remove an application, set the id under application to null and 'region' to null. Set an empty array to the attribute subscription to remove a subscription.

Only one operation is supported in a single API call. For example, you cannot assign devices to an application and assign subscriptions to devices in a single API invocation. You can achieve this with two API calls.

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 to be invoked for fetching the progress of the device update task. For details about the status fetch URL, refer to the API Get progress or status of async operations in devices.

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

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

Security
Bearer
Query
idArray of stringsuniquerequired

Array of device resource IDs. Maximum five devices per request.

Example: id=05fc0c47-e517-5709-976e-c0b726977477&id=08a42d07-b144-5602-9a82-7927d6e44616
Bodyapplication/merge-patch+jsonrequired
subscriptionArray of objects(RequestSubscription)
applicationobject(RequestApplication)
regionstring

The region of the application the device is provisioned in.

tenantPlatformCustomerIdstring

The platform customer ID of the tenant.

curl -i -X PATCH \
  'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/device-management/public/openapi/nbapi-inventory-latest/devices/v1beta1/devices?id=05fc0c47-e517-5709-976e-c0b726977477%26id%3D08a42d07-b144-5602-9a82-7927d6e44616' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{}'

Responses

Request accepted

Headers
Deprecationstring

Wed, 15 Jan 2025 23:59:59 GMT

Sunsetstring

Tue, 15 Apr 2025 23:59:59 GMT

Locationstring

The URI of the accepted asynchronous operation resource

Example: "/devices/v1beta1/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

The unique identifier of the transaction.

Response
application/json
{ "code": 0, "status": "100 CONTINUE", "transactionId": "string" }

Get device informationDeprecated

Request

Get details on a specific device by passing its resourceId.

NOTE: You need view permissions for device management to invoke this API.

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

Security
Bearer
Path
idstringrequired

The unique identifier (uuid) of the device.

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

Responses

Successful response

Headers
Deprecationstring

Wed, 15 Jan 2025 23:59:59 GMT

Sunsetstring

Tue, 15 Apr 2025 23:59:59 GMT

Bodyapplication/json
idstring[ 0 .. 36 ] charactersrequired

The unique identifier of the device.

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

Identifier of the a device component or part.

Example: "BHD31D9J"
serialNumberstringrequired

The serial number of the device.

Example: "AX17PR347J"
typestringrequired

The type of the resource.

Example: "devices/device"
macAddressstring^([0-9a-fA-F]{2})(:[0-9a-fA-F]{2}){5}$

The media access control (MAC) address of the device

Example: "21:01:18:21:12:22"
deviceTypestring

The category (type) the device belongs to.

Enum"ALS""AP""BLE"
assignedStatestring

The current assignment state of the device.

  • ASSIGNED_TO_ACTIVATE_CONFIG—The device was moved to the custom activate configuration.
  • ASSIGNED_TO_DEDICATED_PLATFORM—The device is used in a dedicated platform workspace.
  • ASSIGNED_TO_SERVICE—The device is assigned to a service.
  • UNASSIGNED—The device is available for service provisioning.
Enum"ASSIGNED_TO_ACTIVATE_CONFIG""ASSIGNED_TO_DEDICATED_PLATFORM""ASSIGNED_TO_SERVICE"
createdAtstring

Date and time the device was created in UTC.

Example: "2024-02-13T09:00:22.920Z"
updatedAtstring

Date and time the device was last updated in UTC.

Example: "2024-02-13T19:30:32.920Z"
modelstring

Hardware model of the device

Example: "COMPUTE"
archivedboolean

A boolean that indicates whether the device has been archived or not. Archived devices are no longer in service.

Example: false
applicationobject(ResponseApplication)
regionstring

The region of the application the device is provisioned in

Example: "us-west"
tagsobject
subscriptionArray of objects(ResponseSubscription)
tenantWorkspaceIdstring

The unique identifier of the tenant workspace belonging to an MSP. This field is populated only for MSP-owned inventory tenants (the MSP owns the devices and subscriptions and also manages the workspace on behalf of their customers).

Example: "3292c36d-30ef-4f26-823b-76b5d213b670"
locationobject(ResponseLocation)
warrantyobject(ResponseWarranty)

The warranty information for the device.

Response
application/json
{ "id": "64343c3c-3016-4234-baee-765651aa4bb3", "macAddress": "21:01:18:21:12:22", "serialNumber": "AX17PR347J", "partNumber": "BHD31D9J", "type": "devices/device", "deviceType": "ALS", "assignedState": "ASSIGNED_TO_ACTIVATE_CONFIG", "createdAt": "2024-02-13T09:00:22.920Z", "updatedAt": "2024-02-13T19:30:32.920Z", "model": "COMPUTE", "archived": false, "application": { "id": "0892c36d-40df-4f26-923b-76b5d213b420", "resourceUri": "/service-catalog/v1beta1/service-managers/0892c36d-40df-4f26-923b-76b5d213b420" }, "region": "us-west", "tags": { "property1": "string", "property2": "string" }, "subscription": [ {} ], "tenantWorkspaceId": "3292c36d-30ef-4f26-823b-76b5d213b670", "location": { "id": "57f2b22e-7923-497b-8120-fd2b94579f13", "resourceUri": "/locations/v1beta1/locations/57f2b22e-7923-497b-8120-fd2b94579f13" }, "warranty": { "country": "string", "currentSupportLevel": {}, "supportLevels": [] } }

Get progress or status of async operations in devicesDeprecated

Request

The add and update device APIs are asynchronous. Use this API to find the status of the asynchronous add and update operations.

An asynchronous resource tracks 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.

The TIMEOUT state indicates that the operation was 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 devices, a breakdown of succeeded devices and failed devices, if there are any, will be returned as the response. In this case, the device serial number identifies each device.

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

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

Security
Bearer
Path
idstringrequired

The unique identifier of an asynchronous API operation.

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

Responses

Successful response

Headers
Deprecationstring

Wed, 15 Jan 2025 23:59:59 GMT

Sunsetstring

Tue, 15 Apr 2025 23:59:59 GMT

Bodyapplication/json
idstringrequired

The unique identifier of the device.

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

The type of the resource

Example: "devices/asyncOperation"
statusstring

The current status of an asynchronous operation.

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

Date and time the asynchronous operation began in UTC format.

endedAtstring(date-time)

Date and time the asynchronous operation ended in UTC format.

progressPercentinteger(int32)

A number that indicates how close to completion the asynchronous operation is.

suggestedPollingIntervalSecondsinteger(int32)

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

timeoutMinutesinteger(int32)

The number of minutes it took for the operation to time out.

resultobject

An array that provides information on successful or unsuccessful operations.

resultTypestring

Relates individual devices to a result type. A result type declares if an operation was successful or unsuccessful.

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-4f26-823b-76b5d213b670", "type": "devices/asyncOperation" }