DSL API (BYOQ - Bring Your Own Query)
This page will serve as a reference for how to use the A&AI DSL API and commonly used DSL queries.
Before You Start!
It's important that you engage the AAI team before running any adhoc DSL queries. The current process is to have the AAI team vet the DSL queries to make sure the traversal used is optimal and does not cause performance issues in A&AI. As edge rules and schema may change, it is important for clients to communicate the DSL queries that they use. It's important that, at the very least, we know who is using which queries so we can be cautious of changes in the future. And we can help you find the best way to get the data you need.
- 1 Before You Start!
- 2 Getting Started with the DSL API
- 2.1 Output Formats
- 2.2 Optional Query Parameters
- 2.2.1 Depth
- 2.2.2 Nodes Only
- 2.2.3 Subgraph
- 2.3 Payload
- 3 DSL Query Format
Getting Started with the DSL API
To execute a DSL query, a client will perform a PUT on the dsl endpoint and include a payload that includes the dsl query to be run. The version dictates which release's REST API version the output will be based on.
|
When calling the dsl API, the client must specify the output format as a query string. DSL API supports all formats that are supported by custom query API.
Output Formats
count
Provides a count of the objects returned in the query.
id
Provides an array of objects containing resource-type (A&AI's node type; i.e., generic-vnf) and a resource-link using the vertex ID from A&AI's graph.
pathed
Provides an array of objects containing resource-type (A&AI's node type; i.e., generic-vnf) and a resource-link using the A&AI REST API pathed URIs.
resource
Provides the each object in the results array in the same format as A&AI's REST API with depth = 1 (first level children and cousin relationships).
resource_and_url
Provides each object in the results array in the same format as A&AI's REST API with depth = 1 (first level children and cousin relationships) plus the pathed url for the result object in A&AI.
simple
Provides each result object in a simplified format. The node-type, graph vertex id, pathed url, object properties, and directly related objects in the graph are all returned. Both direct parent/child objects and cousin objects are included in the related-to array.
graphson
Provides the results using the graphson standard.