REST API client generation
Overview
Semarchy xDM v5.0 includes a generator to create a language-specific API client library (generate an SDK) to simplify integration work. This API client library makes it easy to use xDM's REST API.
This client library generation is currently a preview experimental feature. (You cannot, for example, log a P1 production support case against this feature.) But it's already highly useful, and anyone taking advantage of any of the new REST APIs included in the v5 release of Semarchy xDM should take a look at it. This feature is based on the OpenAPI Generator.
Available API Client Library Domains
- data - Consume data from a Semarchy xDM data hub, or to publish data into a hub.
- admin - Administer a Semarchy xDM instance.
- app_builder - Manage models including export, import, and deployment to data locations.
- dashboard_builder - Manage dashboards including export and import.
Available Languages
- bash
- csharp
- java
- powershell
- python
- many more: complete list of client library generators
URL Format
- http://[host]/semarchy/api/rest/api-docs/codegen/[language]?domain=[client-library-domain]
URL Samples
- http://ec2-101-5-203-139.us-west-1.compute.amazonaws.com/semarchy/api/rest/api-docs/codegen/csharp?domain=data
- http://localhost:8088/semarchy/api/rest/api-docs/codegen/python?domain=admin
- http://10.10.10.10/semarchy-dev/api/rest/api-docs/codegen/bash?domain=app_builder
Step-by-step example
- Access your REST API documentation main page:
- Choose the domain for which you want to generate the code sample
- Copy the URL from your browser's address bar, and edit it.
- Replace in the URL "api-ui/index.html" by "api-docs/codegen/[language]".
For example, if you want to generate the admin sample code in python, you start with a URL like this:
from URL
http://localhost:8088/semarchy/api/rest/api-ui/index.html?domain=admin
and you edit that url to look like this:
to URL
http://localhost:8088/semarchy/api/rest/api-docs/codegen/python?domain=admin
- This downloads a zip containing the SDK (code and documentation) in the specified language.