Create

This implementation of SNMP notification destination creates a SNMP notification destination entity.

The following table lists the parameters for both SNMP V1V2 and V3 Notification Destination.

Parameters of SNMP Notification Destination Create

URI

For SNMP V1V2 Notification Destination:

https://<ipaddress>:8111/cvp-config/snmp/destination/v1v2c

For SNMP V3 Notification Destination:

https://<ipaddress>:8111/cvp-config/snmp/destination/v3

HTTP Method

POST

Input/Output Format

XML or JSON

Throttled

Yes.

For more information on throttling, see Unified CVP REST Request Throttling.

Authentication

Yes.

Note
To authenticate a request, user must use valid credentials that are configured in the Operations Console, as anonymous requests are rejected.

API Type

Synchronous

Request

The POST operation on the Service endpoint creates a SNMP notification destination in the listed devices, and returns the identifier in header.

POST https: //api.cvp.com:8111/cvp-config/snmp//cvp-config/snmp/destination/v1v2c

The POST operation on the Service endpoint creates a SNMP v3 Notification Destination in the listed devices and returns the identifier in header.

POST https: //api.cvp.com:8111/cvp-config/snmp//cvp-config/snmp/destination/v3

Authorization

Basic signaturevalue

Content-type

Application/XML or Application/JSON

Accept

Application/XML or Application/JSON

Request Data Structure


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<destination>
    <destname>Public_Dest</destname>
    <ipaddr>127.0.0.1</ipaddr>
    <port>614</port>
    <communityOrUserRef>Public_Community</communityOrUserRef>
    <servers>
        <server>10.78.26.43</server>
    </servers>
</destination>

Response Header


Response headers:
HTTP/1.1 201 Created
...
Location: https://10.78.26.43:8111/cvp-config/snmp/destination/v1v2c/Public_Dest
Content-Type: application/xml
Content-Length: 0
Date: Mon, 26 Aug 2013 09:15:27 GMT

Response Code

400- Bad request. If the request body is invalid.

400- API error . If the object either does not exist or is stale.

401- Authorization Failure(for example, the user is not authenticated in the web session)

404- Not Found (for example, the resource is deleted and is not found )

406- Not Acceptable(for example, the accept headers sent in the request is not acceptable.

500- Internal Server Error( for example, the connection is broken with the database server or ORM or any other component.

503 Service Unavailable. When the request processing threshold is reached.

For more information on error codes and their descriptions, see Unified CVP API Error Codes.

Security Constraints

Only a Serviceability administrator can perform this operation.

Field Names and Data Types Used in the API Parameter

Field Name

Description

Data Type

Size

UTF-8

Required

Possible Values

Additional Validations

destname

Represents the notification destination name .

String

1-128

Yes

Yes

Alphanumeric

Alphanumeric

Dot, underscore and hyphens are allowed.

ipaddr

Represents the ipv4 address of the notification destination host.

String

No

Yes

ipv4 address

A valid ip4 address.

port

Represents the port number of the notification destination host .

Number

No

No

162 (Default), any valid port numbers

Must be between 1 and 65535

communityOrUserRef

If URI ends with V1V2c specify a valid SNMP community string. If URI ends with V3 specify a valid SNMP v3 user name.

String

Yes

Yes

ReadOnly(default), ReadWrite

Must be ReadOnly or ReadWrite (case insensitive)

servers

Represents the backup Syslog Server.

Wrapper

No

If empty or null, deploys to all the CVP servers configured.

server

Represents the Configured CVP Server IP address.

String

No

No

Must be a valid ip4 address.

For more information on code snippets, see Unified CVP API Client Sample Code.