Prestaging Device Management RESTful Web Services
The following operations can be performed using the Connectivity Services Director Prestaging Devices Management RESTful Web Services.
Discover Device Roles
This request is used to discover the roles of devices.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | POST |
Consumes | application/vnd.net.juniper.space.manage-roles. |
Produces | Discovers the roles of devices. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <Status> <Job> <ID>163860</ID> <Status>INPROGRESS</Status> </Job> <Code>200</Code> <Message>Discover Roles process triggered Succesfully.Please check the Status using Job Id</Message> </Status> </Data>
Get All Prestage Devices
This request is used to retrieve all prestaged devices.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | GET |
Consumes | application/vnd.net.juniper.space.manage- |
Produces | Retrieves all the prestaged devices. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <PrestageDevices size="5"> <PrestageDevice key="262144" href="/api/space/nsas/prestage-devices/manage-roles/devices/262144"uri="/api/space/nsas/prestage-devices/manage-roles/devices/262144"> <DeviceName>exora</DeviceName> <IPAddress>10.216.114.114</IPAddress> </PrestageDevice> <PrestageDevice key="262174" href="/api/space/nsas/prestage-devices/manage-roles/devices/262174" uri="/api/space/nsas/prestage-devices/manage-roles/devices/262174"> <DeviceName>kochin</DeviceName> <IPAddress>10.216.114.110</IPAddress> </PrestageDevice> <PrestageDevice key="262241" href="/api/space/nsas/prestage-devices/manage-roles/devices/262241" uri="/api/space/nsas/prestage-devices/manage-roles/devices/262241"> <DeviceName>embassy</DeviceName> <IPAddress>10.216.114.109</IPAddress> </PrestageDevice> <PrestageDevice key="262305" href="/api/space/nsas/prestage-devices/manage-roles/devices/262305" uri="/api/space/nsas/prestage-devices/manage-roles/devices/262305"> <DeviceName>junos-m10-2-space</DeviceName> <IPAddress>10.216.114.103</IPAddress> </PrestageDevice> <PrestageDevice key="262375" href="/api/space/nsas/prestage-devices/manage-roles/devices/262375" uri="/api/space/nsas/prestage-devices/manage-roles/devices/262375"> <DeviceName>junos-space1</DeviceName> <IPAddress>10.216.114.119</IPAddress> </PrestageDevice> </PrestageDevices> </Data>
Get All Prestage Devices with Pagination, Search, and Filter
This request is used to retrieve all prestaged device details with paging behavior applied on the output, and with the devices sorted and segregated depending on the search criteria.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | GET |
Consumes | application/vnd.net.juniper.space.manage-roles. |
Produces | Retrieves all the prestaged devices. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <PrestageDevices size="1"> <PrestageDevice uri="/api/space/nsas/prestage-devices/manage-roles/devices/1310720" href="/api/space/nsas/prestage-devices/manage-roles/devices/1310720" key="1310720"> <Id>1310720</Id> <DeviceName>junos-mx480-space</DeviceName> <IPAddress>10.216.114.118</IPAddress> </PrestageDevice> </PrestageDevices> </Data>
Get Prestage Devices By Device ID
This request is used to retrieve a prestaged device based on the device ID.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | GET |
Consumes | application/vnd.net.juniper.space.manage-role.device+xml |
Produces | Retrieves the prestaged device based on the device ID. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <PrestageDevices> <PrestageDevice> <Id>262375</Id> <DeviceName>junos-space1</DeviceName> <IPAddress>10.216.114.119</IPAddress> <Role>N_PE</Role> <AdditionalRole>CSR</AdditionalRole> <LoopbackInterface>lo0.0</LoopbackInterface> </PrestageDevice> </PrestageDevices> </Data>
Assign Roles to Devices With User Input
This request is used to assign roles to devices with user input.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | POST |
Content-Type | application/vnd.net.juniper.space.manage-roles. |
Consumes | application/vnd.net.juniper.space.manage-roles. |
Produces | Assigns roles to all the devices without manual intervention. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <PrestageDevices size="5"> <PrestageDevice> <DeviceName>exora</DeviceName> <IPAddress>10.216.114.114</IPAddress> </PrestageDevice> <PrestageDevice> <DeviceName>kochin</DeviceName> <IPAddress>10.216.114.110</IPAddress> </PrestageDevice> </PrestageDevices> </Data>
Assign Roles to All Devices Without User Input
This request is used to assign roles to all devices without user input.
URI | api/space/nsas/prestage-devices/manage-roles/ |
HTTP Method | POST |
Consumes | application/vnd.net.juniper.space.manage-roles. |
Produces | Assigns roles to all the devices without manual intervention. |
Output
Sample XML Output
<? xml version="1.0" encoding="UTF-8" standalone="yes"?> <Data xmlns="services.schema.networkapi.jmp.juniper.net"> <Status> <Job> <ID>164136</ID> <Status>INPROGRESS</Status> </Job> <Code>200</Code> <Message>Assign Roles process triggered successfully. Please check the Status using Job Id</Message> </Status> </Data>
Assign a UNI Role to a PE Device (Version 2)
This request is used to assign a user-to-network interface (UNI) role to a PE device, which is already added and present in the database, in version 2 format.
This API version is only maintained for backward compatibility with Connectivity Services Director Release 1.0R2 and earlier, and we recommend that you use the version 1 of this API in Connectivity Services Director Release 2.0 and later.
URI | /api/space/nsas/pe-devices/<pe-device-id>/ |
HTTP Method | POST |
Content-Type | application/vnd.juniper.api.space.nsas. |
Consumes | application/vnd.juniper.api.space.nsas. |
Produces | Assigns a UNI role to a PE device. |
Input
Sample XML Input
<add-peunis-request> <intf-name-list> <intf-name-list>ge-0/1/0</intf-name-list> </intf-name-list> </add-peunis-request>
Delete a UNI from an N-PE Device (Version 2)
This request is used to delete a previously configured UNI from a network provider edge (N-PE) device in version 2 format.
This API version is only maintained for backward compatibility with Connectivity Services Director Release 1.0R2 and earlier, and we recommend that you use the version 1 of this API in Connectivity Services Director Release 2.0 and later.
URI | /api/space/nsas/pe-devices/<pe-device-id>/ |
HTTP Method | DELETE |
Content-Type | application/vnd.juniper.api.space.nsas. |
Consumes | application/vnd.juniper.api.space.nsas. |
Produces | Deletes a UNI from an N-PE device. |
Input
Sample XML Input
<delete-peunis-request> <intf-name-list> <intf-name-list>ge-0/0/3</intf-name-list> </intf-name-list> </delete-peunis-request>
Get All UNIs of an N-PE Device (Version 1)
This request is used to obtain all the configured UNIs of a network provider edge (N-PE) device in version 1 format.
This API version is only maintained for backward compatibility with Connectivity Services Director Release 1.0R2 and earlier, and we recommend that you use the version 2 of this API in Connectivity Services Director Release 2.0 and later.
URI | api/space/nsas/devices/<pe-device-id>/ |
HTTP Method | GET |
Consumes | application/vnd.juniper.api.space.nsas.peunis+xml |
Produces | Retrieves all UNIs configured on a network PE device. |
Output
Sample XML Output
<?xml version="1.0" encoding="UTF-8"?> <peunis total="2"> <pe-interface-bean> <image-name>ServiceProvisioning_serviceui_enginerule_UNI_Port_Ambiguous_265x315.png</image-name> <id>ge-0/0/0</id> <phy-encap>flexible-ethernet-services</phy-encap> <device-name>TonyX1-re</device-name> <name>ge-0/0/0</name> <role>UNKNOWN</role> <vlan-profile>default [1-16769024]</vlan-profile> </pe-interface-bean> <pe-interface-bean> <image-name>ServiceProvisioning_serviceui_enginerule_UNI_Port_Ambiguous_265x315.png</image-name> <id>ge-0/0/1</id> <phy-encap>flexible-ethernet-services</phy-encap> <device-name>TonyX1-re</device-name> <name>ge-0/0/1</name> <role>UNKNOWN</role> <vlan-profile>default [1-16769024]</vlan-profile> </pe-interface-bean> </peunis>
Assign a UNI Role to a PE Device (Version 1)
This request is used to assign a user-to-network interface (UNI) role to a PE device, which is already added and present in the database in version 1 format.
URI | /api/space/nsas/pe-devices/<pe-device-id>/ |
HTTP Method | POST |
Content-Type | application/vnd.juniper.api.space.nsas. |
Consumes | application/vnd.juniper.api.space.nsas. |
Produces | Assigns a UNI role to a PE device. |
Input
Sample XML Input
<add-peunis-request> <intf-name-list> <intf-name>xe-0/0/0</intf-name> </intf-name-list> </add-peunis-request>
Delete a UNI from an N-PE Device (Version 1)
This request is used to delete a previously configured UNI from a network provider edge (N-PE) device in version 1 format.
URI | /api/space/nsas/pe-devices/<pe-device-id>/ |
HTTP Method | DELETE |
Content-Type | application/vnd.juniper.api.space.nsas. |
Consumes | application/vnd.juniper.api.space.nsas. |
Produces | Deletes a UNI from an N-PE device. |
Input
Sample XML Input
<delete-peunis-request> <intf-name-list> <intf-name>xe-0/0/0</intf-name> </intf-name-list> </delete-peunis-request>
Get All UNIs of an N-PE Device (Version 2)
This request is used to obtain all the configured UNIs of a network provider edge (N-PE) device in version 2 format.
URI | api/space/nsas/pe-devices/<pe-device-id>/ |
HTTP Method | GET |
Consumes | application/vnd.juniper.api.space.nsas.peunis+xml; |
Produces | Retrieves all UNIs configured on a network PE device. |
Output
Sample XML Output
<peunis total="2"> <pe-interface-bean> <image-name> ServiceProvisioning_serviceui_enginerule_UNI_Port_Ambiguous_265x315.png </image-name> <id>xe-0/0/1</id> <phy-encap>none</phy-encap> <device-name>junos-mx80-1-space</device-name> <name>xe-0/0/1</name> <role>UNKNOWN</role> <vlan-profile>default [1-16769024]</vlan-profile> </pe-interface-bean> <pe-interface-bean> <image-name> ServiceProvisioning_serviceui_enginerule_UNI_Port_Ambiguous_265x315.png </image-name> <id>ge-1/0/1</id> <phy-encap>none</phy-encap> <device-name>junos-mx80-1-space</device-name> <name>ge-1/0/1</name> <role>UNKNOWN</role> <vlan-profile>default [1-16769024]</vlan-profile> </pe-interface-bean> </peunis>
Get All Prestaged Devices
This request is used to retrieve a list of prestaged devices.
New Parameters | api/space/nsas/pre-stage-devices |
Description of the Changes | This API is used to retrieve a list of prestaged devices. |
URI | api/space/nsas/pre-stage-devices |
HTTP Method | GET |
Consumes | application/vnd.juniper.api.space.nsas.pre-stage- application/vnd.juniper.api.space.nsas.pre-stage- |
Produces | Retrieves a list of prestaged devices. |
Output
Sample XML Output
<pre-stage-devices total=""Integer"" uri=""/api/space/nsas/pre-stage-devices""> <pre-stage-device href=""/api/space/nsas/pre-stage-devices/{id}"" uri=""/api/space/nsas/pre-stage-devices/{id}""> <ser-role>L3_READY</ser-role> <loopback-interface-ip-address>String</loopback-interface-ip-address> <device-family>String</device-family> <management-ip-address>String</management-ip-address> <id>Integer</id> <device-name>String</device-name> <role>N_PE</role> <me-id>Integer</me-id> <loopback-interface-name>String</loopback-interface-name> </pre-stage-device> </pre-stage-devices>"
Unassign Roles of Devices
This request is used to unassign the role of devices passed as a parameter. Multiple device IDs are concatenated with a | (pipe) character.
New Parameters | api/space/nsas/pe-unassign-role?data=<deviceids> |
Description of the Changes | This API is used to unassign the role of a specific device. |
URI | api/space/nsas//pe-unassign-role?data=<deviceids> |
HTTP Method | POST |
Consumes | application/vnd.juniper.api.space.nsas.pe-unassign- application/vnd.juniper.api.space.nsas.pe-unassign- |
Produces | Unassigns the roles of devices. |
Output
Sample XML Output
" <pe-unassign-roles total=""Integer"" uri=""/api/space/nsas/pe-unassign-role""> <prestage-unassign-role-status> <message>String</message> <device-name>String</device-name> <ret-val>String</ret-val> <device-id>String</device-id> </prestage-unassign-role-status> </pe-unassign-roles>"
Get Job Details By Job ID
This request is used to obtain the details of a specific job, based on its unique identifier.
New Parameters | "getJobDetailsForRequest” |
Description of the Changes | This API is to display the job details as a device view. Previously, the job summary was shown when you double-clicked the link in a job ID. With this new REST API call, job details are filtered on the basis of each device. |
HTTP Method | GET |
URI | /api/space/nsas/elan-vpls/service- |
Consumes | application/vnd.net.juniper.space.service- |
Produces | Retrieves the details of a particular job. |
Mandatory Parameters | jobID |
Output
Sample JSONOutput
{ "Data": { "JobDetailsType": { "jobDetailType": [ { "nodeName": "960R1_EN_Alok_re", "statusMessage": "Endpoint cannot be provisoned since validation failed for other devices.", "jobStatus": "INVALID", "serviceName": "Test2Devices" }, { "nodeName": "960R2_EN_Alok_re", "statusMessage": "Validation Error on Device:<b>[960R2_EN_Alok_re]<\/b> \n{Interface ge-0/0/4 has existing encapsulation <br> flexible-ethernet-services <br>new illegal encapsulation <br> ethernet-vpls= , Physical Encap flexible-ethernet-services cannot be overridden by ethernet-vpls= , Cannot change interface encapsulation <br> <br>flexible-ethernet-services <br>to ethernet-vpls= }\n", "jobStatus": "INVALID", "serviceName": "Test2Devices" } ] } } }
Get All Basic Services
This request is used to retrieve details of all the configured basic services..
New Parameters | api/space/nsas/basic-services |
Description of the Changes | This API call is used to retrieve all the services. |
URI | api/space/nsas/basic-services |
HTTP Method | GET |
Consumes | application/vnd.juniper.api.space.nsas.basic- |
Content Type | application/vnd.juniper.api.space.nsas.basic- |
Produces | Retrieves all the basic services. |
Output
Sample XML Output
<basic-services total=""Integer"" uri=""/api/space/nsas/basic-services""> <basic-service href=""/api/space/nsas/basic-services/{service-id}"" uri=""/api/space/nsas/basic-services/{service-id}""> <customer-name>String</customer-name> <fault-status>String</fault-status> <definition>String</definition> <status>String</status> <state>String</state> <ext-ref>String</ext-ref> <monitoring-id>String</monitoring-id> <type-of-request>String</type-of-request> <topo-type>POINT2POINT</topo-type> <_policy-name>String</_policy-name> <description>String</description> <overall-status>String</overall-status> <service-id>Integer</service-id> <signaling>String</signaling> <activation-date>String</activation-date> <service-type>String</service-type> <sla-status>String</sla-status> <customer-id>String</customer-id> <name>String</name> <last-modified-date>String</last-modified-date> <definition-id>String</definition-id> <pm-status>String</pm-status> </basic-service> </basic-services>