Send Requests
Use these guidelines when sending requests using the REST API for Oracle Communications Unified Assurance Core.
URL Structure
The URL structure for the requests is:
https://host:port/resource-path
-
host:port
: Host and port where Unified Assurance is running. -
resource-path
: The path that defines the resource.
Supported 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 an object. |
POST |
Create an object. Can also be used in some update and batch delete requests. |
PUT |
Update an object. |
DELETE |
Delete an object. |
Media Types
The Unified Assurance REST API supports the application/json
media type.
Common Query Parameters
For most GET requests, you can use the query parameters described in the table to limit the results returned. Each request described in this guide specifies which query parameters are supported.
Parameter | Description | Value |
---|---|---|
start | The page from which the list of results that are returned should start from. Used in conjunction with the limit parameter. | An integer. For example, start=2. |
limit | The maximum number of results to return in a single page. | An integer. For example, limit=5. |
query | A simple string to filter the results by. This is a primitive filter, generally applied as a filter on a name parameter, but each endpoint implements it differently. | A string. For example, query=myDevice. |
filter | The properties to filter the results by. This parameter's value is a JSON object that specifies property names and values, the operator to use, and the conjunctions to use between the properties. If you use multiple JSON objects to combine filters, you cannot combine OR and AND conjunctions. The conjunction used for the last object applies to the entire list. For example, although the following uses AND in the first item, only the OR from the final item applies. This filter would return all devices in Zone 2, all devices named Device1, and all devices named Device2 .
|
A JSON object in the following format:
In the example:
|
sort | The field and direction to sort the results by. This parameter's value is a JSON object. |
A JSON object in the following format:
In the example:
|
For example, while searching for devices, you could use the following request to return five results per page, and start at the third page:
curl -X GET 'http://host:port/api/device/devices?limit=5&start=3'