Read APIs - Intergraph Smart Form Generator - Customization & Programming - Hexagon PPM

Intergraph Smart Form Generator Web API Reference

PPMProduct
Intergraph Smart Form Generator
PPMCategory_custom
Customization & Programming

The following APIs are provided in Smart Form Generator. OData actions are called with HTTP POST method.

The authoring application needs to have the token in the header when calling these Web APIs.

Request available Form templates for an Entity

Element

Description

Type

Notes

GetSfgTemplatesByEntity

Fetch a list of form templates related to an entity

String

Top level

The following table lists the input parameters used with the /GetSfgTemplatesByEntity action, to expose system objects.

Parameters

Description

Type

Notes

ToolBaseURL

The URL for authoring tool's Web API server.

String

Required. For example from Smart Instrumentation server:
https://srvsiqasfg1.ingrnet.com/api/si/v2

Site

Site name where data entity is located

String

Required. For example: Intergraph

PlantGroup

Plant name where data entity is located

String

Required. For example: LondonPlant

EntityType

Type of Entity to retrieve form templates for

String

Required. For example: Cables

The response from Smart Form Generator returns a list of available form templates for the selected entity. There could be more than one form template for each entity. The response contains the following JSON array of elements:

  • TemplateID

  • TemplateName

  • TemplateDescription

  • TemplateRetrievalArgumentName

  • TemplateQueryType

  • ProviderID

    Below is the response to form templates for a Cable EntityType. This is a subset of two forms out of all the forms retrieved .

    {\"TemplateID\":\"1dc183c9c7ff4b9ead8e5466d2ea8309\",\"TemplateName\":\" Cable2\",\"TemplateDescription\":\"\",\" TemplateRetrievalArgumentName \":\"HighestPlantGroup\",\" TemplateQueryType \":\"SystemQuery\"\",\"ProviderID\":\"a37444d37c7049e59bb4b43d6e7e4071\"},

    {\"TemplateID\":\"635d4b54640049e9bce08854c5edf200\",\"TemplateName\":\" Cable3\",\"TemplateDescription\":\"\",\" TemplateRetrievalArgumentName \":\"CableDescription\",\" TemplateQueryType \":\"CustomQuery\",\"ProviderID\":\"a37444d37c7049e59bb4b43d6e7e4071\"

    }

Request a URL from Smart Form Generator server for the entity selected in the previous API

Request to generate a URL (link) for the specified entity, which opens a Smart Form Generator's associated form in your browser's window. Subsequently, this URL opens the form populated with live data in a view-only format.

Element

Description

Type

Notes

GetExternalLinkToViewTemplate

Fetch a URL to a form templates for a selected entity

String

Top level

The following table lists the input parameters used with the /GetExternalLinkToViewTemplate action, to expose system objects.

Parameters

Description

Type

Notes

SfgServerURL

Smart Form Generator server where the authoring tool is listed as a data source.

String

For example:
https://sfgserver.MyCompany.com/

ToolBaseURL

The URL for authoring tool's Web API server.

String

For example: https://PIDserver.MyCompany.com/api/pid/v2

ProviderID

An alphanumeric value of the Provider, as returned in the output of the previous API.

String

Needs to be copied from the response of the /GetSfgTemplatesByEntity.

For example: a37444d37c7049e59bb4b43d6e7e407

TemplateID

An alphanumeric value of the form template you want to open in Smart Form Generator's form viewer.

String

Needs to be copied from the list of available templates available in the response of the /GetSfgTemplatesByEntity.

NavigationURL

The path to the selected entity's location in the Site (Site/Plant/Project), in order to open its related form..

String

For example: "Sites('SFGQA1')/PlantGroups('DEMO2')/Projects('0')/ViewTypeProject('125')"

RetrievalArgumentValue

The value of retrieval argument which was defined for the form template.

String

For example:

FT - D/P TYPE FLOW TRANSMITTER

HierarchicalNavigation

The path to the selected entity in the Site's hierarchy (in order to open the entity's associated form).

String. Optional parameter

For example: In case of an SI "EDE View query" or item type, the path is to the Plant/Area/Unit.

Site

