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.
Attributes | Values |
---|---|
HTTP Method | GET |
Resource URL | {{host}}/meridium/api/odata/$metadata |
Name | Value |
---|---|
MeridiumToken | {{meridiumtoken}} |
Entity Collection Request
To query the list of entities for a family, you must make a HTTP GET call.
Attributes | Values |
---|---|
HTTP Method | GET |
Resource URL | {{host}}/Meridium/api/odata/{entity_name} |
Name | Value |
---|---|
MeridiumToken | {{meridiumtoken}} |
Sample Query
{{host}}/Meridium/api/odata/Work_Order?$count=true
Entity by Id Request
To query an entity based on id, you must make a HTTP GET call.
Attributes | Values |
---|---|
HTTP Method | GET |
Resource URL | {{host}}/Meridium/api/odata/{entity_name}({entityid}) |
Name | Value |
---|---|
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.
Attributes | Values |
---|---|
HTTP Method | GET |
Resource URL | {{host}}/Meridium/api/odata/{entity_name}({entityid})/{property_name} |
Name | Value |
---|---|
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.
Attributes | Values |
---|---|
HTTP Method | GET |
Resource URL | {{host}}/Meridium/api/odata/{entity_name}/$count |
Names | Value |
---|---|
MeridiumToken | {{meridiumtoken}} |
Sample Query
{{host}}/Meridium/api/odata/Work_Order/$count
Configure Page Size
About This Task
You can configure the page size of the OData request payload.
Procedure
Power M Query
The following is a sample query to authenticate the APM environment and retrieve the metadata.
let
actualUrl = "{{host}}/Meridium/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}}/Meridium/api/odata/", null, [Headers = [ MeridiumToken= token ]])
in
feed