Functionalities

Metadata Request

Your applications can query the metadata of the OData service. To get the metadata of the OData service, you must make a HTTP GET call.

RESOURCE

AttributesValues
HTTP MethodGET
Resource URL{{host}}/meridum/odata/$metadata

HEADERS

NameValue
MeridiumToken{{meridiumtoken}}

Entity Collection Request

To query the list of entities for a family, you must make a HTTP GET call.

RESOURCE

AttributesValues
HTTP MethodGET
Resource URL{{host}}/meridium/api/odata/{entity_name}

HEADERS

NameValue
MeridiumToken{{meridiumtoken}}

Sample Query

{{host}}/Meridium/api/odata/Work_Order?$count=true

Note: The default page size is 1000.

Entity by Id Request

To query an entity based on id, you must make a HTTP GET call.

RESOURCE

AttributesValues
HTTP MethodGET
Resource URL{{host}}/Meridum/api/odata/{entity_name}({entityid})

HEADERS

NameValue
MeridiumToken{{meridiumtoken}}

Sample Query

{{host}}/Meridium/api/odata/Work_Order(2003303)

Entity Property Request

To query a property of an entity based on id, you must make a HTTP GET call.

RESOURCE

AttributesValues
HTTP MethodGET
Resource URL{{host}}/Meridum/api/odata/{entity_name}({entityid})/{property_name}

HEADERS

NameValue
MeridiumToken{{meridiumtoken}}

Sample Query

{{host}}/Meridium/api/odata/Work_Order(2003303)/Work_Order_ID

Entity Count Request

To find the number of existing entities for a family, you must make a HTTP GET call.

RESOURCE

AttributesValues
HTTP MethodGET
Resource URL{{host}}/Meridum/api/odata/{entity_name}/$count

HEADERS

NamesValue
MeridiumToken{{meridiumtoken}}

Sample Query

{{host}}/Meridum/api/odata/Work_Order/$count

Configure Page Size

About This Task

You can configure the page size of the OData request payload.

Procedure

  1. Access the Web.config file.
  2. In the appSettings section, modify the ODATA_PAGE_SIZE value.
    Note: The default page size is 1000.
    Configuration KeyValueType
    ODATA_PAGE_SIZE 1000Integer
  3. Save the Web.config file.

Power M Query

The following is a sample query to authenticate the GE Digital APM environment and retrieve the metadata.


let
    actualUrl = "{{host}}/Meridum/api/core/security/login",
    body = Text.ToBinary("{""DatasourceId"":""datasource"",""Id"":""user"",""Password"":""pwd""}"),
    options = [Headers =[#"Content-type"="application/json"], Content=body],
    Source = Web.Contents(actualUrl, options),
    retVal = Json.Document(Source,65001),
    token = retVal[sessionId],
    feed = OData.Feed("{{host}}/Meridum/api/odata/", null, [Headers = [ MeridiumToken= token ]])
    in
    feed