Fortinet white logo
Fortinet white logo

Integration API Guide

Update Device by Id

Update Device by Id

This POST API allows user to update the CMDB device attributes for a CMDB Device. The device need to specified device id, that can be obtained via the Get CMDB Device List API. Only the attributes that need to be updated should be sent as part of API.

Release Added 6.5.0
Input URL

https://<FortiSIEM_Supervisor_IP>/phoenix/rest/device/update?deviceId=<device_id>&updateMode=OVERWRITE|APPEND

Input Credentials
  • Enterprise deployments: User name and password of any FortiSIEM account that has the appropriate access. Use "super" as the organization for Enterprise deployments.
    Curl example: curl -k -u super/admin:Admin*123
  • Service Provider deployments: User name and password of Super Global account or Organization specific account and name. Make sure that the account has the appropriate access.
    Curl example with super organization: curl -k -u super/admin:Admin*123
    If querying for a specific organization, replace "super" with the organization name.
HTTP Method POST
Request Path Parameters

Field

Type Description
deviceId string Device Id in CMDB - ids can be obtained via the Get CMDB Device List API.
updateMode long

Two values are allowed.

  • OVERWRITE – meaning overwrite the value like name
    or

  • APPEND – meaning add like network interface

Request Body

You need to create an XML as in Add CMDB Device(s) API to include the device attributes that you want to update and pass it in the HTTP request.

A sample XML file for OVERWRITE-ing a device host name is File7_OVERWRITE_DeviceExample.xml. A sample XML file for APPEND-ing a device network Interface is File7_APPEND_DeviceExample.xml. The schema XSD is File8_deviceAPPENDExample.xsd. For an explanation the attribute definitions, see Appendix - Description of Device Attributes.

Output

When the request succeeds (HTTP response code 200), the following message will appear depending on the update status.

  • If update succeeds, a message “Successfully updated device” is returned.

  • If update fails, a proper error message e.g. “Invalid Device Id” is returned.

Invalid attributes are ignored, and valid attributes are updated.

Update Device by Id

Update Device by Id

This POST API allows user to update the CMDB device attributes for a CMDB Device. The device need to specified device id, that can be obtained via the Get CMDB Device List API. Only the attributes that need to be updated should be sent as part of API.

Release Added 6.5.0
Input URL

https://<FortiSIEM_Supervisor_IP>/phoenix/rest/device/update?deviceId=<device_id>&updateMode=OVERWRITE|APPEND

Input Credentials
  • Enterprise deployments: User name and password of any FortiSIEM account that has the appropriate access. Use "super" as the organization for Enterprise deployments.
    Curl example: curl -k -u super/admin:Admin*123
  • Service Provider deployments: User name and password of Super Global account or Organization specific account and name. Make sure that the account has the appropriate access.
    Curl example with super organization: curl -k -u super/admin:Admin*123
    If querying for a specific organization, replace "super" with the organization name.
HTTP Method POST
Request Path Parameters

Field

Type Description
deviceId string Device Id in CMDB - ids can be obtained via the Get CMDB Device List API.
updateMode long

Two values are allowed.

  • OVERWRITE – meaning overwrite the value like name
    or

  • APPEND – meaning add like network interface

Request Body

You need to create an XML as in Add CMDB Device(s) API to include the device attributes that you want to update and pass it in the HTTP request.

A sample XML file for OVERWRITE-ing a device host name is File7_OVERWRITE_DeviceExample.xml. A sample XML file for APPEND-ing a device network Interface is File7_APPEND_DeviceExample.xml. The schema XSD is File8_deviceAPPENDExample.xsd. For an explanation the attribute definitions, see Appendix - Description of Device Attributes.

Output

When the request succeeds (HTTP response code 200), the following message will appear depending on the update status.

  • If update succeeds, a message “Successfully updated device” is returned.

  • If update fails, a proper error message e.g. “Invalid Device Id” is returned.

Invalid attributes are ignored, and valid attributes are updated.