In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how to use API to consume FSM data". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use API to consume FSM data.
An easy way is to use Query API provided by FSM.
Open the help documentation on FSM's official website:
SAP Field Service Management Developer Documentation
Enter the relevant parts of Query API:
By reading the document, I know that FSM Query API uses a similar idea to Facebook Query Language,SAP Hybris Flexible Search and ABAP Open SQL, that is, a query method imitating SQL syntax to read data from the FSM system.
The following figure is an example of Facebook Query Language:
The following is an example of SAP Hybris Commerce Flexible Search:
I will not post the example of ABAP Open SQL, we are all too familiar with it.
So how do you use FSM's Query API?
Log in to FSM and click Query API:
In the pop-up console, enter a SQL-like statement:
SELECT bp FROM BusinessPartner bp
The first 40 pieces of data are returned by default:
So how do you use code to trigger Query API queries? A SDK based on nodejs is given on the official website, which can easily achieve the requirement of calling Query API with code.
After clicking the hyperlink, you will jump to a warehouse in github:
According to the sample code on the help documentation, maintain the credential corresponding to the API client created in your FSM system into the code to get an instance of CoreAPIClient.
The values of Credential fields such as ClientIdentifier and clientSecret can be obtained by creating a new Client through the Admin tab:
Use the query method of the CoreAPIClient instance to initiate the Query API request to the FSM system. The input parameter one is the SQL-like query statement spliced in the application, and the second parameter is the name of Data Transfer Object, which can be found in the help document.
Observe the result returned by the above API call through the Visual Studio Code debugger. Because my 752 and 753 lines of code specify the query for Item and BusinessPartner respectively, the response returned by the API call is an array of two elements containing the first 40 pieces of data each of Item and BusinessPartner.
The details of each Item and Business Partner instance are displayed in the debugger as follows:
At this point, I believe you have a deeper understanding of "how to use API to consume FSM data". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.