General API Features

Filtering Result Set

The filtering capability allows the API consumer to filter the JSON response based on one or more optional parameters mentioned in the API request section. This feature is applicable to all the APIs listed in this document.

Example: https://apix.cisco.com/cs/api/v1/devices?customerId=1234&inventoryId=456&deviceId=990

Filtering Data Attributes

API consumers can filter the specific response parameters that they want to see in the JSON response. Refer to each API response parameter to use this capability in association with the keyword “fields”. This feature is applicable to all the APIs listed in this document.

Example: https://apix.cisco.com/cs/api/v1/devices?customerId=1234&fields=deviceId,equipmentId,ipAddress

Wildcard search allows the API consumer to match patterns in JSON response. '*' and '?' are the supported wildcard search.

Asterisks(*) match zero or more characters at the middle or end of the search term. For example, a search for john__*__ finds items that start with john, such as john, johnson, or johnny.

Example: https://apix.cisco.com/cs/api/v1/contracts/contract-details?customerId=1234&page=1&rows=10&serviceLevel=PS*

Question mark(?) matches only one character in the middle or end of the search term. For example, a search for jo**?**n finds items with the term john or joan but not jon or johan.

Example : https://apix.cisco.com/cs/api/v1/contracts/contract-details?customerId=1234&page=1&rows=10&serviceLevel=P?UP

Note: Wildcards as a first character of the search text is not supported. For example *john or ?john are invalid.

Example: https://apix.cisco.com/cs/api/v1/contracts/contract-details?customerId=1234&page=1&rows=10&serviceLevel=*UP

Pagination

The Pagination feature lets the API consumer retrieve the number of records and specific pages in the JSON response. Pagination parameters are “page” and “rows” and are optional. Although pagination parameters are optional, if “page” is added as part of the query parameter, then “rows” must also be part of the query parameter and vice versa. This feature is applicable to all the APIs listed in this document.

Example: https://apix.cisco.com/cs/api/v1/devices?customerId=1234&page=1&rows=8

"pagination": {
    "page": 1,
    "pages": 18,
    "rows": 8,
    "total": 142
}

Sorting

The Sorting feature allows the API consumer to sort the JSON response in ascending or descending order based on the optional request parameters. The request parameter used for this feature is “sort”, the possible values are “ASC” or “DESC”. This feature is applicable to all the APIs listed in this document.

Example: https://apix.cisco.com/cs/api/v1/devices?customerId=1234&sort=deviceId:ASC

API Relationship Diagram

Download Services APIs Relationship Diagram.

Glossary

Term Definition
API Application Program Interface
HTTP Hypertext Transfer Protocol
PIE Program Information Exchange / Package Installation Envelope
PKG Package
SMU Software Maintenance Update
URL Uniform Resource Locator
Composite Network Element A NetworkElement that may be composed of multiple NetworkElements. For example: a stack.