This tutorial will guide you through the process of installing and configuring a REST client in order to call the REST API on Semarchy xDM.
This tutorial is the fourth unit within the Data Publishing & Consumption track, which is composed of SQL-based and REST-based tutorials.
The current unit is a prerequisite for the REST-based units of the Data Publishing & Consumption track:
Before following this tutorial, you must have set up Semarchy xDM and completed the Customer B2C demo tutorial.
If you have not yet, complete the Quick Install and Demo Applications tracks.
Otherwise, enjoy this tutorial!
While it is possible to make calls to the REST API via your web browser or using a command line tool like cURL, we recommend using a tool specialized for API development environments. This will be particularly useful for the two tutorial units dedicated to the REST API, namely Query data via the REST API and Load data via the REST API.
Therefore, we recommend Postman, which is available for free and easy to use. If you prefer to use another tool that your organization supports, you are welcome to do so.
Follow the instructions below to initialize your first request in Postman.
Accessing the REST API is a task normally performed by an integration developer. As a result, we are going to use the semadmin user who has full administrative privileges to do everything in the xDM platform, including using the REST API.
To set up authorization:
To test your Postman configuration, you will now retrieve all the customer golden records in the Person entity from the CustomerB2CDemo data location. The template request you need is:
http://[host]:[port]/semarchy/api/rest/query/CustomerB2CDemo/Person/GD
localhost
and port 8088
:http://localhost:8088/semarchy/api/rest/query/CustomerB2CDemo/Person/GD
80
, you will not need to include it in your request URL: http://[public_IP_or_DNS]/semarchy/api/rest/query/CustomerB2CDemo/Person/GD
You can use either the public DNS address or the public IP address. We will proceed with the IP address in future examples in this tutorial.
GET
method.3. Click Send.
4. If you have correctly set up the authorization with your credentials, then you should see results returned. These are all the customer golden records returned in JSON format.
Great job! You successfully configured a REST client and sent your first request via the REST API.
In the next unit of the Data Publishing & Consumption track, you will learn how to query data in xDM via the REST API. You will perform basic queries and learn about setting up and using named queries.
To explore other resources, return to the Tutorials menu.
Thank you for completing this tutorial.