Host Policy Management for Flow data

The following are the Host Policy Management for Flow data REST APIs:

Status

The following table details the API Response code, status and, the HTTPS methods.

Status Code
Status
API's HTTPS Method or
HTTPS Method

200

OK

GET

202

Accepted

POST

PUT

DELETE

400

Bad Request

GET

POST

PUT

DELETE

401

Unauthorized

GET

POST

PUT

DELETE

403

Forbidden

GET

POST

PUT

DELETE

404

Not Found

GET

POST

PUT

DELETE

405

Method Not Allowed

GET

POST

PUT

DELETE

500

Internal Server Error

GET

POST

PUT

DELETE

Host Policy Add

Resource Name

/rest/pmn/hostpolicies/

Description

Method to Get the host instances created. No duplicate policies allowed for Host+hostRole+multiCastIp combination.

https Method

POST/PUT

URL

https://dcnm-ip/rest/pmn/hostpolicies/

Parameter

Parameter
Type
Description

policyName

String

Mandatory - Policy name for this host

Host

String

Mandatory - Id of the host instance that this policy needs to be applied on.

hostRole

Enum

Mandatory - Sender or Receiver

permit

Enum

Mandatory - Yes or No

multiCastIpRange

String

Mandatory - * - for all multicast Groups, or specific unique multicast IP address.

Return Value

Format: JSON

Type: Object

Attribute Name
Type
Description

hostPolicyId

String

Instance id of the hostpolicy defined.

Host Policy Bulk Import

Resource Name

/rest/pmn/hostpolicies/import

Description

Creates a new host instance.

https Method

POST

URL

https://dcnm-ip/rest/pmn/hostpolicies/import

Parameter

Parameter
Type
Description

String payload of CSV File

String

CSV data

Return Value

Format: JSON

Type: Long

Attribute Name
Type
Description

hostid

String

Unique id for the created Host policy instances

Get Host Policies

Resource Name

/rest/pmn/hostpolicies?detail=true

Description

Get a listing of all hostpolicies or specific hostpolicy, given the id.

https Method

GET

URL

https://dcnm-ip/rest/pmn/hostpolicies/ - Get all hostPolicies

https://dcnm-ip/rest/pmn/hostpolicies/{hostpolicyid} - Get all information about specific hostpolicy

Parameter

Parameter
Type
Description

hostpolicyid

String

Optional id parameter, when querying for a specific id.

Return Value

Format: JSON

Type: Long

Attribute Name
Type
Description

Hostpolicy Object

String

Host Policy object created.

Get Hosts

Resource Name

/rest/pmn/host/

Description

Get the host instances created.

https Method

GET

URL

https://dcnm-ip/rest/pmn/host/ -- get all Hosts

https://dcnm-ip/rest/pmn/host/{host_id} -- get Host with specific hostid

Parameter

Parameter
Type
Description

none

String

All hosts created

hostid

String

Request about a particular Host ID

Return Value

Format: JSON

Type: Long

Attribute Name
Type
Description

id

String

Unique id for the Host Instance

name

String

Name of the Host Instance

ipAddress

String

IP Address of the Host Instance

macAddress

String

Mac Address of the Host Instance

ethswitchId

String

Unique id of the device the host is connected to

interfaceId

String

Unique id of the interface instance of the device the host is connected to.

Delete Hosts

Resource Name

/rest/pmn/host/

Description

Deletes the host instances created.

https Method

DELETE

URL

https://dcnm-ip/rest/pmn/host/<hostid>

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Long

Attribute Name
Type
Description

 

 

 

Edit/Update Hosts

Resource Name

/rest/pmn/host/

Description

Delete the host instances created.

https Method

PUT

URL

https://dcnm-ip/rest/pmn/host/<hostid>

Parameter

Parameter
Type
Description

 

 

 

Return Value

Format: JSON

Type: Long

Attribute Name
Type
Description