Create
This implementation of SNMP V1V2 community string creates a SNMP community string entity in all the devices mentioned in the request.
|
URI |
https://<ipaddress>:8111/cvp-config/snmp/community |
|
HTTP Method |
POST |
|
Input/Output Format |
XML or JSON |
|
Throttled |
Yes For more information on throttling, see Unified CVP REST Request Throttling. |
|
API Type |
Synchronous |
|
Request |
The POST operation on the Service endpoint creates the SNMP Community String in the listed devices and will return the identifier in header. POST https: //api.cvp.com:8111/cvp-config/snmp/community |
|
Authorization |
Basic signaturevalue |
|
Content-type |
Application/XML or Application/JSON |
|
Accept |
Application/XML or Application/JSON |
|
Request Data Structure |
|
| Response Header |
|
|
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. |
|
Parameters |
This implementation of the operation does not use request parameters. |
|
Sample Request |
The POST operation on the service endpoint creates a SNMP community string in the devices listed in the request, and returns the identifier in the header.
|
|
Sample XML Request |
|
|
Sample JSON Request |
|
|
Response |
Return 201 CREATED with the ref URL mentioned in the location header. Use a GET request on the ref URL mentioned in the location header to determine the deployment status of the Create request. |
|
Field Name |
Description |
Data Type |
Size |
UTF-8 |
Required field |
Possible values |
Additional Validations |
|---|---|---|---|---|---|---|---|
|
name |
Represents the Community String name |
String |
1-128 |
Yes |
Yes |
Alphanumeric |
Alphanumeric Dot, underscore and hyphens are allowed. |
|
snmpversion |
Represents the SNMP Version Information |
String |
— |
No |
No |
V1 (default), V2C |
Only V1 or V2C |
|
acceptfromanyhost |
Represents whether to accept requests from any host or not. |
Boolean |
— |
No |
No |
TRUE(default), FALSE |
Only true or false Not case sensitive |
|
hosts |
Represents the wrapper for multiple host fields. |
— |
— |
No |
— |
— |
Accepted only if acceptfromanyhost=false |
|
host |
Represents the management station host IP address. |
String |
— |
No |
No |
— |
A valid ip4 address |
|
accessprivilege |
Represents the access privileges of the community string. |
String |
— |
No |
No |
ReadOnly(default), ReadWrite |
Only ReadOnly or ReadWrite Not case sensitive |
|
servers |
If empty, deploys to all the CVP servers configured. |
Wrapper |
— |
— |
— |
— |
— |
|
server |
Represents the configured CVP Server IP address. |
String |
— |
No |
No |
— |
A valid ip4 address |
For more information on code snippets, see Unified CVP API Client Sample Code.