# SNMPTrapCollector

## SNMPTrapCollector - Create

Creates an SNMP Trap Collector.

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/SNMPTrapCollector
```

#### Parameters

| Field           |        Label in UI | Type   | Description                                                                                                                                                          |
| --------------- | -----------------: | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| authkey         |  Authorization Key | String | Authentication key. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                 |
| communitystring |   Community String | String | Authentication string. Mandatory only when the value of the snmpver parameter is "v\_12". Optional Field                                                             |
| device\_id      |                  - | String | Existing Device id. Obtain the value of the required device\_id using Devices - List API. Optional Field                                                             |
| engineId        | Security Engine ID | String | Identifier of the remote SNMP protocol engine. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                      |
| policy\_id      |                  - | String | Respective LCP policy ID. Obtain the value of the required policy\_id using LogCollectionPolicies - List API. Optional Field                                         |
| privkey         |        Private Key | String | Encryption key. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                     |
| processpolicy   |  Processing Policy | String | Existing Processing Policy id or None (exact). Use the value of the id parameter of the required Processing Policy from ProcessingPolicy - List API. Mandatory Field |
| snmpver         |       SNMP Version | String | Value must be "v\_3" or "v\_12". Mandatory Field                                                                                                                     |
| username        |           Username | String | SNMP username. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                      |

#### Request Example

```json
{
    "data": {
        "communitystring": "public",
        "device_id": "57724aacd8aaa40b569bcb1f",
        "processpolicy": "57724aacd8aaa40b569bcb1fasd",
        "snmpver": "v_12"
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## SNMPTrapCollector - Edit

Edits the SNMP Trap Collector with given ID.

**PUT**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/SNMPTrapCollector/{id}
```

#### Parameters

| Field           |        Label in UI | Type   | Description                                                                                                                                                                                                                                                              |
| --------------- | -----------------: | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| authkey         |  Authorization Key | String | Authentication key. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                                                                                                                     |
| communitystring |   Community String | String | Authentication string. Mandatory only when the value of the snmpver parameter is "v\_12". Optional Field                                                                                                                                                                 |
| engineId        | Security Engine ID | String | Identifier of the remote SNMP protocol engine. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                                                                                          |
| id              |                  - | String | SNMP Trap Collector uuid. To obtain the SNMP trap collector uuid, execute Devices - List API if the collector was configured using device id or execute LogCollectionPolicies - List API if the collector was configured using log collection policy id. Mandatory Field |
| privkey         |        Private Key | String | Encryption key. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                                                                                                                         |
| processpolicy   |  Processing Policy | String | Existing Processing Policy id or None (exact). Use the value of the id parameter of the required Processing Policy from ProcessingPolicy - List API. Mandatory Field                                                                                                     |
| snmpver         |       SNMP Version | String | Value must be "v\_3" or "v\_12". Mandatory Field                                                                                                                                                                                                                         |
| username        |           Username | String | SNMP username. Mandatory only when the value of the snmpver parameter is "v\_3". Optional Field                                                                                                                                                                          |

#### Request Example

```json
{
    "data": {
        "communitystring": "public",
        "processpolicy": "57724aacd8aaa40b569bcb1fasd",
        "snmpver": "v_12"
    }
}
```

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## SNMPTrapCollector - Trash

Deletes the SNMP Trap Collector with given ID.

**DELETE**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/SNMPTrapCollector/{id}
```

#### Parameters

| Field | Label in UI | Type   | Description                                                                                                                                                                                                                                                              |
| ----- | ----------: | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id    |           - | String | SNMP Trap Collector uuid. To obtain the SNMP trap collector uuid, execute Devices - List API if the collector was configured using device id or execute LogCollectionPolicies - List API if the collector was configured using log collection policy id. Mandatory Field |

#### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```
