Meta API
The Digital.ai Agility Meta API provides read-only information about all the assets contained within Agility including their types,attributes,relationships,and the operations that they support. In addition, it allows you to discover information such as which attribute definitions are required, what content is valid for an attribute, which attributes belong to which asset types, and what custom fields an asset contains. For example, the Meta API will indicate that the Story asset type has an attribute definition called Estimate which is a Numeric attribute type and is not required.
Each asset type contains a collection of attribute definitions, a collection of operations, and a number of useful attribute definitions for things like sorting. Each attribute definition describes the type of data it can contain as well as whether it is required, read only, and mult-value. Each operation contains a reference to an attribute definition that can be used to determine whether the specific operation can be executed on a given asset.
Unlike other Agility API implementations, the Meta API does not require authentication.
Query Structure
The Meta API uses the meta.v1 endpoint and its general query structure is as follows:
<Server Base URI>/meta.v1/{asset type}/{attribute|operation}
Where asset is the name of the asset that you wish to retrieve the metadata for. The name that you use for the asset is the internal asset type name, which may or may not be the same name used within the Agility user interface.
In addition, you may also query for a specific attribute or operation that a specific asset may have.
Viewing Results
When using the Meta API, the HTTP response is always returned with a content type of "text/xml", and depending on the amount of data returned, can be difficult to read when viewing the results in a browser. To help with Meta API result readability,
{{Core}}
provides an XSL stylesheet that can be used to format the raw XML results.
To use the stylesheet, simply add xslas a query string parameter to the Meta API queryand set its value to api.xsl as in the following:
<Server Base URI>/meta.v1/{asset type}?xsl=api.xsl
Example Queries
- Retrieve metadata for a specific asset type
- Retrieve metadata for a specific attribute definition
- Retrieve metadata for a specific operation
- Retrieve metadata for all system assets