Cisco DCNM REST API Guide, Release 7.x
DCNM REST API

Table Of Contents

Cisco Dynamic Fabric Automation REST API

Introduction

Software Architecture

REST APIs

Authentication

Logon

Logout

Auto Config

Organization

Partition

Network

Profile

List Organizations

Create an Organization

Get an Organization

Update an Organization

Delete an Organization

Parameter

List Partitions

Parameter

Create a Partition

Parameter

Get a Partition

Parameter

Update a Partition

Parameter

Delete a Partition

Parameter

List Networks

Parameter

Create a Network

Parameter

Get a Network

Parameter

Update a Network

Parameter

Delete a Network

Parameter

List Profiles

Parameter

Create a Profile

Parameter

Get a Profile

Parameter

Update a Profile

Parameter

Delete a Profile

Parameter

Get Auto Config Settings

Parameter

Update Auto Config Settings

Parameter

Cable Plan

Capture a Cable Plan

Parameter

Generate a Cable Plan

Parameter

Save a Cable Plan

Parameter

Delete a Cable Plan

Parameter

Get a Cable Plan

Parameter

Get a Cable Plan From Device

Parameter

View Cable Plan From Device

Parameter

Import a Cable Plan

Parameter

Export a Cable Plan

Parameter

Deploy a Cable Plan

Parameter

Revoke a Cable Plan

Parameter

DHCP

List POAP Scopes

Parameter

Create a POAP Scope

Update a POAP Scope

Delete a POAP Scope

Power On Auto Provisioning (POAP)

List Servers

Create a Server

Get Servers

Update Servers

Delete Servers

List Switch Definitions

Create Switch Definitions

Publish Switch Definitions

Get a Switch Definition

Update a Switch Definition

Delete a Switch Definition

Get a POAP Template

Create a POAP Template

Update a POAP Template

Delete a POAP Template


Cisco Dynamic Fabric Automation REST API


Introduction

The Cisco Dynamic Fabric Automation (DFA)REST APIs for third party applications enables you to programmatically control Cisco Dynamic Fabric Automation (DFA). The REST API supports POAP (Power On Auto Provisioning), Auto Config and Cable plan features.

POAP allows devices to boot up with temporary IP address (assigned by DHCP server), to download the POAP boot-up script (also assigned by DHCP server) which will further download the required kick-start and system image, and the device configuration file from the specific TFTP server indicated in the boot-up script.

In the Cisco Dynamic Fabric Automation architecture, the virtual machine (VM) facing interface on leaf switches is automatically configured and de-configured by the auto config. It detects the server/VM boot-up, retrieves pre-defined network parameters from the asset database, and applies the generated configuration. When the VM is moved or shutdown, the auto config also updates/removes the dynamic configuration.

Cable plan provides a Netmap of port-to-port cable connectivity data that can be imported into the switches of the DFA. The XML cable plan acts as a lookup table, and if a port is not connected to its corresponding destination port as per the plan, the switch should flag an error and notify the customers.

All the REST API operations can also be performed using the DCNM GUI as DCNM uses these REST APIs to render the GUI.

For more information about Cisco Dynamic Fabric Automation, see the Cisco DFA Application Programmer's Guide.

Software Architecture

In a DFA datacenter, Cisco DCNM will be the central point of management for the fabric and for the network auto-configuration. PoAP templates are used to auto-configure the spine and leaf network devices and configuration profiles are used to auto-configure the organizations, networks and services.

DCNM works as the network controller in conjunction with any instances of compute/storage orchestrators and service controllers to provide an open and extensible integrated virtual and physical network. Organizations and networks can be created directly using the Cisco DCNM GUIs or through the compute/storage orchestrators. In both cases the external APIs discussed in this document are used to retrieve information and create/retrieve/update/delete configuration profile instances into the network Asset Database (LDAP). The leaf devices in turn fetch configuration from the Asset Database and self-configure themselves. Service controllers like PNSC can also get organization/network information from DCNM through the APIs, as well as update the configuration profiles for services integration.

The general workflow is as follows:

Create Organizations and Partitions

As part of this, edge services may be automatically deployed

Create Segments

As part of this, segment services may be automatically deployed

Deploy application workload

Throughout this process the network and network services can be automated using DFA. For an animated description of the DFA architecture and workflow refer to http://www.youtube.com/watch?v=MNnv2Y_k6EY.

The architecture is depicted in Figure 1-1.

Figure 1-1

Architecture


Note You can also use your own REST based clients to integrate with third party orchestrators.


REST APIs

