1

GraphQL in SAP Asset Performance Management

 1 year ago
source link: https://blogs.sap.com/2023/04/10/graphql-in-sap-asset-performance-management/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
April 10, 2023 3 minute read

GraphQL in SAP Asset Performance Management

This blog post gives a gist of how and why a new technology framework, i.e. GraphQL, was chosen over REST- and OData-based frameworks to develop SAP Asset Performance Management application. It also gives a brief on the inclusion of GraphQL API support in SAP API Business Hub and explains how one can view them.

Introduction

GraphQL is a query language that is used to access and modify data in APIs. As an application developer, you can specify a schema for the data in your application. This provides API clients the ability to use declarative queries to request and retrieve the precise data they require. The advanced query features of GraphQL and its schema language make it the ideal API framework for complicated hierarchical data models with nested entities.

With a simple query language, clear error messages, and an introspection system that allows for self-documenting APIs, GraphQL offers a more developer-friendly experience.

Picture-1-15.png

Adoption of GraphQL in SAP Asset Performance Management Application

SAP Asset Performance Management has now introduced GraphQL-based APIs, which support complex and nested data objects like Assessments, Evaluations, and Recommendations. This enables APM customers to choose every piece of data their UI requires in a single query call. SAP Asset Performance Management has built SAP UI5-based applications that are powered by GraphQL APIs in the backend, making it one of the early adopters of GraphQL in SAP.

Graphql is the best suited query language to represent hierarchical entity relationship. SAP Asset Performance Management provides many domain objects which are hierarchical in nature, as shown in the image below.

Figure%3A%20Hierarchy%20in%20an%20Assessment%20in%20SAP%20Asset%20Performance%20Management

Figure: Hierarchy in an Assessment in SAP Asset Performance Management

GraphQL APIs in SAP API Business Hub

With the release of the Risk and Criticality Assessment APIs for the SAP Asset Performance Management in March 2023, GraphQL APIs will now be supported by SAP API Business Hub.

Picture-4-3.png

Figure: API Business Hub with GraphQL support

Just like every API type, GraphQL APIs also have a specific format. There are two operation types in the GraphQL framework, Queries and Mutations, which are presented as follows in the SAP API Business Hub.

Picture-5-2.png

Figure: GraphQL Queries and Mutations in SAP API Business Hub

The details of a particular query or mutation appears as shown in the following image.

Picture-6-4.png

Figure: API details in SAP API Business Hub

You can also click on the object names to view more information, such as fields or entities inside the object.

Picture-7-1.png

Figure: Object information

Thank you for reading. This blog post was just to give a sneak-peak into the new API technology introduced in SAP Asset Performance Management. We will be publishing more information in the upcoming days.

Please do let us know in the comments the topics you are interested in, so that we can include them in our future blog posts.

You can refer to SAP Asset Performance Management page to learn more about the application and how to use the APIs.

You can view the first set of GraphQL APIs on Risk and Criticality Assessment under Asset Strategy domain here.

Also, please follow the tag SAP Asset Performance Management to read more such content.

Authors: Mangesh Shanbhag, Manivannan Kannan, Nidhi Murthy


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK