API
Introduction
All APIs available in the DataChain Marketplace come directly from datasets created, managed and shared via the DataChain platform.
This mechanism not only guarantees complete traceability, but also secure and controlled access to data at every stage of its lifecycle, from creation to final consumption within applications.
DataChain thus acts as a centralised and reliable ecosystem, ensuring the integrity and compliance of the information made available, while facilitating the discovery and integration of these APIs by consumers outside DataChain.
== Building queries and testing APIs
The Marketplace allows you to build queries and test APIs quickly and easily, then use them outside the DataChain ecosystem.
Within DataChain
You can view metadata and all information related to the API from its detail page.
You can build queries using the form to generate the URL and then preview the results in REST or OData formats.
Outside DataChain
APIs can be used outside DataChain.
To do this, you must enter a valid authentication token in a header of type Authorisation: Bearer {TOKEN}
.
See user account management page for more information.
Query syntax and operators
You must follow DataChain syntax to build queries and query APIs.
Example of a query to the exposure API
https://monModule/dmarketplace-datachain-api/version/data/exposition?select=id,nom&filter=nom=beginsWith=A
Query syntax
Syntax |
Description |
Mandatory? |
Base access URL |
exposure? |
Name of the access point assigned when configuring the API at the DataBlock level |
select= |
Selects the columns to be returned in the response. |
filter= |
Filters based on defined filter parameters |
page= |
Specifies the page returned. By default, this is page 1 |
hitsPerPage= |
Indicates the number of lines per page |
useCache= |
Indicates whether the cache (persistence) is used or not |
sort= |
Sorting according to defined parameters |
ctx: |
Indicates the context of the instance used |
& |
Character to be added between each filter |