The selected entity's Site name in the authoring application.

String

PlantGroup

The selected entity's Plant name in the authoring application.

String

UserName

An account registered with Intergraph SmartĀ® API Manager (SAM), or any other authorization server, and credentials to access both SFG and the data in the authoring application.

String

For example: c2ZndXNlcg==

UserPassword

Password associated with the above account.

String

For example:U2ZndXNlci41NTU=

ClientID

Identity of the Resource Owner (OIDC identity provider).

String

For example: RkI3NTU1MDAtRjcwRS00RkRGLTkxN0ItODI3M0I0RDU4RkFG

ClientSecret

A password generated with the OIDC above.

String

For example: L3dQPWteMVc4LUByX3JZaHVRYkVKL2Z9bk1WOz94NHEuWTQkWF9teXtmRkVnP3ghKHpFL3ZPMjY9eypvQFVCeQ==

An example of Smart Form Generator's URL response:

https://sfgserver.MyCompany.com/sfg/ExternalLink/?ProviderId=515dc2ebfb124f198609c2f3b97a10ee&TemplateID=f8f795d2353148f498d5a0a63cb8ebbc&ToolBaseUrl=aHR0cHM6Ly9pc3J2c3Fhc2ZnMS5pbmdybmV0LmNvbS9hcGkvc2kvdjI=&PartitionData=U0ZHUUExL0RFTU8=&NavigationURL=aHR0cHM6Ly9pc3J2c3Fhc2ZnMS5pbmdybmV0LmNvbS9hcGkvc2kvdjIvU2l0ZXMoJ1NGR1FBMScpL1BsYW50R3JvdXBzKCdERU1PMicpL1Byb2plY3RzKCcwJykvVmlld1R5cGVQcm9qZWN0KCcxMjUnKS9WaWV3VHlwZUVkZSgnMzA2ODYnKQ==&RetrievalArgumentValue=RlQgLSBEL1AgVFlQRSBGTE9XIFRSQU5TTUlUVEVS&HierarchicalNavigation=L0hpZ2hlc3RQbGFudEdyb3VwcygnNDAwMycpL0ludGVybWVkaWF0ZVBsYW50R3JvdXBIaWdoZXN0UGxhbnRHcm91cCgnNDAwOCcpL0xvd2VzdFBsYW50R3JvdXBJbnRlcm1lZGlhdGVQbGFudEdyb3VwKCc0MDEzJyk=&UserName=c2ZndXNlcg==&UserPassword=U2ZndXNlci41NTU=&ClientID=RkI3NTU1MDAtRjcwRS00RkRGLTkxN0ItODI3M0I0RDU4RkFG&ClientSecret=L3dQPWteMVc4LUByX3JZaHVRYkVKL2Z9bk1WOz94NHEuWTQkWF9teXtmRkVnP3ghKHpFL3ZPMjY9eypvQFVCeQ==

Create an External Link Manually

You can create an external link manually without using the API above. To formulate such a link use the following elements in this format.

{SfgServerURL/ExternalLink}?ParamName={ParamValue}& ParamName={ParamValue}

  • SfgServerURL - Smart Form Generator server where the authoring tool is listed as a data source.

  • /ExternalLink - routing part of Smart Form Generator server. It is appended after SfgServerURL. For example: {SfgServerURL/ExternalLink}.

  • ParamName - are the parameters of the /GetExternalLinkToViewTemplate API , listed in the table above. For example: TemplateID={f8f795d2353148f498d5a0a63cb8ebbc}.

    All the parameter values {ParamValue} are encoded using Base64 Encoder. With the exception of these: SfgServerURL, ProviderID and TemplateID.

    An example of the complete URL syntax:

    {SfgServerURL/sfg/ExternalLink}?ProviderID={ParamValue}&TemplateID={ ParamValue }&ToolBaseURL={ ParamValue }&PartitionData={ ParamValue }&NavigationURL={ ParamValue }&RetrievalArgumentValue={ ParamValue }&HierarchicalNavigation={ ParamValue }&UserName={ ParamValue }&UserPassword={ ParamValue }&ClientID={ ParamValue }&ClientSecret={ ParamValue }