Select lists (OData+) - Intergraph Smart API Manager - 5.0 - Help

Intergraph Smart API Manager Help

Language
English
Product
Intergraph Smart API Manager
Search by Category
Help
Smart API Manager Version
5.0

Many Smart APIs use the concept of a select list (list of enumerated values) as a way to specify the available, valid values for an object property. Select lists are typically used for properties that derive values from standard lookup tables, such as steel tables or nominal pipe diameters.

A typical client UI implementation might involve a drop-down, or some type of pick list, to hold and/or display the values from a select list. The user must use the pick list to specify a value, preventing an invalid entry.

Smart APIs use the SelectLists resource to support these type of enumerated values.

You will find the SelectLists resource in two locations:

  • Bound to instances of an entity set.

  • Exposed as an entity set, directly off of the <service root> URL.

For example, SelectLists is exposed at the service root for the SampleService V2 Smart API:

GET https://sam.spclouddave.com/SampleService/Sppid/v2/SelectLists/

However, the V3 multi-tenant version of the SampleService does not expose SelectLists at the service root. This is due to the design constraints of the multi-tenant pattern. If you look at the V3 metadata document, you will find that SelectLists are exposed as a navigation property from the Plant entity.

https://sam.spclouddave.com/SampleService/Sppid/v3/$metadata

<EntityType Name="Plant"

BaseType="Com.Ingr.Sppid.V3.PlantItemBase">

.

<NavigationProperty Name="SelectLists"

Type="Collection(Com.Ingr.Core.V1.SelectList)"

ContainsTarget="true"/>

.

</EntityType>

You can find SelectLists resources for the two Plant instances at the following URLs:

  • GET https://sam.spclouddave.com/SampleService/Sppid/V3/Sites('Site A')/Plants('Plant A')/SelectLists

  • GET https://sam.spclouddave.com/SampleService/Sppid/V3/Sites('Site A')/Plants('Plant B')/SelectLists