PROTOTYPE CODE
Prototype Asset Management APIs are available which enable developers to embed Plantronics Manager Pro asset management functionality into their applications.  Use the APIs to manage headset firmware, deploy Hub software, make Policy updates. Specifically, the Asset Management APIs expose the following functionality to developers:
  • Retrieve pre-existing asset Policies. See tenant Policy details (.pdf) 
  • Update / Create new Policies for Hub client software and headset firmware in a tenant; for all users in the entire tenant or a set of users.
  • Lookup the latest available firmware version for a product.
Authorization Access Flow 
How to gain authorization to create asset Policies in a tenant.

1. Register an App using this API



2. Subscribe the App for different Plantronics Manager Pro subscription tiers. Ensure VERSIONPOLICY subscription is subscribed for POLICY management APIs



3. Authorize the App for all subscriptions using this API



After the App is authorized for VERSIONPOLICY Subscriptions, we can use the below APIs to create/delete/update Policies 



Policy Get:
 
curl -X GET --header 'Accept: application/json' --header 'appId: 7da9a155-3214-40a2-9326-07028566d153' 'https://partner-api.sqa.pltzone.org/v1/assets/management/tenant/e3260224-e88a-434c-9fd9-c5d3c068dbac/policy?policyId=3ac31140-082e-434f-8a3c-59ccd3ae7c4c&page=0&count=10


Policy Create:

curl -X POST \
  https://partner-api.plt-oda-staging.plantronicsmanager.com​/v1/assets/management/tenant/e3260224-e88a-434c-9fd9-c5d3c068dbac/policy \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 7a782558-2d4c-4fdf-a1ee-cc7340ca7292' \
  -H 'appId: 7da9a155-3214-40a2-9326-07028566d153' \
  -H 'cache-control: no-cache' \
  -H 'charset: UTF-8' \
  -d '{
  "adminNotes": "This is test policy creation for firmware type",
  "allowDecline": false,
  "createdAt": "2018-10-02T00:39:18.967Z",
  "deploymentType": "string",
  "displayVersion": "Latest",
  "groupIds": [
    "string"
  ],
  "id": "string",
  "includeMobileHosts": false,
  "lastActivated": "2018-10-02T00:39:18.967Z",
  "lastModified": "2018-10-02T00:39:18.967Z",
  "links": [
    {
      "href": "string",
      "rel": "string",
      "templated": true
    }
  ],
  "localFilePath": "string",
  "name": "Policy-1",
  "noteToUsers": "string",
  "notificationInterval": 60,
  "productId": "127",
  "recipientFilter": "desktopOnly",
  "scheduleEndTime": "2018-10-02T00:39:18.967Z",
  "scheduleStartDate": "2018-10-02T00:39:18.967Z",
  "scheduleStartTime": "2018-10-02T00:39:18.967Z",
  "settingsJobId": 0,
  "status": "Active",
  "type": "firmware",
  "updateMethod": "none",
  "userIds": [
    "string"
  ],
  "version": "Latest"
}'


Policy Create Response:




Policy Update:

curl -X PUT \
  https://partner-api.sqa.pltzone.org/v1/assets/management/tenant/e3260224-e88a-434c-9fd9-c5d3c068dbac/policy/c8343b06-9e3b-4499-9802-f0197c285c06 \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 156f4499-79f8-46b4-81c7-c0276b6f905f' \
  -H 'appId: 7da9a155-3214-40a2-9326-07028566d153' \
  -H 'cache-control: no-cache' \
  -H 'charset: UTF-8' \
  -d '{
                "settingsJobId": 1516750796131,
                "name": "Policy-change",
                "type": "firmware",
                "status": "Active",
                "updateMethod": "advertise",
                "notificationInterval": 60,
                "allowDecline": false,
                "adminNotes": "",
                "recipientFilter": "allUsers",
                "noteToUsers": null,
                "productId": "c01a",
                "localFilePath": null,
                "version": null,
                "lastModified": 1516779596000,
                "lastActivated": null,
                "createdAt": null,
                "displayVersion": "",
                "groupIds": null,
                "userIds": null,
                "includeMobileHosts": false,
                "scheduleStartDate": null,
                "scheduleStartTime": null,
                "scheduleEndTime": null,
                "deploymentType": null,
                "id": "29d519e9-ee3a-4581-a306-40749a98a67f"
            }'


Policy Update Response:



Policy Delete:

curl -X DELETE \
  'https://partner-api.plt-oda-staging.plantronicsmanager.com/v1/assets/management/tenant/2879509f-1137-45a1-bc1b-ae2b4dd8969d/policy/e907db0d-3298-4171-815b-b9bf52d81b37?apikey=1hKMMPFMmaldnC0rcohvXN0UX7UeWPjb%20' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 87ba4e19-c0b9-47ec-9d7f-e1bc4bb41346' \
  -H 'appId: 49470905-3990-47b3-aa39-c3ec08e944de' \
  -H 'cache-control: no-cache' \
  -H 'charset: UTF-8' \
  -d '{
                "settingsJobId": 1516750796131,
                "name": "AGN Basic Settings2",
                "type": "deviceSettings",
                "status": "Active",
                "updateMethod": "advertise",
                "notificationInterval": 60,
                "allowDecline": false,
                "adminNotes": "",
                "recipientFilter": "allUsers",
                "noteToUsers": null,
                "settings": {
                    "lyncDialTone": {
                        "timestamp": 0,
                        "status": "DISABLED",
                        "isLockable": true,
                        "isReadonly": true,
                        "value": "true",
                        "defaultValue": "true",
                        "possibleValues": [
                            "-1",
                            "true",
                            "false"
                        ],
                        "type": "BOOLEAN",
                        "id": "lyncDialTone"
                    },
                    "twaPeriod": {
                        "timestamp": 0,
                        "status": "ENABLED",
                        "isLockable": true,
                        "isReadonly": false,
                        "value": "-1",
                        "defaultValue": "8",
                        "possibleValues": [
                            "-1",
                            "2",
                            "4",
                            "6",
                            "8"
                        ],
                        "type": "STRING",
                        "id": "twaPeriod"
                    },
                    "autoAnswerOnDon": {
                        "timestamp": 0,
                        "status": "ENABLED",
                        "isLockable": true,
                        "isReadonly": false,
                        "value": "-1",
                        "defaultValue": "true",
                        "possibleValues": [
                            "-1",
                            "true",
                            "false"
                        ],
                        "type": "BOOLEAN",
                        "id": "autoAnswerOnDon"
                    },
                    "twa": {
                        "timestamp": 0,
                        "status": "ENABLED",
                        "isLockable": true,
                        "isReadonly": false,
                        "value": "-1",
                        "defaultValue": "off",
                        "possibleValues": [
                            "-1",
                            "off",
                            "85db",
                            "80db"
                        ],
                        "type": "STRING",
                        "id": "twa"
                    }
                },
                "productId": "c01a",
                "localFilePath": null,
                "version": null,
                "lastModified": 1516779596000,
                "lastActivated": null,
                "createdAt": null,
                "displayVersion": "",
                "groupIds": null,
                "userIds": null,
                "includeMobileHosts": false,
                "scheduleStartDate": null,
                "scheduleStartTime": null,
                "scheduleEndTime": null,
                "deploymentType": null,
                "id": "12ab5e49-5855-44c5-b515-9261db5d61fb"
            }'