Sites API - POST sites

Applies to NAM 2019

Adds specified sites to the sites configuration on a server.

POST
  • url https://{console-host}:{console-port}/cxf/api/v1/config/sites/server/{connectionKey}

Parameters

Parameter Type Description In Required
connectionKey

Device address and port (for example, 1.1.1.1:80).

path required

Request body

The request body (json format) defines sites in the following format. Note that NAM 2019 Service Pack 1 adds the ability to define subnets.

Subnets

Applies to NAM 2019 Service Pack 1

Starting with NAM 2019 Service Pack 1, you can alternatively specify a subnet in the domains subsection of your site definitions for PUT and POST requests.

The following two examples specify the same site.

However, even if you use subnet to define a site, a subsequent GET request returns the following response with the subnet translated to a first and last address range.

Response format

A successful request doesn't return any content.

Response codes

Code Description
200 The sites configuration has been updated.
400 The request was invalid.
404 The device was not found.

Example

A GET request of the form

GET https://console-address:console-port/cxf/api/v1/config/sites/server/server-address:server-port

returns a list (json format) of all sites defined on NAM Server server-address:server-port such as

To post a new list of sites, issue a POST request of the form

POST https://console-address:console-port/cxf/api/v1/config/sites/server/server-address:server-port

with the entire site list (now edited or replaced) in the payload (json format).