API Endpoints and Parameters
This topic lists the supported API endpoints, parameters, and the REST API HTTP Response Codes for accessing Data Center Assurance using external APIs.
Supported API Endpoints
DC Assurance supports API requests for the following resources:
- Sites
- Systems
- Links
- Interfaces
There are two types of API endpoints built for each resource type:
-
Collection Retrieval endpoints–used to access groups of related resources. For example,
GET /api/v1/datacenter/orgs/<org-id>/inventory/systems -
Instance Retrieval endpoints–used to access a single, specific resource identified by a unique ID. For example,
GET /api/v1/datacenter/orgs/<org-id>/inventory/systems/<system-id>
Table 1 lists the API endpoints supported on DC Assurance for each resource type.
| Resource Type | API Endpoints |
|---|---|
|
Sites |
|
|
Systems |
|
|
Links |
|
|
Interfaces |
|
Each resource type defines its fields in two categories:
- Core fields–represent the minimal, commonly required attributes of a resource.
- Additional fields–represent less commonly used or optional attributes that require more processing power.
The output for a collection retrieval endpoint returns only the core fields by
default. To include additional fields in the output, use the fields
query parameter.
The output for an instance retrieval endpoint displays both core and additional fields by default.
Supported Parameters
You can add parameters to modify the output of your API request as per your requirements.
The table below describes the supported parameters and their functions, along with their values and an example.
| Parameter | Value | Description | Example |
|---|---|---|---|
|
Field |
Field name(s) |
Enter a comma-separated list of additional field names to include in the response. |
|
|
Expand |
Reference name(s) |
Enter a reference name to view the name field for that reference. |
|
|
Filter |
Filter conditions |
Select a subset of resources based on field values, logical conditions, and grouping. |
See the Supported Operators for Filtering section below for more information. |
|
Sort |
Field name |
Sort by the specified field, either in ascending or descending order. |
|
|
Limit |
Number |
Maximum number of items to return in the response. Default value is 100. |
|
|
Offset |
Number |
Number of items to skip before starting to return results. Default value is 0. |
|
Supported Operators for Filtering
The following table lists the comparison operators supported for the
filter parameter.
| Operator | Description | Example |
|---|---|---|
|
eq |
Equals |
|
|
ne |
Not equals |
|
|
gt |
Greater than |
|
|
ge |
Greater or equal |
|
|
lt |
Less than |
|
|
le |
Less or equal |
|
|
contains |
Array contains specified scalar value |
|
The following table lists the logical operators supported for the
filter parameter.
| Operator | Description | Example |
|---|---|---|
|
and |
Logical AND |
|
|
or |
Logical OR |
|
|
not |
Logical NOT |
|
REST API HTTP Response Codes
After you run the API request on DC Assurance, it returns an output along with one of the following HTTP response codes.
| Status | Description |
|---|---|
200 |
OK. The DC Assurance API understood the call and answered it without errors. |
400 |
Bad Request. The API endpoint exists but its syntax/payload is incorrect. |
401 |
Unauthorized. The authentication towards the DC Assurance API failed. You could receive this code if your token is wrong, or if your token was not sent to the API with the proper format. Validate your authentication information. |
404 |
Not found. The API endpoint doesn’t exist, or the resource doesn’t exist. |