Fortinet white logo
Fortinet white logo

Rest API

7.4.0

Get /host/search

Get /host/search

Description

Returns all Host Records which match the supplied filter, searching Hosts, Users, and Adapters

Request Headers

Key

Value

Type

Description

Authorization Bearer <Authorization Token> String Authorization credential generated by FortiNAC
Content-Type (option 1) application/json String

Content-Type (option 2)

application/xml

Request Body Parameters

Name

Required

Type

filter Optional Array
start Optional Integer
count Optional Integer
sortKey Optional String
sortDir Optional String

Sample Request

Request URL

GET https://10.106.94.152:8443/api/v2/host/search

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Sample Response

"status": "success",

"errorMessage": null,

"results": [

{

"landscape": 345052093136,

"id": 1904,

"state": 0,

"notes": null,

"version": 1.6,

"creationTime": "2024-02-15T23:03:19.954+0000",

"validForTime": "2024-03-16T23:03:19.954+0000",

"lastSuccessfulPoll": 0,

"applications": null,

"hostName": "DESKTOP-J7CBSQ0",

"owner": null,

"policy": null,

"hardwareType": null,

"status": 0,

"patchManagementVendor": null,

"patchManagementID": null,

"attributes": [],

"adapters": [

"00:50:56:B5:24:EA"

],

"role": null,

"type": 9,

"directoryPolicyValue": null,

"agentVersion": null,

"agentID": null,

"agentSN": null,

"agentTag": null,

"agentPlatform": null,

"iconType": "windows",

"reValidation": false,

"criticality": null,

"reValidationInterval": 0,

"lastReValidation": 0,

"openPorts": null,

"reValidationAction": {

"disable": false,

"version": 1.0

},

"domainId": -1,

"loggedOnUserId": null,

"policyHints": null,

"managedByMDM": false,

"mdmCompromised": false,

"mdmCompliance": false,

"mdmDataProtection": false,

"mdmPasscodePresent": false,

"connected": false,

"ip": null,

"auditObjectName": "DESKTOP-J7CBSQ0",

"auditObjectType": {

"auditTableName": "HOSTRECORDAudit",

"mysqlTableName": "HOSTRECORD",

"idnameQuery": "select id,hostName from HOSTRECORD where id in"

},

"addAuditSummary": "",

"expired": false,

"scanOnConnect": false,

"vpnclient": false,

"operatingSystem": "Windows 10",

"agentPlatformEnum": null,

"atRisk": false,

"pendingAtRisk": false,

"disabled": false,

"directoryDisabled": false,

"connectedAdapter": null,

"adapterObjects": [

{

"landscape": 345052093136,

"id": 1904,

"identification": null,

"state": 0,

"type": 9,

"vendorName": "VMware, Inc.",

"parent": null,

"lastSuccessfulPoll": null,

"status": 0,

"version": 3.3,

"user": null,

"clientState": 0,

"creationTime": "2024-02-15T23:03:19.954+0000",

"mediumType": null,

"location": null,

"container": null,

"dpcRuleId": -1,

"dpcRuleName": null,

"accessValue": null,

"authType": -1,

"innerEapType": -1,

"outerEapType": -1,

"ips": [],

"hostID": 1904,

"attributes": [],

"device": false,

"physicalAddress": "00:50:56:B5:24:EA",

"auditObjectName": "00:50:56:B5:24:EA",

"auditObjectType": {

"auditTableName": "DYNAMICAudit",

"mysqlTableName": "DYNAMIC",

"idnameQuery": "select id,physAddr from DYNAMIC where id in"

},

"addAuditSummary": "",

"destroyEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_DESTROYED",

"elementType": 8,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Destroyed."

},

"creationEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_CREATED",

"elementType": 8,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Created."

},

"establishedEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_CONNECTED",

"elementType": 52,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Connected to and in Container Unknown."

},

"lostEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_DISCONNECTED",

"elementType": 52,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Disconnected."

},

"ipaddress": null,

"userID": null,

"directoryPolicyValue": null,

"operatingSystem": "Windows 10",

"allIPsString": "",

"firstName": null,

"lastName": null,

"hardwareType": null,

"pctype": null,

"authTypeStr": null,

"innerEapTypeStr": "",

"outerEapTypeStr": "",

"iconType": null,

"name": "VMware, Inc.",

"hostName": "DESKTOP-J7CBSQ0"

}

],

"adaptersAsString": "00:50:56:B5:24:EA",

"adapterIpAsString": "",

"adapterLocation": "",

"adapterContainerAsString": "",

"pcserialNumber": null,

"validForTimeOffline": 1209600000,

"primaryMac": "00:50:56:B5:24:EA",

"validTime": 1710630199954,

"offlineAgeTime": 1709247799954,

"vulnerabilityScanStatus": -1,

"vulnerabilityScanDate": 0,

"notAuthenticated": false,

"typeLabel": "Rogue",

"userLoggedOn": false,

"scanned": false,

"dialUpClient": false,

"inTopology": false,

"messageReceiver": false,

"name": "DESKTOP-J7CBSQ0 00:50:56:B5:24:EA",

"lastModifiedBy": "SYSTEM",

"lastModifiedDate": "2024-02-15T23:03:19.958+0000"

}

],

"filtered": 1,

"total": 1

}

Get /host/search

Get /host/search

Description

Returns all Host Records which match the supplied filter, searching Hosts, Users, and Adapters

Request Headers

Key

Value

Type

Description