DCNM will provide REST API, and the REST approach emphasizes on using the resource name as part of the URL. In this release, the response of the REST API will be encoded in JSON format (see http://www.json.org for validation).

The query parameters for the HTTP GET will be appended to the URL after the symbol "?"; the input for the HTTP POST/PUT/DELETE will be specified in the payload with the URL-encoded. REST APIs support both HTTP and HTTPS.

This section contains the high level description for the REST API, during implementation the REST APIs are subject to change.

DCNM REST API supports "application/json" for the Content-Type.

The following parameter types are mentioned in this document:

A - Array

S - String

O - Object

Authentication

The Authentication REST APIs can be used by an external application to authenticate itself to the DCNM in order to programmatically control the DFA cluster. After calling logon to get the token, all the subsequent REST API requests need to set the DCNM-Token field with the token in the HTTP header.

.

Logon

Resource Name

/logon

Description

Logon to DCNM server to authenticate the user. Once the authentication is complete, a token will be returned as the response. All API calls to the DCNM server should use this token until it is expired or invalid. The logon API uses "username:password" with base64 encoded in HTTP Authorization header. For example, "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" will return the token in the payload.

HTTP Method

POST

URL

https://dcnm-ip/rest/logon

Parameter

Parameter
Type
Description

Expiration

S

Token expiry duration.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Dcnm-Token

S

Details of the token.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error


Logout

Resource Name

/logout

Description

Logout from the DCNM server. Once you have logged out, the token will be invalid. You must set the token in the Authorization header while using this API.

HTTP Method

POST

URL

https://dcnm-ip/rest/logout

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error


Auto Config

The relationship between Organization, Partition and the Network is depicted in Figure 1-2.

Figure 1-2

Auto Config

Organization

Attributes
Type
Require

organizationName

String

Mandatory

description

String

Optional

orchestrationSource

String

Optional


Partition

Attributes
Type
Require

partitionName

String

Mandatory

partitionSegmentId

String

Mandatory

description

String

Optional

serviceNodeIpAddress

String

Optional

organizationName

String

Mandatory


Network

Attributes
Type
Require

organizationName

String

Mandatory

dvsId

String

Optional

staticIpStart

String

Optional

staticIpEnd

String

Optional

vSwitchControllerNetworkId

String

Optional

networkName

String

Mandatory

segmentId

String

Mandatory

vlanId

String

Mandatory

mobilityDomainId

String

Mandatory

description

String

Optional

profileName

String

Mandatory

vSwitchControllerId

String

Optional

configArg

String

Optional

partitionName

String

Mandatory

dhcpScope

subnet

Optional

gateway

Optional

ipRange

Optional


Profile

Attributes
Type
Require

forwardingMode

String

Mandatory

profileName

String

Mandatory

description

String

Optional

configCommands

String

Mandatory


List Organizations

Resource Name

/auto-config/organizations

Description

Displays a list of Organizations.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations

https://dcnm-ip/rest/auto-config/organizations?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Organizations

A

By default, a list of organization names is displayed. If "detail=true", then a list of Organization objects is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create an Organization

Resource Name

/auto-config/organizations

Description

Enables you to create a new organization.

HTTP Method

POST

URL

https://dcnm-ip/rest/auto-config/organizations

Parameter

Parameter
Type
Description

Organization

O

Organization object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Organization-name

S

New organization name


Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get an Organization

Resource Name

/auto-config/organizations/organization-name

Description

Enables you to get an organization.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Oganization-

O

Organization object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update an Organization

Resource Name

/auto-config/organizations/organization-name

Description

Enables you to update an organization.

HTTP Method

PUT

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name

Parameter

Parameter
Type
Description

Organization

O

Organization object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete an Organization

Resource Name

/auto-config/organizations/organization-name

Description

Enables you to delete a organization.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


List Partitions

Resource Name

/auto-config/organizations/organization-name/partitions

Description

Displays a list of partitions.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations/organization1/partitions

https://dcnm-ip/rest/auto-config/organizations/organization1/partitions?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Partitions

A

By default, a list of partition names is displayed. If "detail=true", then a list of partition objects is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a Partition

Resource Name

/auto-config/organizations/organization-name/partitions

Description

Enables you to create a new partition.

HTTP Method

POST

URL

https://dcnm-ip/rest/auto-config/organizations/organization1/partitions

Parameter

Parameter
Type
Description

Partition-object

O

Partition object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

partition-name

S

Partition name


Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Partition

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name

Description

Enables you to get a partition.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Partition

O

Partition object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a Partition

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name

Description

Update a partition.

HTTP Method

PUT

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition-namee

Parameter

Parameter
Type
Description

Partition

O

Partition object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a Partition

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name

Description

Delete a partition.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


List Networks

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name/networks

Description

List of networks.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Networks

A

By default, a list of segment IDs for l2 segments, a list of VLAN IDs, and Mobility Domain IDs for the VLAN Mobility Domain is displayed. If "detail=true", then list of network objects is displayed


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a Network

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name/networks

Description

Create a new network.

HTTP Method

POST

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks

Parameter

Parameter
Type
Description

Network

O

Network object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

SegmentID or VLANID + MobilityDomainID

S

Segment ID for l2 segments or VLAN ID and Mobility Domain ID for VLAN Mobility Domain is displayed.


Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Network

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name/networks/{network-id}

Description

Get a network.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/segment/20010

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/vlan/10/mobility-domain/mydomain

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Network

O

Network object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a Network

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name/networks/{network-id}

Description

Update a network.

HTTP Method

PUT

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/segment/20010

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/vlan/10/mobility-domain/mydomain

Parameter

Parameter
Type
Description

Network

O

Network object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a Network

Resource Name

/auto-config/organizations/organization-name/partitions/partition-name/networks/{network-id}

Description

Delete a network.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/segment/20010

https://dcnm-ip/rest/auto-config/organizations/organization-name/partitions/partition1/networks/vlan/10/mobility-domain/mydomain

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


List Profiles

Resource Name

/auto-config/profiles

Description

List of profiles.

HTTP Method

GET

URL

https://dcnm-ip/rest/autoconfig/profiles

https://dcnm-ip/rest/autoconfig/profiles?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Profiles

A

By default, a list of profileNames is displayed. If "detail=true", then a list of profile objects is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a Profile

Resource Name

/auto-config/profiles

Description

Create a new profile.

HTTP Method

POST

URL

https://dcnm-ip/rest/auto-config/profiles

Parameter

Parameter
Type
Description

Profile

O

Profile object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

ProfileName

S

Profile name


Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Profile

Resource Name

/auto-config/profiles/profile-name

Description

Get a profile.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/profiles/{profile-name}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Profile

O

Profile object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a Profile

Resource Name

/auto-config/profiles/profile-name

Description

Update a profile.

HTTP Method

PUT

URL

https://dcnm-ip/rest/auto-config/profiles/profile-name

Parameter

Parameter
Type
Description

Profile

O

Profile object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a Profile

Resource Name

/auto-config/profiles/profile-name

Description

Delete a profile.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/auto-config/profiles/{profile-name}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get Auto Config Settings

Resource Name

/auto-config/settings

Description

Get auto config settings.

HTTP Method

GET

URL

https://dcnm-ip/rest/auto-config/settings

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Auto-config-settings

O

The following auto config settings objects are displayed: ldapServer, ldapUserName, ldapPassWord, partitionIdRange, segmentIdRange, amqpServer, amqpPort, amqpVirtualHost, amqpUserName, amqpPassWord, amqpExchangeName, xmppServer, xmppUserName, xmppPassWord, xmppGroup, xmppNickName, xmppResponseTimeout, useLocalDhcp, dhcpPrimarySubnet, enableAmqpNotification.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update Auto Config Settings

Resource Name

/auto-config/settings

Description

Update auto config settings.

HTTP Method

PUT

URL

https://dcnm-ip/rest/auto-config/settings

Parameter

Parameter
Type
Description

Auto-config-settings

O

The following auto config settings object are displayed: ldapServer, ldapUserName, ldapPassWord, partitionIdRange, segmentIdRange, amqpServer, amqpPort, amqpVirtualHost, amqpUserName, amqpPassWord, amqpExchangeName, xmppServer, xmppUserName, xmppPassWord, xmppGroup, xmppNickName, xmppResponseTimeout, useLocalDhcp, dhcpPrimarySubnet, enableAmqpNotification.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Cable Plan

Capture a Cable Plan

Resource Name

/cable-plans/discovery

Description

Extract a cable plan base on the switches discovered by DCNM.

HTTP Method

GET

URL

https://dcnm-ip/rest/cable-plans/discovery

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-name

S

Name of the cable plan


Status Code

200

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Generate a Cable Plan

Resource Name

/cable-plans/poap

Description

Generate a cable plan base on the POAP switch definitions from DCNM

HTTP Method

GET

URL

https://dcnm-ip/rest/cable-plans/poap

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-name

S

Name of the cable plan


Status Code

200

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Save a Cable Plan

Resource Name

/cable-plans

Description

Save a cable plan into the DCNM database.

HTTP Method

POST

URL

https://dcnm-ip/rest/cable-plans

Parameter

Parameter
Type
Description

cable-plan-object

O

Cable-plan-object including cable-plan-name, source-device, source-device-type, source-port, dest-device, dest-device-type, dest-port.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a Cable Plan

Resource Name

/cable-plans

Description

Delete cable plan base on the POAP switch definitions from DCNM.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/cable-plans

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Cable Plan

Resource Name

/cable-plans

Description

Get a cable plan

HTTP Method

GET

URL

https://dcnm-ip/rest/cable-plans

https://dcnm-ip/rest/cable-plans?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan

O

By default returns cable-plan information, if "detail=true", then will return CablePlan object.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Cable Plan From Device

Resource Name

/cable-plans/device-xml

Description

Get a cable plan from devices in XML

HTTP Method

POST

URL

https://dcnm-ip/rest/cable-plans/device-xml

Parameter

Parameter
Type
Description

Ip-addresses

S

The Switch IP Address list which derives the cable plan.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

cable-plan-info

S

Cable plans in XML


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


View Cable Plan From Device

Resource Name

/cable-plans/device-raw

Description

Get cable plan from devices and return in raw format

HTTP Method

POST

URL

https://dcnm-ip/rest/cable-plans/device-raw

Parameter

Parameter
Type
Description

Ip-addresses

S

The Switch IP Address list which derives the cable plan


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-info

S

Cable plans in raw format


Status Code

200

OK

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Import a Cable Plan

Resource Name

/cable-plans/import

Description

Returns Cable Plan object of imported cable plan file.

HTTP Method

POST

URL

https://dcnm-ip/rest/cable-plans/import

Parameter

Parameter
Type
Description

cable-plan

S

You must provide a Name for the cable plan and the cable plan content in the payload.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-object

O

Cable plan object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Export a Cable Plan

Resource Name

/cable-plans/xml

Description

Export a cable plan from DCNM in XML format

HTTP Method

GET

URL

https://dcnm-ip/rest/cable-plans/xml

Parameter

Parameter
Type
Description

Cable-plan

S

Name of the cable plan.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Cable-plan-object

S

Name of the cable plan and content in XML format in the payload.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Deploy a Cable Plan

Resource Name

/cable-plans/fabric

Description

Deploy a cable plan to all the spine and leaf devices

HTTP Method

POST

URL

hhttps://dcnm-ip/rest/cable-plans/fabric

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Revoke a Cable Plan

Resource Name

/cable-plans/revoke

Description

Revoke a cable plan from all the spine and leaf devices

HTTP Method

POST

URL

https://dcnm-ip/rest/cable-plans/revoke

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


DHCP

List POAP Scopes

Resource Name

/poap/dhcp/scopes

Description

List of POAP DHCP scopes

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/dhcp/scopes

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Poap-scopes

A

A list of scope objects including scope name, ip-range, default-lease-time, max-lease-time, tftp-server-ip-address, tftp-server-username, tftp-server-password, boot-script-path is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a POAP Scope

Resource Name

/poap/dhcp/scopes

Description

Create a new DHCP scope for POAP.

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/dhcp/scopes

Parameter

Parameter
Type
Description

Poap-scope

 

Displays a list of POAP scope objects including scope name and ip-range, default-lease-time, max-lease-time, tftp-server-ip-address, tftp-server-username, tftp-server-password, boot-script-path.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

scope-name

S

DHCP scope name.


Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a POAP Scope

Resource Name

/poap/dhcp/scopes/{scope-name}

Description

Update a DHCP scope for POAP.

HTTP Method

PUT

URL

https://dcnm-ip/rest/poap/dhcp/scopes/{scope-name}

Parameter

Parameter
Type
Description

Poap-scope

O

Displays a list of POAP scope objects including scope name and switch-settings, switch-settings includes ip-range, default-lease-time, max-lease-time, tftp-server-ip-address, tftp-server-username, tftp-server-password, boot-script-path


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a POAP Scope

Resource Name

/poap/dhcp/scopes/{scope-name}

Description

Delete a DHCP scope for POAP.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/poap/dhcp/scopes/{scope-name}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Power On Auto Provisioning (POAP)

List Servers

Resource Name

/poap/servers

Description

List POAP image/config servers

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/servers

https://dcnm-ip/rest/poap/servers?detail=true

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

poap-servers

 

By default, a list of POAP image/config server names is displayed. If "detail=true"a list of POAP image/config server-objects including server-name and URI is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a Server

Resource Name

/poap/servers

Description

Create a new POAP image/config server

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/servers

Parameter

Parameter
Type
Description

poap-servers

 

POAP image/config server-object includingserver-name,URI,hostname/ipaddress, path,username and password.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

poap-server-name

 

POAP image/config server name.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get Servers

Resource Name

/poap/servers/server-name

Description

Get the POAP image/config servers

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/servers/server-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

poap-server

 

POAP image/config server-object including server-name and URI.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update Servers

Resource Name

/poap/servers/server-name

Description

Update the POAP image/config servers

HTTP Method

PUT

URL

https://dcnm-ip/rest/poap/servers/server-name

Parameter

Parameter
Type
Description

poap-server

 

POAP image/configserver-object including

server-name,hostname/ipaddress, path,username and password.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete Servers

Resource Name

/poap/servers/server-name

Description

Delete the POAP image/config servers

HTTP Method

DELETE

URL

https://dcnm-ip/rest/poap/servers/server-name

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


List Switch Definitions

Resource Name

/poap/switch-definitions

Description

List the POAP switch definitions

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/switch-definitions

https://dcnm-ip/rest/poap/switch-definitions?detail=true https://dcnm-ip/rest/poap/switch-definitions?search-string=<search-string>&start-index=<start-index>&size=<size>

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Switch-definitions

 

By default, a list of serial- numbers is displayed. If "detail=true", then a list of switch-definition objects including serial-numbers, status(saved and publish later/published/saved and publishing/error), system-image, kick-start-image, image-server-uri, config-server-uri, template-name, parameter-values with a list of name, type, value corresponding to the template is displayed.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create Switch Definitions

Resource Name

/poap/switch-definitions

Description

Create POAP switch definitions

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/switch-definitions

Parameter

Parameter
Type
Description

Switch-definitions

 

Displays a list of serial-numbers, system-image, kick-start-image, image-server-uri, config-server-uri, template-name, poap-settings-name, parameter-values with a list of name, type, value corresponding to the template , and publish=true/false.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

switch-numbers

 

List of serial numbers.


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Publish Switch Definitions

Resource Name

/poap/published-switch-definitions/{serial-number}

Description

Publish list of switch-definitions to the Repository server.

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/published-switch-definitions/{serial-number}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a Switch Definition

Resource Name

/poap/switch-definitions/{serial-number}

Description

Get a switch definition.

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/switch-definitions/{serial-number}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

switch-definition

 

Displays a list of serial-numbers, system-image, kick-start-image, image-server-uri, config-server-uri, template-name and parameter-values with a list of name, type, value corresponding to the template .


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a Switch Definition

Resource Name

/poap/switch-definitions/serial-number

Description

Update a switch-definition.

HTTP Method

PUT

URL

https://dcnm-ip/rest/poap/switch-definitions/{serial-number}

Parameter

Parameter
Type
Description

switch-definition

 

Displays a list of serial-numbers, system-image, kick-start-image, image-server-uri, config-server-uri, template-name and parameter-values with a list of name, type, value corresponding to the template , and publish=true/false.


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a Switch Definition

Resource Name

/poap/switch-definitions/serial-number

Description

Delete a switch-definition.

HTTP Method

DELETE

URL

https://dcnm-ip/rest/poap/switch-definitions/{serial-number}

Parameter

Parameter
Type
Description
     

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Get a POAP Template

Resource Name

/poap/templates/{template-name}

Description

Get a POAP template.

HTTP Method

GET

URL

https://dcnm-ip/rest/poap/templates/{template-name}

Parameter

Parameter
Type
Description

Serial-number

S

Device serial-number


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Poap-template

O

Poap template object


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Create a POAP Template

Resource Name

/poap/templates

Description

Create a POAP template.

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/templates

Parameter

Parameter
Type
Description

Poap-template

O

Poap template object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

Poap-template-name

O

Poap template name


Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Update a POAP Template

Resource Name

/poap/templates/{template-name}

Description

Update a POAP template.

HTTP Method

PUT

URL

https://dcnm-ip/rest/poap/templates/{template-name}

Parameter

Parameter
Type
Description

Poap-template

O

Poap template object


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error


Delete a POAP Template

Resource Name

/poap/templates/{template-name}

Description

Delete a POAP template.

HTTP Method

POST

URL

https://dcnm-ip/rest/poap/templates/{template-name}

Parameter

Parameter
Type
Description

Poap-template-name

S

Poap template name


Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description
     

Status Code

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error