Adding Devices and Subscription to MSP Inventory
Add and claim devices and subscriptions in your MSP GreenLake inventory using the HPE GreenLake Platform (GLP) API.
Prerequisites
This guide requires a valid GLP token created at the MSP level. See Token Exchange for how to generate one.
Devices and subscriptions must be added to your MSP GreenLake inventory before they can be assigned to any tenant.
The MSP inventory acts as a shared pool. Assets added here are available to assign to any tenant workspace
you manage. This guide covers adding both devices and subscriptions to that pool and verifying they appear correctly.
MSP Inventory vs Tenant Inventory
Understanding the difference matters before you add devices, because the model affects how devices
are managed across tenants.
| Model | Who Holds the Device | Reassignable? |
|---|---|---|
| MSP-owned | MSP workspace | Yes, can be moved between tenants |
| Tenant-owned | Tenant workspace | No, devices & subscription will remain in the tenant workspace |
Devices and subscriptions added to MSP inventory in this guide are MSP-owned inventory.
Adding Devices
Step 1: Add Device(s) to MSP Inventory
Send a POST request to the GLP device add endpoint with your device's serial number & mac address.
curl -i -X POST \
https://global.api.greenlake.hpe.com/devices/v1/devices \
-H 'Authorization: Bearer <YOUR_MSP_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"network": [
{
"serialNumber": "string",
"macAddress": "string"
}
]
}'
A successful response returns HTTP 202 with an attribute Location in Response header containing the URI to poll for the async operation status.
HTTP/1.1 202 Accepted
Location: /devices/v1/async-operations/3fa85f64-5717-4562-b3fc-2c963f66afa6
Extract the transaction ID from the Location header (e.g., 3fa85f64-5717-4562-b3fc-2c963f66afa6) to use in Step 2.
API Reference
Step 2: Verify Device Addition operation is successful
The device addition is async. Poll the URI from the Location header in Step 1 using the extracted transaction ID until the status is COMPLETED.
curl -i -X GET \
'https://global.api.greenlake.hpe.com/devices/v1/async-operations/{transactionId}' \
-H 'Authorization: Bearer <YOUR_MSP_TOKEN>'
While the operation is running:
{
"status": "RUNNING",
"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"
}
Once complete & successful, this should be the response:
{
"status": "COMPLETED",
"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"
}
If the operation returns a failure state such as FAILED or TIMED_OUT, inspect the response body for the error details, confirm the serial number and MAC address are correct, and then retry the request. If the initial POST request returns an HTTP 4xx or 5xx, resolve the request error before polling.
API Reference
HPE GreenLake API - Get progress or status of async operations in devices
Adding Subscriptions
Step 1: Add Subscription to MSP Inventory
Send a POST request to the GLP subscription add endpoint with your subscription key.
curl -i -X POST \
https://global.api.greenlake.hpe.com/subscriptions/v1/subscriptions \
-H 'Authorization: Bearer <YOUR_MSP_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"subscriptions": [
{
"key": "string"
}
]
}'
A successful response returns HTTP 202 with an attribute Location in Response header containing the URI to poll for the async operation status.
HTTP/1.1 202 Accepted
Location: /subscriptions/v1/async-operations/3fa85f64-5717-4562-b3fc-2c963f66afa6
Extract the transaction ID from the Location header (e.g., 3fa85f64-5717-4562-b3fc-2c963f66afa6) to use in Step 2.
API Reference
Step 2: Verify Subscription Addition operation is successful
The subscription addition is async. Poll the URI from the Location header in the previous step using the extracted transaction ID until the status is COMPLETED.
curl -i -X GET \
'https://global.api.greenlake.hpe.com/subscriptions/v1/async-operations/{transactionId}' \
-H 'Authorization: Bearer <YOUR_MSP_TOKEN>'
While the operation is running:
{
"status": "RUNNING",
"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": "subscriptions/asyncOperation"
}
Once complete & successful, this should be the response:
{
"status": "COMPLETED",
"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": "subscriptions/asyncOperation"
}
If the operation returns a failure state such as FAILED or TIMED_OUT, inspect the response body for the error details, confirm the subscription key is valid for the MSP workspace, and then retry the request. If the initial POST request returns an HTTP 4xx or 5xx, resolve the request error before polling.
API Reference
HPE GreenLake API - Get progress or status of async operations in subscriptions
Next Steps
After the device or subscription shows a COMPLETED status, verify that it appears in the MSP inventory in GreenLake. Once confirmed, continue with your tenant assignment workflow to move the asset into the correct tenant workspace.
Updated about 14 hours ago