Create a PHDC Configuration
Use this API to configure product health data collection (PHDC) in Junos Space Service Now.
URI
https://[host] /api/juniper/servicenow/phd-management/phdcs/configure (HTTP method = POST)
Consumes
application/vnd.juniper.servicenow.phd-management.configurePHDC+ xml;version=1;charset=UTF-8
application/vnd.juniper.servicenow.phd-management.configurePHDC+ json;version=1;charset=UTF-8
Request Elements
Element | Type | Description |
---|---|---|
configuration | configuration | A PHDC configuration |
name | String | Name of PHDC configuration |
collectionPeriodInDays | String | Number of days product health data (PHD) is to be collected from devices |
uploadPHDFile | Boolean | Flag to specify if PHD file should be uploaded to Juniper Support System (JSS) Possible Values:
|
deletePHDFileAfterUpload | Boolean | Flag to specify if PHD files should be deleted after upload to JSS Possible Values:
|
maskIPAddress | Boolean | Flag to specify if IP addresses is masked in PHD files.
|
devices | String | URI of devices to be included in the PHDC configuration |
domianID | Integer | ID of the domain in which PHDC should be created. This is an optional element. If no domain ID is provided, the PHDC is created in the Global domain. Note: The create request fails if a user does not have access to the Global domain and if no domain ID is provided with the create request. |
Produces
application/vnd.juniper.servicenow.phd-management.phdStatusMsg+xml;version=1
application/vnd.juniper.servicenow.phd-management.phdStatusMsg+json;version=1
Response Elements
Element | Type | Description |
---|---|---|
id | Integer | ID of the PHDC configuration job |
status-message | String | Status message of the PHDC configuration job |
Sample Input
Sample XML Input
<configurePHDC> <configuration> <name>MX2-Group</name> <collectionPeriodInDays>30</collectionPeriodInDays> <uploadPHDFile>true</uploadPHDFile> <deletePHDFileAfterUpload>false</deletePHDFileAfterUpload> <maskIPAddress>true</maskIPAddress> <domainId>10</domainId> </configuration> <devices> <device href="/api/juniper/servicenow/device-management/devices/34662" uri="/api/juniper/servicenow/device-management/devices/34662"/> <device href="/api/juniper/servicenow/device-management/devices/35584" uri="/api/juniper/servicenow/device-management/devices/35584"/> </devices> </configurePHDC>
Sample JSON Input
{ "configurePHDC": { "configuration": { "name": "MX2-Group", "collectionPeriodInDays": "30", "uploadPHDFile": "true", "deletePHDFileAfterUpload": "false", "maskIPAddress": "true" }, "devices": { "device": [ { "@href": "/api/juniper/servicenow/device-management/devices/65546", "@uri": "/api/juniper/servicenow/device-management/devices/65546" }, { "@href": "/api/juniper/servicenow/device-management/devices/68073", "@uri": "/api/juniper/servicenow/device-management/devices/68073" } ] } } }
Sample Output
Sample XML Output
<phd-status-message> <id>1081345</id> <status-message>Product Health Data Configuration created successfully</status-message> </phd-status-message>
Sample JSON Output
{ "phdStatusMessage":{ "id":71383, "statusMessage":"Product Health Data Configuration created successfully" } }