REST Auth API: Entity field metadata
An entity field metadata resource encapsulates the metadata available for a particular entity at a point in time. Metadata in this sense encompasses both native and custom field metadata. Native fields are always part of the platform, whereas Custom fields may vary by platform. Note that both native and custom fields may be disabled for a platform, so may not be expected to be present at all times.
This resource supports retrieval of individual metadata instances and entity related collections of metadata.
The use of the term 'instance' can be somewhat overloaded in this context. A metadata instance is a metadata object, and not a field instance that is associated with an entity. Custom field instances have a 1-1 relationship with a metadata instance.
Metadata instance resource
Currently, the only supported entity names are 'lead' and 'contact'.
Resource URI
/api/2012-02-01/auth/resources/{entityName}/describe/{metadataID}
Resource properties
| Property | Description |
|---|---|
| Name | A string representing the system name of the instance, up to 128 characters in length. |
| Identifier | A Guid representing the system and platform unique identifier for the metadata instance. |
| TypeName |
A string representing the object type that an instance of this field would have. Currently supported types are:
|
| ValidValues | A collection of Item elements, representing a set of strings that define the valid range of values for this resource. |
| UIHints | A container element housing UI directives that the platform uses. |
| UIHints.DefaultLabel | A string that is the UI label for instances of this metadata resource, up to 128 characters long. |
| UIHints.UIType |
A string that is the likely representation of a field instance of this metadata resource in a UI context.
Possible values are:
|
Related resource links
| Link (title) | Description |
|---|---|
| ObjectListContainer | Reference to a ListItems resource associated with this field instance. This link is only applicable for native field metadata (that is indeed associated with a list). |
HTTP GET
Returns a representation of a metadata instance, including the properties and links above.
Optional parameters
There are no supported optional parameters.
Example
GET /api/2012-02-01/auth/resources/lead/describe/82348a62-3c62-4a62-a76d-0ab41d3dda9e/
<?xml version="1.0" encoding="UTF-8"?>
<EntityFieldMetadata>
<CustomFields>
<Field>
<Name>TimeframePrivate</Name>
<Identifier>82348a62-3c62-4a62-a76d-0ab41d3dda9e</Identifier>
<TypeName>String</TypeName>
<UIHints>
<DefaultLabel>Timeframe</DefaultLabel>
<UIType>DropDownList</UIType>
</UIHints>
</Field>
</CustomFields>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/lead/describe/82348a62-3c62-4a62-a76d-0ab41d3dda9e/" />
</EntityFieldMetadata>
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
Not supported.
Entity metadata collection resource
The entity metadata collection resource represents the set of metadata resources associated with an entity.
Resource URI
/api/2012-02-01/auth/resources/{entityName}/describe/
HTTP GET
Returns a representation of the collection as a pre-expanded set of Field elements. There are two distinct top level partitions in the GET response:
- Fields - the parent element for all native field metadata
- CustomFields - the parent element for all custom field metadata
Optional parameters
There are no supported optional parameters.
Example 1
Retrieve a collection of metadata field instances associated the Contact entity type.
There are some noteworth aspects to this example:
- Partitions - the partition between Custom and Native field sets is clearly delineated
- ObjectListContainer link - the PreferredContactMethod Field has an associated list resource
- Custom field valid values - the Ethnicity custom Field has an inlined set of valid values
GET /api/2012-02-01/auth/resources/contact/describe/
<EntityFieldMetadata>
<Fields>
<Field>
<Name>City</Name>
<Identifier>9269f749-bde3-452b-9316-00cbf1051e9b</Identifier>
<TypeName>String</TypeName>
<UIHints>
<DefaultLabel>City</DefaultLabel>
<UIType>TextSingleLine</UIType>
</UIHints>
</Field>
<Field>
<Name>PreferredContactMethod</Name>
<Identifier>b0580553-2ab3-4276-bae2-0b929a8bddc2</Identifier>
<TypeName>String</TypeName>
<UIHints>
<DefaultLabel>Preferred method of contact</DefaultLabel>
<UIType>DropDownList</UIType>
</UIHints>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/related/ObjectListContainer" type="application/xml" title="ObjectListContainer" href="https://demo.arlo.co/api/2012-02-01/auth/resources/lists/d04ed73f-2f10-46c9-b157-69fd234038d9/" />
</Field>
...
</Fields>
<CustomFields>
<Field>
<Name>LastCampaignDate</Name>
<Identifier>a450aa18-49e9-4a3a-a44e-055f92137ff5</Identifier>
<TypeName>Date</TypeName>
<UIHints>
<DefaultLabel>Last date included in campaign</DefaultLabel>
<UIType>Date</UIType>
</UIHints>
</Field>
<Field>
<Name>Website</Name>
<Identifier>be174a8b-9804-45c9-8ecd-120cabf12e56</Identifier>
<TypeName>String</TypeName>
<UIHints>
<UIType>Website</UIType>
</UIHints>
</Field>
<Field>
<Name>Ethnicity</Name>
<Identifier>a65f7a8b-ba12-4138-812a-16074d911561</Identifier>
<TypeName>String</TypeName>
<ValidValues>
<Item>Concrete Care</Item>
<Item>General Hire</Item>
<Item>Group Support Office</Item>
<Item>Lift and Shift</Item>
<Item>Pump and Power</Item>
<Item>Traffic Management</Item>
<Item>NZ European/Pakeha</Item>
<Item>Maori</Item>
<Item>Pasifika</Item>
<Item>Asian</Item>
<Item>Other</Item>
</ValidValues>
<UIHints>
<DefaultLabel>Ethnicity</DefaultLabel>
<UIType>DropDownList</UIType>
</UIHints>
</Field>
...
</CustomFields>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contact/describe/" />
</EntityFieldMetadata>
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
Not supported.
