Fortinet white logo
Fortinet white logo

List all sites for an organization

List all sites for an organization

Method

URL

Description

Arguments

Outputs

GET

device/site/list/customer/{Organization ID}/

List all sites for this organization

Organization ID

JSON array

Arguments (URL)

Parameter

Type

Description

Organization ID

int

The organization ID.

Arguments (JSON payload)

None

Outputs

Parameter

Type

Description

results

JSON array

Array of site records. One entry per site, each record contains a unique ID.

Example request

curl -k -X GET -H "Authorization: Token 7f89ef48dc5bca218a8ac0268653ffafa74ce6a6ed7a8a703e113b13219b18a6" https://<ip_address>/fpc/v1/api/device/site/list/customer/10/

Example response

{
  "data": {
    "totalResultsCount": 2,
    "results": [
      {
        "id": 6,
        "vdoms": [
          {
            "id": 16,
            "fortimanager": {
              "id": 4,
              "name": "FMG-7.2-11",
              "host": "10.5.1.11",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:00.932838Z",
              "port": 443,
              "xmlPort": 8080,
              "sn": "FMG-VMTMXXXXXXXX",
              "version": "v7.2.3-build1405 230606 (GA)",
              "numericVersion": "7.2.3",
              "ha": false,
              "polling": 51
            },
            "fortianalyzer": {
              "id": 4,
              "numericVersion": "7.2.3",
              "name": "FAZ-7.2-31",
              "host": "10.5.1.31",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:02.022982Z",
              "port": 443,
              "sn": "FAZ-VMTMXXXXXXXX",
              "version": "v7.2.3-build1405 230606 (GA)",
              "polling": 51
            },
            "adom": {
              "id": 17,
              "fortimanager": {
                "id": 4,
                "name": "FMG-7.2-11",
                "host": "10.5.1.11",
                "username": "fpc",
                "status": true,
                "last_poll_time": "2023-06-30T01:30:00.932838Z",
                "port": 443,
                "xmlPort": 8080,
                "sn": "FMG-VMTMXXXXXXXX",
                "version": "v7.2.3-build1405 230606 (GA)",
                "numericVersion": "7.2.3",
                "ha": false,
                "polling": 51
              },
              "name": "root",
              "oid": 3,
              "version": "7.2",
              "flags": "no_vpn_console",
              "customer": [
                10
              ]
            },
            "policypackage": {
              "id": 20,
              "name": "FGT-41",
              "status": "imported",
              "isEnable": true
            },
            "aps": [],
            "switches": [],
            "name": "root",
            "sn": "FGVM08TMXXXXXXXX",
            "devid": "FGT-41",
            "alias": "",
            "vdom_oid": 3,
            "device_oid": 197,
            "version": "7.2.5",
            "platform": "FortiGate-VM64",
            "status": "synchronized",
            "device_ha": false,
            "device_ha_info": "",
            "latitude": 49.28273,
            "longitude": -123.120743,
            "fortigate_name": "FGT-41",
            "display_name": "root/FGT-41/root",
            "site": 6
          }
        ],
        "aps": [],
        "switches": [],
        "name": "test-site-7.2",
        "contactName": "",
        "email": "",
        "phone": "",
        "sandbox": false,
        "customer": 10,
        "user": [
          12
        ]
      },
      {
        "id": 8,
        "vdoms": [
          {
            "id": 17,
            "fortimanager": {
              "id": 5,
              "name": "FMG-7.4-12",
              "host": "10.5.1.12",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:01.245036Z",
              "port": 443,
              "xmlPort": 8080,
              "sn": "FMG-VMTMXXXXXXX",
              "version": "v7.4.1-build2257 230614 (Interim)",
              "numericVersion": "7.4.1",
              "ha": false,
              "polling": 51
            },
            "fortianalyzer": {
              "id": 5,
              "numericVersion": "7.4.1",
              "name": "FAZ-7.4-32",
              "host": "10.5.1.32",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:02.494347Z",
              "port": 443,
              "sn": "FAZ-VMTMXXXXXXXX",
              "version": "v7.4.1-build2257 230614 (Interim)",
              "polling": 51
            },
            "adom": {
              "id": 19,
              "fortimanager": {
                "id": 5,
                "name": "FMG-7.4-12",
                "host": "10.5.1.12",
                "username": "fpc",
                "status": true,
                "last_poll_time": "2023-06-30T01:30:01.245036Z",
                "port": 443,
                "xmlPort": 8080,
                "sn": "FMG-VMTMXXXXXXXX",
                "version": "v7.4.1-build2257 230614 (Interim)",
                "numericVersion": "7.4.1",
                "ha": false,
                "polling": 51
              },
              "name": "root",
              "oid": 3,
              "version": "7.4",
              "flags": "no_vpn_console",
              "customer": [
                10
              ]
            },
            "policypackage": {
              "id": 29,
              "name": "FGT-42",
              "status": "out of sync",
              "isEnable": false
            },
            "aps": [],
            "switches": [],
            "name": "root",
            "sn": "FGVM08TMXXXXXXXX",
            "devid": "FGT-42",
            "alias": "",
            "vdom_oid": 3,
            "device_oid": 162,
            "version": "7.4.0",
            "platform": "FortiGate-VM64",
            "status": "synchronized",
            "device_ha": false,
            "device_ha_info": "",
            "latitude": 49.28273,
            "longitude": -123.120743,
            "fortigate_name": "FGT-42",
            "display_name": "root/FGT-42/root",
            "site": 8
          }
        ],
        "aps": [],
        "switches": [],
        "name": "test-site-7.4",
        "contactName": "",
        "email": "",
        "phone": "",
        "sandbox": false,
        "customer": 10,
        "user": [
          12
        ]
      }
    ]
  },
  "status": {
    "code": 0,
    "message": "success"
  }
}

