Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
GET snmp_notification_agents
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a list of all SNMP agents configurations.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/.format
Example Request
GET
Code Block | ||
---|---|---|
| ||
[ { "SnmpNotificationAgent": { "id": 1, "title": "Default", "ip_address": "192.168.0.85", "port": 162, "community": "public", "network_id": 0, "keep_alive_interval": null, "send_clear_notification": 1, "modified": "1611142282208", "created": "1611142282208" } }, { "SnmpNotificationAgent": { "id": 2, "title": "test_SNMP", "ip_address": "10.20.45.30", "port": 162, "community": "public", "network_id": 1, "keep_alive_interval": null, "send_clear_notification": 1, "modified": "1619958809886", "created": "1619952146657" } } ] |
GET snmp_notification_agents/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a single SNMP Agent configuration data.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired agent. |
Example Request
GET
Code Block | ||
---|---|---|
| ||
{ "SnmpNotificationAgent": { "id": 1, "title": "Default", "ip_address": "192.168.0.85", "port": 162, "community": "public", "network_id": 0, "keep_alive_interval": null, "send_clear_notification": 1, "modified": "1611142282208", "created": "1611142282208" } } |
POST snmp_notification_agents
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | POST |
Adds a new SNMP agent.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/.format
Example Request
POST
Body
Code Block | ||
---|---|---|
| ||
{"SnmpNotificationAgent": { "id": 2, "title": "snmpAgent1", "ip_address": "192.168.0.101", "port": 162, "community": "public", "network_id": 0, "keep_alive_interval": null, "send_clear_notification": 0, "modified": "1385281627933", "created": "1385281627933" }} |
Response
Code Block | ||
---|---|---|
| ||
{ "SnmpNotificationAgent": { "id": 3, "title": "snmpAgent1", "ip_address": "192.168.0.101", "port": 162, "community": "public", "network_id": 0, "keep_alive_interval": null, "send_clear_notification": 0, "modified": "1619959069274", "created": "1619959069274" } } |
POST snmp_notification_agents/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | POST |
Duplicates a specific SNMP Agent into a new one, resulting in identical agent data except for the title.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the agent to be copied. |
Example Request
POST
Code Block | ||
---|---|---|
| ||
{
"SnmpNotificationAgent": {
"id": 4,
"title": "snmpAgent1_2",
"ip_address": "192.168.0.101",
"port": 162,
"community": "public",
"network_id": 0,
"keep_alive_interval": null,
"send_clear_notification": 0,
"modified": "1619959118394",
"created": "1619959118394"
}
} |
PUT snmp_notification_agents/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | PUT |
Updates a specific SNMP agent data.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired agent to be updated. |
Example Request
PUT
Body
Code Block | ||
---|---|---|
| ||
{ "SnmpNotificationAgent": { "community": "public", "ip_address": "192.168.0.91", "keep_alive_interval": "", "network_id": "0", "port": "162", "send_clear_notification": "1", "title": "EDIT_snmpAgent1" } } |
Response
Code Block |
---|
{ "SnmpNotificationAgent": { "id": 3, "title": "EDIT_snmpAgent1", "ip_address": "192.168.0.91", "port": 162, "community": "public", "network_id": 0, "keep_alive_interval": null, "send_clear_notification": 1, "modified": "1619959178064", "created": "1619959069274" } } |
DELETE notification_agents/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | DELETE |
Deletes a specific SNMP Agent.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired agent to be deleted. |
Example Request
DELETE
Code Block | ||
---|---|---|
| ||
{ "success": true } |
GET snmp_notification_agents/command/test/{id}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Sends test SNMP notification for an existing agent.
Resource URL
http://{host}/api/2.0/snmp_notification_agents/command/test/{id}/.format
Parameters
Parameter | Data Type | Description |
---|---|---|
id | integer | The ID of the desired agent to send SNMP notification. |
Example Request
GET
Code Block | ||
---|---|---|
| ||
{ "Task": { "id": 663421, "device_id": 9011, "type": "Agent Test", "type_id": 12, "mode": "Starting", "mode_id": 1, "status": null, "description": null, "total": 0, "completed": 0, "time_remained": 0, "modified": "1619958918069" } } |