# SNMPFetcher

## SNMPFetcher - Create

Creates an SNMP fetcher with device ID.

**POST**

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

### 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                                                              |
| charset         |           Charset | String | Existing LogPoint charset. Obtain the value of the required charset using Charsets - List API. Mandatory Field                                                    |
| communitystring |  Community String | String | Authentication string. Mandatory only when the value of the snmpver parameter is "v\_12". Optional Field                                                          |
| device\_id      |                 - | String | Device id. Use the value of the id parameter of the required Devices from the Devices - List API. Optional Field                                                  |
| policy\_id      |                 - | String | Respective LCP policy ID. Obtain the value of the required policy\_id using LogCollectionPolicies - List API. Optional Field                                      |
| port            |              Port |    int | Access Port number. 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 from ProcessingPolicy - List API to obtain Processing Policy id. Mandatory Field |
| snmp\_policy    |       SNMP Policy | String | SNMP Policy name. Use the value of name parameter of the required SNMP Policy from the SNMPPolicy - 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

{% code title="" %}

```json
{
    "data": {
        "authkey": "adjfghnljen12412452",
        "charset": "utf_8",
        "device_id": "57724aacd8aaa40b569bcb1f",
        "port": 161,
        "privkey": "adsfjadls;jfhgaosdh1235423523",
        "processpolicy": "57724aacd8aaa40b569bcb1fasd",
        "snmp_policy": "windows_snmp",
        "snmpver": "v_3",
        "username": "SNMPTest"
    }
}
```

{% endcode %}

### Success Response

{% code title="" %}

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

{% endcode %}

## SNMPFetcher - Edit

Edits an SNMP fetcher with given ID.

**PUT**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/SNMPFetcher/{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                                                                                                                                                       |
| charset         |           Charset | String | Existing LogPoint charset. Obtain the value of the required charset using Charsets - List API. Mandatory Field                                                                                                                                             |
| communitystring |  Community String | String | Authentication string. Mandatory only when the value of the snmpver parameter is "v\_12". Optional Field                                                                                                                                                   |
| id              |                 - | String | SNMP Fetcher uuid. To obtain the SNMP fetcher 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 |
| port            |              Port |    int | Access Port number. 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 from ProcessingPolicy - List API to obtain Processing Policy id. Mandatory Field                                                                                          |
| snmp\_policy    |       SNMP Policy | String | SNMP Policy name. Use the value of name parameter of the required SNMP Policy from the SNMPPolicy - 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

{% code title="" %}

```json
{
    "data": {
        "authkey": "adjfghnljen12412452",
        "charset": "utf_8",
        "port": 161,
        "privkey": "adsfjadls;jfhgaosdh1235423523",
        "processpolicy": "57724aacd8aaa40b569bcb1fasd",
        "snmp_policy": "windows_snmp",
        "snmpver": "v_3",
        "username": "SNMPTest"
    }
}
```

{% endcode %}

### Success Response

{% code title="" %}

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

{% endcode %}

***

## SNMPFetcher - TestExisting

Tests the existing SNMP Fetcher connection.

**POST**

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

### Parameters

| Field | Label in UI |   Type | Description                                                                                            |
| ----- | ----------: | -----: | ------------------------------------------------------------------------------------------------------ |
| id    |           - | String | SNMPFetcher uuid. Use the id of the required SNMP Fetcher from the Devices - List API. Mandatory Field |

### Request Example

{% code title="" %}

```json
{
    "data": {}
}
```

{% endcode %}

### Success Response

{% code title="" %}

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

{% endcode %}

## SNMPFetcher - TestNew

Tests the newly created SNMP Fetcher connection.

**POST**

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

### 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                                                              |
| charset         |           Charset | String | Existing LogPoint charset. Obtain the value of the required charset using Charsets - List API. Mandatory Field                                                    |
| communitystring |  Community String | String | Authentication string. Mandatory only when the value of the snmpver parameter is "v\_12". Optional Field                                                          |
| device\_id      |                 - | String | Device id. Use the value of the id parameter of the required Devices from the Devices - List API. Mandatory Field                                                 |
| port            |              Port |    int | Access Port number. 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 from ProcessingPolicy - List API to obtain Processing Policy id. Mandatory Field |
| snmp\_policy    |       SNMP Policy | String | SNMP Policy name. Use the value of name parameter of the required SNMP Policy from the SNMPPolicy - 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

{% code title="" %}

```json
{
    "data": {
        "authkey": "adjfghnljen12412452",
        "charset": "utf_8",
        "device_id": "57724aacd8aaa40b569bcb1f",
        "port": 161,
        "privkey": "adsfjadls;jfhgaosdh1235423523",
        "processpolicy": "57724aacd8aaa40b569bcb1fasd",
        "snmp_policy": "windows_snmp",
        "snmpver": "v_3",
        "username": "SNMPTest"
    }
}
```

{% endcode %}

### Success Response

{% code title="" %}

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

{% endcode %}

## SNMPFetcher - Trash

Deletes the SNMP Fetcher with given ID.

**DELETE**

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

### Parameters

| Field | Label in UI |   Type | Description                                                                                                                                                                                                                                                |
| ----- | ----------: | -----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id    |           - | String | SNMP Fetcher uuid. To obtain the SNMP fetcher 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

{% code title="" %}

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

{% endcode %}