Authorization Bearer <Authorization Token> String Authorization credential generated by FortiNAC
Content-Type (option 1) application/json String

Content-Type (option 2)

application/xml

Request Body Parameters

Name

Required

Type

filter Optional Array
start Optional Integer
count Optional Integer
sortKey Optional String
sortDir Optional String

Sample Request

Request URL

GET https://10.106.94.152:8443/api/v2/host/search

Request Header

Authorization: Bearer <Authorization_Token>

Content-Type: application/json

Sample Response

"status": "success",

"errorMessage": null,

"results": [

{

"landscape": 345052093136,

"id": 1904,

"state": 0,

"notes": null,

"version": 1.6,

"creationTime": "2024-02-15T23:03:19.954+0000",

"validForTime": "2024-03-16T23:03:19.954+0000",

"lastSuccessfulPoll": 0,

"applications": null,

"hostName": "DESKTOP-J7CBSQ0",

"owner": null,

"policy": null,

"hardwareType": null,

"status": 0,

"patchManagementVendor": null,

"patchManagementID": null,

"attributes": [],

"adapters": [

"00:50:56:B5:24:EA"

],

"role": null,

"type": 9,

"directoryPolicyValue": null,

"agentVersion": null,

"agentID": null,

"agentSN": null,

"agentTag": null,

"agentPlatform": null,

"iconType": "windows",

"reValidation": false,

"criticality": null,

"reValidationInterval": 0,

"lastReValidation": 0,

"openPorts": null,

"reValidationAction": {

"disable": false,

"version": 1.0

},

"domainId": -1,

"loggedOnUserId": null,

"policyHints": null,

"managedByMDM": false,

"mdmCompromised": false,

"mdmCompliance": false,

"mdmDataProtection": false,

"mdmPasscodePresent": false,

"connected": false,

"ip": null,

"auditObjectName": "DESKTOP-J7CBSQ0",

"auditObjectType": {

"auditTableName": "HOSTRECORDAudit",

"mysqlTableName": "HOSTRECORD",

"idnameQuery": "select id,hostName from HOSTRECORD where id in"

},

"addAuditSummary": "",

"expired": false,

"scanOnConnect": false,

"vpnclient": false,

"operatingSystem": "Windows 10",

"agentPlatformEnum": null,

"atRisk": false,

"pendingAtRisk": false,

"disabled": false,

"directoryDisabled": false,

"connectedAdapter": null,

"adapterObjects": [

{

"landscape": 345052093136,

"id": 1904,

"identification": null,

"state": 0,

"type": 9,

"vendorName": "VMware, Inc.",

"parent": null,

"lastSuccessfulPoll": null,

"status": 0,

"version": 3.3,

"user": null,

"clientState": 0,

"creationTime": "2024-02-15T23:03:19.954+0000",

"mediumType": null,

"location": null,

"container": null,

"dpcRuleId": -1,

"dpcRuleName": null,

"accessValue": null,

"authType": -1,

"innerEapType": -1,

"outerEapType": -1,

"ips": [],

"hostID": 1904,

"attributes": [],

"device": false,

"physicalAddress": "00:50:56:B5:24:EA",

"auditObjectName": "00:50:56:B5:24:EA",

"auditObjectType": {

"auditTableName": "DYNAMICAudit",

"mysqlTableName": "DYNAMIC",

"idnameQuery": "select id,physAddr from DYNAMIC where id in"

},

"addAuditSummary": "",

"destroyEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_DESTROYED",

"elementType": 8,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Destroyed."

},

"creationEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_CREATED",

"elementType": 8,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Created."

},

"establishedEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_CONNECTED",

"elementType": 52,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Connected to and in Container Unknown."

},

"lostEvent": {

"landscape": -1,

"id": -1,

"state": 1,

"name": "ROGUE_MOBIL_DISCONNECTED",

"elementType": 52,

"elementID": 1904,

"elementName": null,

"message": null,

"timeOfEvent": "2024-02-29T22:49:13.104+0000",

"version": 1.3,

"time": 1709246953104,

"empty": false,

"eventFormatString": "Rogue Host 00:50:56:B5:24:EA Disconnected."

},

"ipaddress": null,

"userID": null,

"directoryPolicyValue": null,

"operatingSystem": "Windows 10",

"allIPsString": "",

"firstName": null,

"lastName": null,

"hardwareType": null,

"pctype": null,

"authTypeStr": null,

"innerEapTypeStr": "",

"outerEapTypeStr": "",

"iconType": null,

"name": "VMware, Inc.",

"hostName": "DESKTOP-J7CBSQ0"

}

],

"adaptersAsString": "00:50:56:B5:24:EA",

"adapterIpAsString": "",

"adapterLocation": "",

"adapterContainerAsString": "",

"pcserialNumber": null,

"validForTimeOffline": 1209600000,

"primaryMac": "00:50:56:B5:24:EA",

"validTime": 1710630199954,

"offlineAgeTime": 1709247799954,

"vulnerabilityScanStatus": -1,

"vulnerabilityScanDate": 0,

"notAuthenticated": false,

"typeLabel": "Rogue",

"userLoggedOn": false,

"scanned": false,

"dialUpClient": false,

"inTopology": false,

"messageReceiver": false,

"name": "DESKTOP-J7CBSQ0 00:50:56:B5:24:EA",

"lastModifiedBy": "SYSTEM",

"lastModifiedDate": "2024-02-15T23:03:19.958+0000"

}

],

"filtered": 1,

"total": 1

}