List all sites for an organization

List all sites for an organization

Method

URL

Description

Arguments

Outputs

GET

device/site/list/customer/{Organization ID}/

List all sites for this organization

Organization ID

JSON array

Arguments (URL)

Parameter

Type

Description

Organization ID

int

The organization ID.

Arguments (JSON payload)

None

Outputs

Parameter

Type

Description

results

JSON array

Array of site records. One entry per site, each record contains a unique ID.

Example request

curl -k -X GET -H "Authorization: Token 7f89ef48dc5bca218a8ac0268653ffafa74ce6a6ed7a8a703e113b13219b18a6" https://<ip_address>/fpc/v1/api/device/site/list/customer/10/

Example response

{
  "data": {
    "totalResultsCount": 2,
    "results": [
      {
        "id": 6,
        "vdoms": [
          {
            "id": 16,
            "fortimanager": {
              "id": 4,
              "name": "FMG-7.2-11",
              "host": "10.5.1.11",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:00.932838Z",
              "port": 443,
              "xmlPort": 8080,
              "sn": "FMG-VMTMXXXXXXXX",
              "version": "v7.2.3-build1405 230606 (GA)",
              "numericVersion": "7.2.3",
              "ha": false,
              "polling": 51
            },
            "fortianalyzer": {
              "id": 4,
              "numericVersion": "7.2.3",
              "name": "FAZ-7.2-31",
              "host": "10.5.1.31",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:02.022982Z",
              "port": 443,
              "sn": "FAZ-VMTMXXXXXXXX",
              "version": "v7.2.3-build1405 230606 (GA)",
              "polling": 51
            },
            "adom": {
              "id": 17,
              "fortimanager": {
                "id": 4,
                "name": "FMG-7.2-11",
                "host": "10.5.1.11",
                "username": "fpc",
                "status": true,
                "last_poll_time": "2023-06-30T01:30:00.932838Z",
                "port": 443,
                "xmlPort": 8080,
                "sn": "FMG-VMTMXXXXXXXX",
                "version": "v7.2.3-build1405 230606 (GA)",
                "numericVersion": "7.2.3",
                "ha": false,
                "polling": 51
              },
              "name": "root",
              "oid": 3,
              "version": "7.2",
              "flags": "no_vpn_console",
              "customer": [
                10
              ]
            },
            "policypackage": {
              "id": 20,
              "name": "FGT-41",
              "status": "imported",
              "isEnable": true
            },
            "aps": [],
            "switches": [],
            "name": "root",
            "sn": "FGVM08TMXXXXXXXX",
            "devid": "FGT-41",
            "alias": "",
            "vdom_oid": 3,
            "device_oid": 197,
            "version": "7.2.5",
            "platform": "FortiGate-VM64",
            "status": "synchronized",
            "device_ha": false,
            "device_ha_info": "",
            "latitude": 49.28273,
            "longitude": -123.120743,
            "fortigate_name": "FGT-41",
            "display_name": "root/FGT-41/root",
            "site": 6
          }
        ],
        "aps": [],
        "switches": [],
        "name": "test-site-7.2",
        "contactName": "",
        "email": "",
        "phone": "",
        "sandbox": false,
        "customer": 10,
        "user": [
          12
        ]
      },
      {
        "id": 8,
        "vdoms": [
          {
            "id": 17,
            "fortimanager": {
              "id": 5,
              "name": "FMG-7.4-12",
              "host": "10.5.1.12",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:01.245036Z",
              "port": 443,
              "xmlPort": 8080,
              "sn": "FMG-VMTMXXXXXXX",
              "version": "v7.4.1-build2257 230614 (Interim)",
              "numericVersion": "7.4.1",
              "ha": false,
              "polling": 51
            },
            "fortianalyzer": {
              "id": 5,
              "numericVersion": "7.4.1",
              "name": "FAZ-7.4-32",
              "host": "10.5.1.32",
              "username": "fpc",
              "status": true,
              "last_poll_time": "2023-06-30T01:30:02.494347Z",
              "port": 443,
              "sn": "FAZ-VMTMXXXXXXXX",
              "version": "v7.4.1-build2257 230614 (Interim)",
              "polling": 51
            },
            "adom": {
              "id": 19,
              "fortimanager": {
                "id": 5,
                "name": "FMG-7.4-12",
                "host": "10.5.1.12",
                "username": "fpc",
                "status": true,
                "last_poll_time": "2023-06-30T01:30:01.245036Z",
                "port": 443,
                "xmlPort": 8080,
                "sn": "FMG-VMTMXXXXXXXX",
                "version": "v7.4.1-build2257 230614 (Interim)",
                "numericVersion": "7.4.1",
                "ha": false,
                "polling": 51
              },
              "name": "root",
              "oid": 3,
              "version": "7.4",
              "flags": "no_vpn_console",
              "customer": [
                10
              ]
            },
            "policypackage": {
              "id": 29,
              "name": "FGT-42",
              "status": "out of sync",
              "isEnable": false
            },
            "aps": [],
            "switches": [],
            "name": "root",
            "sn": "FGVM08TMXXXXXXXX",
            "devid": "FGT-42",
            "alias": "",
            "vdom_oid": 3,
            "device_oid": 162,
            "version": "7.4.0",
            "platform": "FortiGate-VM64",
            "status": "synchronized",
            "device_ha": false,
            "device_ha_info": "",
            "latitude": 49.28273,
            "longitude": -123.120743,
            "fortigate_name": "FGT-42",
            "display_name": "root/FGT-42/root",
            "site": 8
          }
        ],
        "aps": [],
        "switches": [],
        "name": "test-site-7.4",
        "contactName": "",
        "email": "",
        "phone": "",
        "sandbox": false,
        "customer": 10,
        "user": [
          12
        ]
      }
    ]
  },
  "status": {
    "code": 0,
    "message": "success"
  }
}