Skip to main content
Version: Early Access

Retrieve metadata for a specific attribute definition

This topic explains how to retrieve metadata for a specific attribute definition.

Query

The following is the general structure of a Meta API query will retrieve metadata for a specific attribute definition:

            <Server Base URI>/meta.v1/{asset type}/{attribute}

The following Meta API query will retrieve metadata for theNameattribute of the Story asset type:

            <Server Base URI>/meta.v1/Story/Name

Results

            <AttributeDefinition href="/VersionOne/meta.v1/Story/Name" of="/VersionOne/meta.v1/Story" version="14.2.6.6082" name="Name" token="Story.Name" displayname="AttributeDefinition'Name'Story" attributetype="Text" isreadonly="False" isrequired="True"ismultivalue="False" iscanned="True" iscustom="False">
<Base href="/VersionOne/meta.v1/BaseAsset/Name" tokenref="BaseAsset.Name"/>
<OrderByAttribute href="/VersionOne/meta.v1/Story/Name" tokenref="Story.Name"/>
</AttributeDefinition>

The root element is calledAttributeDefinition. It contains anofattribute which indicates the URL of the asset type that the attribute belongs to. It also contains anameattribute and atokenattribute. When an attribute definition reference is used, it will contain either an attribute calledtokenrefornamerefwhich corresponds directly to an attribute definitionstokenandnameattributes respectfully.

Thedisplaynameattribute is an unlocalized string that can be passed to the Localization API to retrieve a meaningful name for the attribute definition.

Theattributetypeattribute indicates what type of data this attribute definition represents. See the list of attribute types for more information.

Finally the node contains anisreadonlyattribute which indicates that the attribute is read only and cannot be updated or set, anisrequiredattribute which indicates that the attribute is required to save or update an asset of the specific asset type, and finally anismultivalueattribute which indicates that there may be multiple values for the attribute definition.

Currently only attribute definitions of typeRelationmay be multi-value attribute definitions.