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 |
---|---|
Authorization | Bearer {{accesstoken}} |
Tenant | {{tenantid}} |
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 |
---|---|
Authorization | Bearer {{accesstoken}} |
Tenant | {{tenantid}} |
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 |
---|---|
Authorization | Bearer {{accesstoken}} |
Tenant | {{tenantid}} |
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 |
---|---|
Authorization | Bearer {{accesstoken}} |
Tenant | {{tenantid}} |
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 |
---|---|
Authorization | Bearer {{accesstoken}} |
Tenant | {{tenantid}} |
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 = "<uaahost>/oauth/token",
record = [grant_type="password",username="<username>",password="<password>"],
body = Text.ToBinary(Uri.BuildQueryString(record)),
uaaBasicKey= "Basic <Base64 encoded credentials>",
options = [Headers =[#"Content-type"="application/x-www-form-urlencoded", #"Accept"="application/json", #"Authorization" = uaaBasicKey], Content=body],
Source = Web.Contents(actualUrl, options),
retVal = Json.Document(Source,65001),
token = retVal[access_token],
bearerToken = Text.Combine({"Bearer" , token}," "),
feed = OData.Feed("<web server host>/Meridium/api/odata", null, [Headers = [#"Tenant"= "<tenantid>" , #"Authorization" = bearerToken] ])
in
feed
Placeholder Text | Action to be Performed |
---|---|
<uaahost> | Replace <uaahost> with the hostname of the UAA instance.To obtain the hostname, perform the following steps:
|
<Base64 encoded credentials> | Replace <Base64 encoded credentials> with the credentials encoded to base 64.To create the credentials, base64 encode the Client ID and Client Secret values in the following format: <Client ID>:<Client Secret>
|
<web server host> | Consult GE Vernova Professional Services to obtain the web server hostname. Important: Ensure that the IP addresses of the users are included in the allowlist. |
<tenantid> | Replace <tenantid> with the UUID of your APM tenant.To obtain the tenant UUID, navigate to the Functional Users page (In the Applications menu, navigate to Setup.). |