Fortinet white logo
Fortinet white logo

REST API Solution Guide

SNMP community hosts (/snmp/[id]/hosts/)

SNMP community hosts (/snmp/[id]/hosts/)

URL : https://[server_name]/api/v1/snmp/[id]/hosts/

This endpoint is used to configure the allowed hosts of SNMP v1/v2 communities.

Supported fields

Field

Display name

Type

Required

Other restrictions

address

IP or subnet of the allowed host(s)

String

Yes

query

Allow host(s) to query the SNMP community

Boolean

No

Default is disabled.

trap

Enable sending traps to the host

Boolean

No

Only available to single IP host (always disabled for subnets).

Allowed methods

HTTP method

Resource URI

Action

GET

/api/v1/snmp/[id]/hosts/

Retrieve all hosts for SNMP community with ID id.

GET

/api/v1/snmp/[id]/hosts/[hid]/

Retrieve host with ID hid for SNMP community with ID id.

POST

/api/v1/snmp/[id]/hosts/

Create new host for SNMP community with ID id.

PATCH

/api/v1/snmp/[id]/hosts/[hid]/

Update host with ID hid for SNMP community with ID id.

DELETE

/api/v1/snmp/[id]/hosts/[hid]/

Delete host with ID hid for SNMP community with ID id.

SNMP community hosts (/snmp/[id]/hosts/)

SNMP community hosts (/snmp/[id]/hosts/)

URL : https://[server_name]/api/v1/snmp/[id]/hosts/

This endpoint is used to configure the allowed hosts of SNMP v1/v2 communities.

Supported fields

Field

Display name

Type

Required

Other restrictions

address

IP or subnet of the allowed host(s)

String

Yes

query

Allow host(s) to query the SNMP community

Boolean

No

Default is disabled.

trap

Enable sending traps to the host

Boolean

No

Only available to single IP host (always disabled for subnets).

Allowed methods

HTTP method

Resource URI

Action

GET

/api/v1/snmp/[id]/hosts/

Retrieve all hosts for SNMP community with ID id.

GET

/api/v1/snmp/[id]/hosts/[hid]/

Retrieve host with ID hid for SNMP community with ID id.

POST

/api/v1/snmp/[id]/hosts/

Create new host for SNMP community with ID id.

PATCH

/api/v1/snmp/[id]/hosts/[hid]/

Update host with ID hid for SNMP community with ID id.

DELETE

/api/v1/snmp/[id]/hosts/[hid]/

Delete host with ID hid for SNMP community with ID id.