Send Requests
Use these guidelines when sending requests using the REST API for Oracle Communications Unified Assurance Vision.
URL Structure
The URL structure for the requests is:
https://host:9443/vision/api/<resourcePath>
- <host> is the host where Unified Assurance is running.
- <resourcePath> is the path to the resource for the request. For example, generalSettings, entities, or layers.
Authorization Header
You must specify the CA certificate, user certificate, and key in the request's authorization header. You can use the following default Unified Assurance files when making requests as the default api user:
- <UA_home>/etc/ssl/BundleCA.crt
- <UA_home>/etc/ssl/User-api.crt
- <UA_home>/etc/ssl/User-api.key
You can configure your REST client with the certificates, or reference them in the cURL request with the following parameters:
--cacert $A1BASEDIR/etc/ssl/BundleCA.crt --cert $A1BASEDIR/etc/ssl/User-api.crt --key $A1BASEDIR/etc/ssl/User-api.key
For example, to authenticate a request for the api user to see general Vision settings:
curl --cacert $A1BASEDIR/etc/ssl/BundleCA.crt --cert $A1BASEDIR/etc/ssl/User-api.crt --key $A1BASEDIR/etc/ssl/User-api.key -X GET https://<hostFQDN>:9443/vision/api/generalSettings
See Authenticate for more information about authentication and authorization for the REST API.
Request Methods
You can perform basic CRUD operations (create, read, update, and delete) on a resource by using standard HTTP method requests, as summarized in the following table.
HTTP Method | Description |
---|---|
GET
|
Retrieve information about a resource. |
POST
|
Create a resource. |
PUT
|
Update a resource, replacing the entire existing definition with a new one. |
PATCH |
Update only specified fields of a resource. |
DELETE
|
Delete a resource. |
Request Media Types
The REST API supports the following media types:
- application/json: For most endpoints.
- multipart/form-data: For endpoints that accept CSV files.
Response Body Format
The response body media type is application/json. For many requests, the JSON includes a wrapper object with the following basic structure:
"ResourceWrapper<ResourceName>":{
"properties":{
"columns":{
"items":{
"$ref":"#/components/schemas/ColumnData"
},
"type":"array"
},
"content":{
"allOf":[
{
"$ref":"#/components/schemas/<ResourceName>"
}
]
},
"links":{
"items":{
"$ref":"#/components/schemas/Link"
},
"type":"array"
}
}, "type":"object"
}
Many Vision resources are presented in table format in the UI. The ColumnData schema referenced in the columns property contains configurations for the columns of the table, including width, name, sorting information, CSS classes, and so on.
The schemas referenced in the content property contain the data about the resource. Values from these schemas populate the table cells in the UI.
The schema referenced in the links property contains a list of links related to the resource, including the URI of the resource itself.