Upload Snmp Actions

Upload Snmp Actions

API to upload a seed file containing a single action. Only files of ".xml" type are accepted. To upload an Snmp Action its corresponding mask must exist. If the mask does not exist then an error is thrown.

Request
URI
POST
https://{api_host}/tcsa/api/v1/snmp/actions/upload
COPY
Query Parameters
string
snmpIntegration
Optional

The name of the current snmp integration

snmpIntegration example
snmp-integation

Request Body
SnmpFileObject of type(s) multipart/form-data
Required
{
    "file": "string"
}
string As binary As binary
file
Required

The actual file that is uploaded. This can be a csv, txt, or xml file.

Authentication
This operation uses the following authentication methods.
Responses
200

OK Returned uploaded snmpAction

Returns SnmpAction of type(s) application/json
{
    "loadFactor": 5,
    "capabilityName": "CISCO-IPSLA-STATSTABLE",
    "defaultPollingPeriod": 0,
    "discoveryPasses": [
        {
            "capabilityConditionGroup": [
                {
                    "invertResult": false,
                    "name": "SingleOidContainsSnmpCondition",
                    "matchValue": "\\\\.1\\\\.3\\\\.6\\\\.1\\\\.4\\\\.1\\\\.9\\\\..*",
                    "oid": ".1.3.6.1.2.1.1.2.0"
                }
            ]
        },
        {
            "capabilityConditionGroup": [
                {
                    "invertResult": false,
                    "name": "TableColumnExistsSnmpCondition",
                    "matchValue": "",
                    "oid": ".1.3.6.1.4.1.9.9.42.1.3.1.1.5"
                },
                {
                    "invertResult": false,
                    "name": "TableColumnExistsSnmpCondition",
                    "matchValue": "",
                    "oid": ".1.3.6.1.4.1.9.9.42.1.3.2.1.1"
                }
            ]
        }
    ]
}
string
capabilityName
Required

The name of the action/capability

integer
loadFactor
Optional
Constraints: default: 1

The load this capability will have on a collector

integer
defaultPollingPeriod
Optional
Constraints: default: 0

The polling period for all polling groups which use this capability

array of object
discoveryPasses
Required

The list of rules for this action


400

BAD REQUEST Error in request sent

Returns SnmpError of type(s) application/json
"SnmpError Object"
string
code
Optional

This code refers to the internal error codes used in the code base.

string
reason
Optional

This specifies the reason for failure.

string
status
Optional

This specifies the HTTP status code error


500

INTERNAL SERVER ERROR Error on the server

Returns SnmpError of type(s) application/json
"SnmpError Object"
string
code
Optional

This code refers to the internal error codes used in the code base.

string
reason
Optional

This specifies the reason for failure.

string
status
Optional

This specifies the HTTP status code error


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/tcsa/api/v1/snmp/actions/upload