Documents (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

Smart APIs use the Documents resource to support managing documents (and related files) associated with an application.

You will find the Documents 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, the SampleService Smart API does not contain Documents at its service root:

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

But, if you look at the metadata document:

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

you will find Documents bound to the Pipe entity:

<EntityType Name="Pipe" BaseType="Com.Ingr.Sppid.V1.Equipment" OpenType="true">

.

<NavigationProperty Name="Documents" Type="Collection(Com.Ingr.Core.V1.Document)" ContainsTarget="true"/>

.

</EntityType>

And, if you review Document, you will see it contains a collection of Files. It also includes a Kind property of type Com.Ingr.Core.V1.DocumentKind:

<EntityType Name="Document" BaseType="Com.Ingr.Core.V1.DynamicEdmEntityObject" OpenType="true">

.

<Property Name="Kind" Type="Com.Ingr.Core.V1.DocumentKind" />

.

<NavigationProperty Name="Files" Type="Collection(Com.Ingr.Core.V1.File)" ContainsTarget="true" />

</EntityType>

SHARED Tip To use the Document.Kind property in an OData $filter expression, its value must be from the DocumentKind enumeration.

<EnumType Name="DocumentKind">

<Member Name="TwoDimensional" Value="0" />

<Member Name="ThreeDimensional" Value="1" />

<Member Name="LaserScan" Value="2" />

<Member Name="Other" Value="3" />

</EnumType>