Fortinet black logo

Administration Guide

Add or update an dndpoint - JSON/XML

Copy Link
Copy Doc ID 868f1267-7299-11e9-81a4-00505692583a:631184
Download PDF

Add or update an dndpoint - JSON/XML

Add or update a host with a JSON object {Endpoint}.

https://<servername>:8443/api/host

Return value

Type

Description

id

Integer

ID that uniquely identifies the endpoint.

createTime

Time

Date and time that this endpoint was created.

atRisk

Boolean

If true, endpoint has been marked at risk.

connected

Boolean

True = Endpoint is connected.

enabled

Boolean

If true, endpoint is enabled

deviceType

String

Type of the endpoint, such as, an IP Phone.

ipAddress

String

List of IP addresses assigned to the interfaces on the endpoint separated by commas.

macAddress

String

List of MAC addresses on the endpoint separated by commas.

Note

MAC address values are case sensitive and are stored as uppercase values.

location

String

Name of the connection location, such as a port name.

hardwareType

String

Type of hardware, such as, a PC .

hostName

String

Host name of the endpoint.

loggedOnUser

String

User ID of the logged on user.

owner

String

User ID of the user to whom this endpoint is registered.

notes

String

Notes entered on the host record.

os

String

Operating System on the endpoint.

serialNumber

String

Serial Number of the endpoint.

Example request

curl -k -u '<username>:<password>' -H "accept: application/json" -H "content-type: application/json" -X POST -d '{"id":3691,"role":"MyNewRole","deviceType":"Registered Host"}' https://<servername>:8443/api/host

curl -k -u '<username>:<password>' -H "accept: application/xml" -H "content-type: application/xml" -X POST -d '<endpoint><id>3691</id><role>MyNewRole</role></endpoint>' https://<servername>:8443/api/host

Example XML format

<endpointResult>

<status>success</status>

<errorMessage></errorMessage>

<endpoints>

<endpoint>

<atRisk>false</atRisk>

<connected>false</connected>

<createTime>2017-01-25T10:22:57.121-05:00</createTime>

<deviceType>Registered Host</deviceType>

<enabled>true</enabled>

<id>3691</id>

<macAddress>00:30:48:92:86:32</macAddress>

<role>MyNewRole</role>

</endpoint>

</endpoints>

</endpointResult>

Add or update an dndpoint - JSON/XML

Add or update a host with a JSON object {Endpoint}.

https://<servername>:8443/api/host

Return value

Type

Description

id

Integer

ID that uniquely identifies the endpoint.

createTime

Time

Date and time that this endpoint was created.

atRisk

Boolean

If true, endpoint has been marked at risk.

connected

Boolean

True = Endpoint is connected.

enabled

Boolean

If true, endpoint is enabled

deviceType

String

Type of the endpoint, such as, an IP Phone.

ipAddress

String

List of IP addresses assigned to the interfaces on the endpoint separated by commas.

macAddress

String

List of MAC addresses on the endpoint separated by commas.

Note

MAC address values are case sensitive and are stored as uppercase values.

location

String

Name of the connection location, such as a port name.

hardwareType

String

Type of hardware, such as, a PC .

hostName

String

Host name of the endpoint.

loggedOnUser

String

User ID of the logged on user.

owner

String

User ID of the user to whom this endpoint is registered.

notes

String

Notes entered on the host record.

os

String

Operating System on the endpoint.

serialNumber

String

Serial Number of the endpoint.

Example request

curl -k -u '<username>:<password>' -H "accept: application/json" -H "content-type: application/json" -X POST -d '{"id":3691,"role":"MyNewRole","deviceType":"Registered Host"}' https://<servername>:8443/api/host

curl -k -u '<username>:<password>' -H "accept: application/xml" -H "content-type: application/xml" -X POST -d '<endpoint><id>3691</id><role>MyNewRole</role></endpoint>' https://<servername>:8443/api/host

Example XML format

<endpointResult>

<status>success</status>

<errorMessage></errorMessage>

<endpoints>

<endpoint>

<atRisk>false</atRisk>

<connected>false</connected>

<createTime>2017-01-25T10:22:57.121-05:00</createTime>

<deviceType>Registered Host</deviceType>

<enabled>true</enabled>

<id>3691</id>

<macAddress>00:30:48:92:86:32</macAddress>

<role>MyNewRole</role>

</endpoint>

</endpoints>

</endpointResult>