Onboarding a Customer
This page goes over the API calls / steps that you need to make to onboard a new customer in your MSP account.
Prerequisites
- Groups required for the customer should be already created in HPE Aruba Networking Central.
- Devices & Licenses that are needed for the customer should be already added to the MSP device inventory.
- Domain URL of the API Gateway of the MSP account. A table of domain URLs based on location can be found in this section
- Access Token should be provided in 'Authorization' header while making API calls. Steps to obtain access token can be found in this section
1. Creating the Customer Account
The first step is to create the customer account. This API creates a customer account on the GreenLake Cloud Platform(GLCP) & automatically provisions an HPE Aruba Networking Central application instance in the newly created customer account.
Deprecated Create a new customer API
v1 of this API has now been deprecated. Please use the v2 of this API. to onboard customers.
API Endpoint: /msp_api/v2/customers
API Method: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
Request Body Params: customer_name
, country_name
, US
, address
, zip_postal_code
, group
, description
, lock_msp_ssids
{
"customer_name": "Coffee Shop",
"country_name": "US",
"address": {
"street_address": "6280 America Center Dr",
"city": "San Jose",
"state": "California"
},
"zip_postal_code": "95002",
"group": {
"name": "default"
},
"description": "Description",
"lock_msp_ssids": false
}
{
"status": "success"
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/msp_api/v1/customers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Access_Token>' \
--data '{
"customer_name": "Coffee Shop",
"country_name": "US",
"address": {
"street_address": "6280 America Center Dr",
"city": "San Jose",
"state": "California"
},
"zip_postal_code": "95002",
"group": {
"name": "coffee_shop_group"
},
"description": "Located at 15th and T Street",
"lock_msp_ssids": false
}'
Note
In this example, "coffee_shop_group" is the name of configuration group that was created at the MSP level. This group will be the default group for this newly created customer. You can find more details on how to create a MSP level group here
Get the Customer ID of the new Customer
Once you have created the customer on HPE Aruba Networking Central, you need the customer_id of the customer to make certain API calls. You can utilize this API to get that information
API Endpoint: /msp_api/v1/customers?limit=10&customer_name=Coffee_Shop
where "Coffee_Shop" is the name of the customer
API Method: GET
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
{
"customers": [
{
"account_status": "NO_SUBSCRIPTION_PRESENT",
"account_type": "TENANT",
"ap_config_diff": null,
"application_id": "91d57b0f-8d6e-47b9-b8cb-a22b49d75f55",
"application_instance_id": "609298b9-70aa-4a51-ab3e-da50fb56b28d",
"created_at": 1627570464,
"customer_id": "c28e58012ae54724b54416a0b1c2d3e5",
"customer_name": "Coffee Shop",
"description": "Located at 15th and T Street",
"device_quota": 0,
"group": {
"id": 313,
"name": "coffee_shop_group"
},
"hppc_config_diff": null,
"lock_msp_ssids": false,
"msp_conversion_status": null,
"msp_id": "245b3976b42841e0b1eab5d28ce88fc0",
"platform_customer_details": {
"address": {
"city": "blr",
"country_code": "IN",
"state_or_region": "Karnataka",
"street_address": "blr ",
"zip": "560090"
},
"company_name": "Aruba-Tenant2",
"created_by": "[email protected]",
"customer_logo": {
"logo": null,
"logo_filename": null
},
"defaulted_country_code": null,
"description": "Description",
"email": "[email protected]",
"phone_number": "+91-123456789"
},
"platform_customer_id": "91c2765642bd11ec95ff0a58717cdef2",
"provision_status": "PROVISIONED",
"region": "us-west",
"switch_config_diff": null,
"updated_at": "2021-11-11T07:04:10.354126",
"username": "[email protected]"
},
curl --request GET 'https://<API_GATEWAY_BASE_URL>/msp_api/v1/customers?limit=10&customer_name=<CUSTOMER_NAME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Access_Token>'
From the response body, take note of the customer_id
value. You will need this customer_id value to make API calls relevant to the newly created customer.
2. Moving Devices to the Customer Account
Once you have successfully created the account, you can now move devices to the customer account. You need the customer ID of the newly created customer for this step. You can find that information with the above mentioned API.
Note
You can only move devices to the customer account that are already part of the MSP device inventory. You can add devices to the MSP inventory using the following API call - Add device using Mac and Serial Number
API Endpoint: /msp_api/v1/customers/<customer_id>/devices
API Method:: PUT
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
Request Body Params: devices
, group
{
"devices": [
{
"serial": "BT000001",
"mac": "00:11:AA:BB:33:CC"
},
{
"serial": "BT000002",
"mac": "00:11:AA:BB:33:DD"
}
],
"group": "default"
}
{
"errorcode": null,
"status": "success",
"status_code": 200
}
curl --request PUT 'https://<API_GATEWAY_BASE_URL>/msp_api/v1/customers/<CUSTOMER_ID>/devices' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Access_Token>' \
--data-raw '{
"devices": [
{
"serial": "BT000001",
"mac": "00:11:AA:BB:33:CC"
},
{
"serial": "BT000002",
"mac": "00:11:AA:BB:33:DD"
}
],
"group": "default"
}'
Verify that the devices have been allocated to the customer
You can use the below-mentioned API to verify that the devices have been successfully allocated to the customer account.
API Endpoint: /msp_api/v1/customers/<customer_id>/devices?limit=10
API Method:: GET
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
{
"deviceList": {
"activate_credentials_used": true,
"devices": [
{
"aruba_part_no": "AP-203RP-US",
"customer_id": "c28e58012ae54724b54416a0b1c2d3e5",
"customer_name": "Tenant-1",
"device_type": "AP",
"imei": "",
"macaddr": "00:11:AA:BB:33:CC",
"model": "AP-203RP-US",
"serial": "BT000001",
"services": [],
"tier_type": ""
},
{
"aruba_part_no": "IAP-115-US",
"customer_id": "c28e58012ae54724b54416a0b1c2d3e5",
"customer_name": "Tenant-1",
"device_type": "AP",
"imei": "",
"macaddr": "00:11:AA:BB:33:DD",
"model": "IAP-115-US",
"serial": "BT000002",
"services": [],
"tier_type": ""
}
],
"enable_device_sync": true,
"enable_hardware_sync": false,
"license_expired": false,
"next_sync_available": 0,
"total_devices": 2
},
"status": "success"
}
curl --request GET 'https://<API_GATEWAY_BASE_URL>/msp_api/v1/customers/<CUSTOMER_ID/devices?limit=10' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Access_Token>' \
--data-raw '{
"devices": [
{
"serial": "BT000001",
"mac": "00:11:AA:BB:33:CC"
},
{
"serial": "BT000002",
"mac": "00:11:AA:BB:33:DD"
}
],
"group": "default"
}'
Unassign & move device back to MSP inventory
You can use the same API as mentioned here to move devices from the customer accounts back to the MSP inventory. You need to use the MSP Customer ID in the customer ID section. When the device is moved back to the MSP inventory, it license also gets automatically unassigned.
API Endpoint: msp_api/v1/customers/<msp_customer_id>/devices
API Method:: PUT
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
{
"devices": [
{
"serial": "BT000001",
"mac": "00:11:AA:BB:33:CC"
},
]
}
{
"errorcode": null,
"status": "success",
"status_code": 200
}
curl --request PUT 'https://<API_GATEWAY_BASE_URL>/msp_api/v1/customers/<MSP_CUSTOMER_ID>/devices' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"devices": [
{
"serial": "BT000001",
"mac": "00:11:AA:BB:33:CC"
},
]
}'
3. Licensing
Once you have moved the devices to the customer account, you need to license the devices. There are several approaches you can take for licensing the devices.
- Enabling Auto-Assign Licensing for Customer Account
- Assign Licenses to Customer Account
- Assign Licenses to Device
Enabling Auto-Assign Licensing for Customer Account
Enabling Auto-Assign Licenses for the customer account will automatically assign available licenses to all of the devices in the customer account. When you enable this option, you must specify the preferred license type as either Foundation or Advanced. Once this feature is enabled, when new devices are added to the customer, they will be assigned licenses automatically.
Note
If auto-assign is enabled for a customer account -
- New devices added to the customer account will be assigned licenses from the MSP inventory automatically
- If a license expires for a device in a customer account, a new license will be assigned to the device from the MSP inventory.
API Endpoint: /platform/licensing/v1/msp/customer/settings/autolicense
API Method:: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
Request Body Params: include_customers
, exclude_customers
, services
{
"include_customers": [
"<customer_id>"
],
"services": [
"ADVANCED_AP"
]
}
{
"response": "success"
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/platform/licensing/v1/msp/customer/settings/autolicense' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"include_customers": [
"<CUSTOMER_ID>"
],
"services": [
"ADVANCED_AP"
]
}'
Assign Licenses to All Devices
Making this API call will assign licenses to all devices that are currently in the customer account. If there are any device inventory changes, then you will have to assign/unassign license manually.
API Endpoint: /platform/licensing/v1/msp/subscriptions/devices/all
API Method:: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
Request Query Params: include_customers
, exclude_customers
, services
{
"include_customers": [
"<customer_id>"
],
"services": [
"ADVANCED_AP"
]
}
{
"include_customers": [
"c28e58012ae54724b54416a0b1c2d3e5"
],
"services": [
"ADVANCED_AP"
]
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/platform/licensing/v1/msp/subscriptions/devices/all` \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"include_customers": [
"<CUSTOMER_ID>"
],
"services": [
"ADVANCED_AP"
]
}'
Assign Licenses to a Device
Making this API call will assign licenses to the specified device(s). Ensure that the device is assigned to the customer account before assigning license.
API Endpoint: /platform/licensing/v1/subscriptions/assign
API Method: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'
Request Body Params: serials
, services
{
"serials": [
"<device_serial_number>"
],
"services": [
"ADVANCED_AP"
]
}
{
"response": "success"
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/platform/licensing/v1/subscriptions/assign' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"serials": [
"<device_serial_number>"
],
"services": [
"ADVANCED_AP"
]
}'
Using MSP-level Tokens for Customer API calls
As an MSP user, you can use MSP-level access token to perform API operations on their tenants. Therefore, it becomes easier to manage multiple tenants using API, present under the MSP account. User privileges as per the tenant role are applied for these operations. When an MSP user wants to make API calls to a customer, they must provide the customer_id of the customer as part of the request header. You can find the customer_id of the customer from here
Key | Value |
---|---|
TenantID | <customer_id> |
4. Creating Sites
A site in HPE Aruba Networking Central refers to a physical location where a set of devices are installed. For example campus, branch, or a venue. You can create a branch or campus site; for example BranchA or CampusA, for a specific
geographical location and assign devices to it. You can use these sites as filters for viewing your deployment
topology, monitoring network and device health.
You can use this API to create a site which can help with monitoring.
API Endpoint: /central/v2/sites
API Method: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'; 'TenantID': '<customer_id>
Request Body Params: site_name
, site_address
, geolocation
Note
Sites can be created using either address or geolocation. All fields within geolocation are mandatory.
{
"site_name": "Santa Clara Site",
"site_address": {
"address": "3970 Rivermark Plaza",
"city": "Santa Clara",
"state": "California",
"country": "United States",
"zipcode": "95053"
}
}
{
"address": "3970 Rivermark Plaza",
"city": "Santa Clara",
"country": "United States",
"latitude": "37.3947253",
"longitude": "-121.9475777",
"site_id": 275,
"site_name": "Santa Clara Site",
"state": "California",
"zipcode": "95053"
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/central/v2/sites' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'TenantID: <CUSTOMER_ID>' \
--data-raw '{
"site_name": "Santa Clara Site",
"site_address": {
"address": "3970 Rivermark Plaza",
"city": "Santa Clara",
"state": "California",
"country": "United States",
"zipcode": "95053"
}
}'
Note
From the response body, take note of the site_id value. You will need this site_id value to make API calls relevant to the newly created site
5. Associating Devices to Sites
Once you have created a site, you can now add devices to it which would be in that site to group them and monitor based on the site name.
You can use this API to associate a list of devices to a site.
API Endpoint: /central/v2/sites/associations
API Method: POST
Base URL: https://apigw-prod2.central.arubanetworks.com
(Replace the Base URL with correct API Gateway)
Request Header: 'Content-Type': 'application/json'; 'Authorization': 'Bearer <access-token>'; 'TenantID': '<customer_id>
Request Query Params: site_id
, device_type
, device_ids
Note
- device_type can be "IAP", "SWITCH" or "CONTROLLER"
- device_ids should have a list of serial numbers of the devices to which the site has to be un/associated with
- It is recommended NOT to add more than 20 devices at a time for seamless operation.
- A device can belong to only 1 site.
{
"site_id": 275,
"device_type": "IAP",
"device_ids": [
"BT000001",
"BT000002",
"BT000003"
]
}
{
"failed": [],
"success": [
{
"device_id": "BT000001"
},
{
"device_id": "BT000002"
},
{
"device_id": "BT000003"
}
]
}
curl --request POST 'https://<API_GATEWAY_BASE_URL>/central/v2/sites/associations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'TenantID: <CUSTOMER_ID>' \
--data-raw '{
"site_id": 275,
"device_type": "IAP",
"device_ids": [
"BT000001",
"BT000002",
"BT000003"
]
}'
Updated 5 months ago