Download OpenAPI specification:Download
This API Specification gives an overview of what SGDex is and serves as a guide to help you integrate your application with SGDex.
Note - This specification is subject to changes based on the evolution of the APIs.
SGDex stands for "Singapore Data Exchange".
SGDex is a highly-customisable data exchange layer platform that supports multiple data exchanges. In other words, you can use SGDex as a data exchange layer for any platform of your choice.
SGDex is organised around REST and returns JSON-encoded responses with standard HTTP response codes.
SGDex is highly configurable according to your data needs. Each data exchange can customise and configure APIs according to their usage. If an entity in a data exchange wants to send or receive data, they can call one of the pre-configured REST APIs in the data exchange, and the routing is handled by us.
For example, SGFinDex has an admin portal that directly interacts with the APIs provided by SGDex for configuration and organisational purposes. It also provides a group of internal APIs that can communicate with admin-configured APIs in SGDex. For SGTraDex, they also have a similar design. However, instead of a group of APIs, they provide a pitstop portal for communication between SGDex and SGTraDex.
In every data exchange, there are 3 key roles: Admin, Provider and Consumer.
Admin: configures and organises the list of APIs, Topics, and Directories within a data exchange
Providers: provides data to a data exchange. Providers can manage their:
Consumers: consumes data from a data exchange. Consumers can manage their:
Each role listed above has a specific set of APIs that it can call to interact with the data exchange. Admin, Providers and Consumers generally call APIs used for Organising and Configuring Your Data Exchange. On the other hand, Systems, Endpoints, Client Applications and Webhooks generally call APIs used during the actual Routing .
This section explains the configurations and organisations the Admin, Providers and Consumers can make in a data exchange.
Listed below are some common terms used when organising a data exchange.
This section illustrates how the terminologies (listed in the previous section) in a data exchange are related. The diagram below shows how APIs, Topics, and Usecases are related.
With your data exchange created and organised according to your needs, you will then need to configure the API(s) and Topic(s) in your data exchange to behave how you want them to when routing information. In this section, we explain what Scopes, Enrolments and Subscriptions are and how they are related to APIs and Topics.
Each OAuth API has a Scope, which is a list of data items that an API can return to a caller when it is called.
An Enrolment is a request by a Provider for its Endpoint or System to be enrolled under an API Service or Topic respectively. There are two kinds of Enrolments:
Hence, each API can have many Endpoints from different Providers that provide information when it is called. Similarly, each Topic can have many Systems from different Providers that can send information to it to forward to listening Consumers. The diagrams below illustrate this concept.
A Subscription is a request by a Consumer for its Client Application(s) and Webhook(s) to subscribe to APIs and Topics respectively under a Directory. A Consumer will subscribe at a Directory level and can choose which API(s) and/or Topic(s) they would like to subscribe to. This means that a Consumer need not subscribe to all APIs and Topics under the chosen Directory.
Because each API and Topic may have numerous Providers, each Provider enrolled under an API/Topic that is being subscribed to will receive separate Subscription Requests for them to approve or reject.
A Subscription Request is hence an individual request (a subset of the full Subscription) sent to Providers enrolled under an API or Topic to seek their approval when a Consumer would like to subscribe to the API/Topic they are providing to.
The diagram below illustrates the relationship between a Subscription and Subscription Requests.
In the diagram above, a Consumer with Client Application B and Webhook C creates a Subscription request to the API with Endpoint A enrolled and a Topic with System Z enrolled. Because there are 2 Providers, SGDex created 2 separate Subscription Requests to each Provider for their approval to the Subscription.
This section illustrates how you can route data in your data exchange from Providers to Consumers. In the previous sections, we focused on configuring the routing rules needed in your data exchange. In this section, we focus on the actual flow of data.
Before you can route data along a specific path (e.g. a Topic) in a data exchange, you must have permission to do so. This permission is granted to Providers and Consumers via the approval of their Enrolment and Subscription requests to that specific path. With no prior approvals, Providers and Consumers are unable to send or receive data from that path in the data exchange.
In routing, there are mainly 2 flows:
Retrieval of Data
Synchronous Retrieval
Asynchronous Retrieval
Providing of Data
The following sections will illustrate how these flows work in the data exchange.
This section illustrates how Consumer Client Applications can retrieve data from Provider Endpoints via an API.
When a Consumer Client Application wants to retrieve data, SGDex calls your pre-defined API in Organising and Configuring Your Data Exchange, which will then fetch data from relevant Provider Endpoints previously enrolled to this API.
Consumer Client Applications can either retrieve data synchronously or asynchronously.
Once a request for synchronous retrieval is made, SGDex will fetch data from relevant Provider Endpoints enrolled to this API, consolidate all these data and return them all in one payload to the caller.
More details about the required parameters and return types can be found in ROUTING section. The diagram below illustrates how a Synchronous Retrieval is done.
Once a request for asynchronous retrieval is made, SGDex will first return an acknowledgement immediately. SGDex will then fetch data from relevant Provider Endpoints enrolled to this API, and send the Provider Endpoints' responses individually to the caller's pre-defined webhook.
More details about the required parameters and return types can be found in ROUTING section. The diagram below illustrates how an Asynchronous Retrieval is done.
This section illustrates how Provider Systems can send data to Consumer Webhooks via an API. When a Provider System wants to send data, SGDex calls your pre-defined Topic in Organising and Configuring Your Data Exchange, which will then send this data to relevant Consumer Webhooks previously subscribed to this Topic.
More details about the required parameters an return types can be found in ROUTING section. The diagram below illustrates how data is sent to Consumer Webhooks.
A unique feature of Providing Data is the presence of delivery receipts. When a Provider System sends data to a Topic with a list of Consumer Webhooks, SGDex will fire the information to each Webhooks individually, and send a Delivery Receipt to a pre-specified Provider Webhook to inform Provider Systems on the status of the deliveries.
Provider Systems can even poll another API to query the status of delivery for their request to send data if they prefer not to receive delivery receipts from their Provider Webhook.
SGDex API gateway supports accessing of APIs via HTTP over TLS (Transport Layer Security) version 1.2 standards.
The list of supported Cipher Suites are as follows:
Data Exchange clients (e.g. SGTraDex) must authenticate to SGDex for every request. SGDex uses JWT (specified in RFC 7523) provided in the Authorization header as a bearer token (specified in RFC 6750) for client authentication.
Briefly, an unencrypted, signed JWT consists of three parts:
The header may include information about the key and algorithm used to sign the payload. This is needed unless the receiver has obtained this information through other means. As an example, a JWT used for client authentication may have a header and payload like this:
{
"alg": "ES256",
"typ": "JWT",
"kid": "7229075d-972f-4b21-8a0c-38db3a7f2a98"
}
ES256
RS256
The associated payload may look like this:
{
"aud": "https://api.sgdex.gov.sg",
"iss": "client-one",
"sub": "client-one",
"nbf": 1535806905,
"exp": 1535810505,
"iat": 1535806905,
"jti": "id123456"
}
JWT parameters include the following:
Parameter Name | Parameter Value | |
---|---|---|
REQUIRED | aud |
SGDex domain e.g. https://api.staging-sgdex.gov.sg for staging environment |
REQUIRED | iss |
application_id issued by SGDex during onboarding |
REQUIRED | sub |
application_id issued by SGDex during onboarding |
REQUIRED | exp |
expiration time of token in epoch format - maximum of 5 minutes from time JWT is generated |
REQUIRED | iat |
issued at - the time at which the JWT was issued |
OPTIONAL | nbf |
not before - the time before which the token MUST NOT be accepted for processing |
OPTIONAL | jti |
JWT ID - unique identifier for the token |
The JWT sent to the SGDex should be a Bearer
token in the Authorization
header, as described in RFC 6750.
A sample request is shown below:
GET /{dex}/{usecase}/{api} HTTP/1.1
Host: stg.api.sgdex.gov.sg
Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL3N0Zy5hcGkuc2dkZXguZ292LnNnIiwiaXNzIjoiY2xpZW50LW9uZSIsInN1YiI6ImNsaWVudC1vbmUiLCJuYmYiOjE1MzU4MDY5MDUsImV4cCI6MTUzNTgxMDUwNSwiaWF0IjoxNTM1ODA2OTA1LCJqdGkiOiJpZDEyMzQ1NiJ9.1ba2xgaRfxiu18SBPauA4ibe21uqI1lymtFoYXrFpMysQVADei98guL4QKHqgwD6UwHBOkC_L5W6TR19g1fuoQ
Partner's application is required to generate DPoP Proof JWT to be attached to server-to-server resource calls to prove the legit possession of the access token. (Refer to https://datatracker.ietf.org/doc/html/draft-ietf-oauth-dpop). The token is signed by partner's ephemeral private signing key, which the partner's public signing key had been used in the token call and "embedded" into the access token provided. Below is a sample of the JWT header and payload of a DPoP token:
{
"typ": "dpop+jwt",
"alg": "ES256",
"jwk": {
"kty": "EC",
"kid": "CRx5jixF8ZLRpxpqguxCwiq0g6b-ACHfQQJT7uiAkio",
"alg": "ES256",
"crv": "P-256",
"x": "mxVK8wvCaQ8iUJ4AyZr1oK1_ceL_27kgTPISNEcChm4",
"y": "0P-81zpWvcy6YAPSiV_K4h94wdEdk-RwrhbTL0fkeyc"
}
}
. {
"jti": "dfgsrtsDFBBgbsB230afktmdFGdgegemmet",
"htu": "https://api.sgdex.gov.sg/sgfindex/api/fpdata/08939d6c-11c0-4bc9-b2cd-f5fd14369521",
"htm": "GET",
"iat": 1645757787,
"exp": 1645757907,
"ath": "RyPeyISsEqdR1lsZBv80o0A8eF1Kvxdm_uf1hnLRf9M"
}
{typ}
Type - Type (Header), value "dpop+jwt"
{alg}
Algorithm (Header) - digital signature algorithm identifier as per RFC7518 (Refer to https://datatracker.ietf.org/doc/html/rfc7518). MUST NOT be none or an identifier for a symmetric algorithm (MAC).
{jwk}
JSON Web Key (Header) - public key chosen by the client. MUST NOT contain the private key.
{kty}
- The family of cryptographic algorithms used with the key
{kid}
- The unique identifier for the key
{alg}
- The specific cryptographic algorithm used with the key
{crv}
- The crv member identifies the cryptographic curve used with the key
{x}
- The x member contains the x coordinate for the elliptic curve point
{y}
- The y member contains the y coordinate for the elliptic curve point
{jti}
JWT ID (Payload) - unique identifier
{htu}
HTTP URL (Payload) - HTTP URI used for the request, without query (?) and fragment parts (#)
{htm}
HTTP Method (Payload) - HTTP method for the request to which the JWT is attached
{iat}
Issued At (Payload) - current timestamp
{exp}
Expiry (Payload) - expiry timestamp
{ath}
Access token hash (Payload) - The base64url encoded SHA-256 hash of the ASCII encoding of the associated access token's value
NodeJS
that generates the DPoP token // function to generate the base64url encoded SHA-256 hash of the ASCII encoding of the accesstoken
function generateAth(accessToken) {
let sha256AccessToken = crypto.createHash('sha256').update(accessToken).digest();
let base64URLEncodedHash = sha256AccessToken.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
return base64URLEncodedHash;
};
// generates DPoP Proof JWT headers for calling **fpdata** API
async function generateDpopProof (url, method, sessionPopKeyPair, ath) {
try {
let now = Math.floor((Date.now() / 1000));
let payload = {
"htu": url,
"htm": method,
"jti": generateRandomString(40),
"iat": now,
"exp": now + 120,
};
// required only for /fpdata resource call
if(ath)payload.ath = ath;
let privateKey = await jose.JWK.asKey(sessionPopKeyPair.privateKey, "pem");
let jwk = (await jose.JWK.asKey(sessionPopKeyPair.publicKey, "pem")).toJSON(true);;
jwk.alg = "ES256";
let jwtToken = await jose.JWS.createSign({ "format": 'compact', "fields": { "typ": 'dpop+jwt', "jwk": jwk } }, { "key": privateKey, "reference": false }).update(JSON.stringify(payload)).final();
return jwtToken;
} catch (error) {
logger.error("generateDpop error", error);
throw constant.ERROR_GENERATE_DPOP;
}
};
The Partner's application is required to generate client assertions to be attached to server-to-server calls to prove authenticity (Refer to https://datatracker.ietf.org/doc/html/rfc7521). The partner's private key signs the assertion metadata, and SGDex will use the partner's onboarded JWKS endpoint to obtain the public key for verification. Below is a sample of the JWT header and payload of the client assertion:
{
"typ": "JWT",
"alg": "ES256",
"kid": "x0zDLIC9yNRIXu3gW8nTQDOMNe7sKMAjQnZj3AWTW2U",
} . {
"sub": "STG2-APIM-SELF-TEST",
"jti": "jNDZuyLw66gkTjmCNMawzrTJNlhS8wdjpU0DHTzo",
"aud": "https://api.staging-sgdex.gov.sg/sgfindex/fpdata/77e0ff15-88be-474a-84ab-5b24ac2fb9d6",
"iss": "STG2-APIM-SELF-TEST",
"iat": 1662365106,
"exp": 1662365406,
"htm": "POST"
}
{typ}
Type - value "JWT"{alg}
Algorithm - value "ES256"{kid}
Key ID - The unique identifier for the key.{sub}
Subject - client_id issued by SGDex upon onboarding{jti}
JWT ID - random unique identifier{aud}
Audience - URL that partner's application is calling{iss}
Issuer - client_id issued by SGDex upon onboarding{iat}
Issued At (Payload) - current timestamp{exp}
Expiry (Payload) - expiry timestamp{htm}
HTTP Method (Payload) - HTTP method for the request to which the JWT is attachedSGDex uses standard HTTP response codes to indicate the success or failure of each API request. For successful requests, our APIs return 2XX codes. Generally, our HTTP error codes have the following implication:
The general format of our error responses are as follows:
{
"code": "integer (int32)",
"message": "string"
}
List of HTTP Response Codes:
Code | Possible Reasons |
---|---|
400 Bad Request | |
401 Unauthorised | |
403 Forbidden | |
404 Not Found | |
500 Server Error | |
Refer to the individual API definitions for the error codes you might encounter for each API.
This environment allows you to test your application with production-level security requirements, without needing to test your application directly in production.
The following are some essential information that you might need to test your applications with:
The environment where your application will be integrated with SGDex in production.
The following are some essential information that you might need to test your applications with:
1.2.0-release (27 Jun 2024)
1.1.0-release (6 Nov 2023)
1.0.0-release (20 Jun 2022)
0.1.1 (13 Jan 2022)
0.1.0 (12 August 2021)
SGDex's RESTful API adopts Semantic Versioning 2.0.0 for releases with the following format:
{MAJOR}.{MINOR}.{PATCH}
The table below lists the possible changes to the release version numbers and what they imply.
{MAJOR} increments | {MINOR} increments | {PATCH} increments |
---|---|---|
Introduces incompatible API changes with the previous {MAJOR} version | Introduces new functionalities or information that are backward compatible | Introduces bug fixes and remains backward compatible |
e.g. v1.2.1 --> v2.0.0 | e.g. v1.2.1 --> v1.3.0 | e.g. v1.2.1 --> v1.2.2 |
Despite backward compatibility provided in {MINOR}
and {PATCH}
releases, developers should still ensure that their existing implementations are not disrupted as a result of these new releases.
Pre-release or draft versions, when provided, are denoted by an appended hypen-
with a series of separate identifiers {LABEL}-{VERSION}
following the{PATCH}
number.
{MAJOR}.{MINOR}.{PATCH}-{LABEl}-{VERSION}
Such releases are unstable and may not provide the intended compatibility with the specification in draft status.
Please contact the SGDex team at support@sgdex.gov.sg for support.
This API will return the updated SGDex's public key information by default. With passing kid (the unique identifier for the key) in the path parameter, this API will return the specified public key information.
kid | string The unique identifier for the key. NOTE: If this parameter is not provided, the result will show an array of keys that are available. |
{- "keys": [
- {
- "kty": "string",
- "n": "string",
- "e": "string",
- "alg": "string",
- "kid": "string",
- "use": "string"
}
]
}
This API allows admin to create a Usecase.
dex required | string A unique name tag for the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
usecase_id required | string Unique ID of the Usecase you want to create. The usecase_id is a case-sensitive alphanumeric string that does not allow for spaces or special characters with the exception of '-' and '_'. |
name required | string The name of the Usecase you want to create. |
description required | string The description of the Usecase you want to create |
{- "usecase_id": "sample_usecase_id",
- "name": "Sample Usecase",
- "description": "This is a sample Usecase."
}
{- "usecase_id": "sample_usecase_id"
}
This API allows admin to get a Usecase or get a list of Usecases.
usecase_id
is specified, then this API will return a list with a single Usecase.
usecase_id
is not specified, then this API will return a list of all Usecases in the Dex.
dex required | string A unique name tag for the specific data exchange. |
usecase_id | string The unique id of the Usecase you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "usecase_id": "sample_usecase_id",
- "name": "Sample Usecase",
- "description": "This is a sample Usecase.",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update a Usecase.
dex required | string A unique name tag for the specific data exchange. |
usecase_id required | string The unique id of the Usecase you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
usecase_name required | string The name of the Usecase. |
description required | string The description of the Usecase. |
{- "usecase_name": "Sample Usecase 2",
- "description": "This is a sample Usecase."
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a Usecase.
dex required | string A unique name tag for the specific data exchange. |
usecase_id required | string The unique id of the Usecase you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a Usecase API.
dex required | string A unique name tag for the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
name required | string The name of the Usecase API you want to create. |
description required | string The description of the Usecase API you want to create. |
version required | integer The version number of the Usecase API you want to create. It has to be a positive integer. |
http_method required | string The HTTP method that this Usecase API will use. |
api_type required | string The type of this Usecase API. Value can only be |
object This object only needs to be defined for oauth2 Usecase APIs | |
softlink | Array of strings An array of strings that specify the Usecases that this Usecase API is related to. |
{- "name": "sample_api",
- "version": 1,
- "http_method": "GET",
- "description": "This is a sample Usecase API.",
- "api_type": "SYNC",
- "oauth2": {
- "scope": [
- "scope1",
- "scope2",
- "scope3"
]
}, - "softlink": [
- "sample_usecase_id"
]
}
{- "usecase_api_id": "f727a5a9-5d30-49f8-8dd7-5b315cab5f4b"
}
This API allows admin to get a Usecase API or get a list of Usecase APIs that satisfy the attributes you specify.
usecase_api_id
is specified, then this API will return a list with a single Usecase API.
usecase_api_id
is not specified and other criteria are specified, then this API will return a list of all Usecase APIs that satisfy those criteria.
dex required | string A unique name tag for the specific data exchange. |
usecase_api_id | string The unique id of the Usecase API you are interested in. If this is specified, no query string parameters should be specified. |
name | string Example: name=sample_name The name of the Usecase API you are interested in. If this is specified, usecase_api_id must not be specified. This field must be specified if usecase_api_id is not specified. |
http_method | string Example: http_method=GET The HTTP method of the Usecase API you are interested in. This is an optional field when the name is specified. |
version | integer Example: version=1 The version of the Usecase API you are interested in. This is an optional field when the name is specified. |
published | boolean Example: published=true The published status of the Usecase API you are interested in. This is an optional field when the name is specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "name": "sample_api",
- "version": 1,
- "http_method": "GET",
- "description": "This is a sample Usecase API.",
- "api_type": "SYNC",
- "oauth2": {
- "scope": [
- "scope1"
]
}, - "softlink": [
- "sample_usecase_id"
], - "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update a Usecase API.
dex required | string A unique name tag for the specific data exchange. |
usecase_api_id required | string The unique id of the Usecase API you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
name required | string The name of the Usecase API. |
description required | string The description of the Usecase API. |
version required | integer The version number of the Usecase API. It has to be a positive integer. |
http_method required | string The HTTP method that this Usecase API will use. |
api_type required | string The type of this Usecase API. Value can only be |
object This object only needs to be defined for oauth2 Usecase APIs | |
softlink | Array of strings An array of strings that specify the Usecases that this Usecase API is related to. |
published | boolean Set this to true when you want to publish this Usecase API. You cannot unpublish a Usecase API once it is published. |
{- "name": "sample_api_changed",
- "version": 1,
- "http_method": "POST",
- "description": "This is a changed sample Usecase API.",
- "api_type": "SYNC",
- "oauth2": {
- "scope": [
- "scope1",
- "scope2"
]
}, - "softlink": [
- "sample_usecase_id"
], - "published": true
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a Usecase API.
dex required | string A unique name tag for the specific data exchange. |
usecase_api_id required | string The unique id of the Usecase API you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a Usecase Topic.
dex required | string A unique name tag for the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
name required | string The name of the Usecase Topic you want to create. |
description required | string The description of the Usecase Topic you want to create. |
softlink | Array of strings An array of strings that specify the Usecases that this Usecase Topic is related to. |
{- "name": "sample_topic",
- "description": "This is a sample Usecase Topic.",
- "softlink": [
- "sample_usecase_id"
]
}
{- "usecase_topic_id": "14fb72b6-325d-4174-9aaf-fafeef7ddd9e"
}
This API allows admin to get a Usecase Topic or get a list of Usecase Topics with certain attributes you specify.
usecase_topic_id
is specified, then this API will only return a list with a single Usecase Topic.
usecase_topic_id
is not specified and name
is specified, then this API will return a list of all Usecase Topics with that name.
dex required | string A unique name tag for the specific data exchange. |
usecase_topic_id | string The unique id of the Usecase Topic you are interested in. If this is specified, no query string parameters should be specified. |
name | string Example: name=sample_topic The name of the Usecase Topic you are interested in. If this is specified, usecase_topic_id must not be specified. This field must be specified if usecase_topic_id is not specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "usecase_topic_id": "14fb72b6-325d-4174-9aaf-fafeef7ddd9e",
- "name": "sample_topic",
- "description": "This is a sample Usecase Topic.",
- "softlink": [
- "sample_usecase_id"
], - "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update a Usecase Topic.
dex required | string A unique name tag for the specific data exchange. |
usecase_topic_id required | string The unique id of the Usecase Topic you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
name required | string The name of the Usecase Topic. |
description required | string The description of the Usecase Topic. |
softlink | Array of strings An array of strings that specify the Usecases that this Usecase Topic is related to. |
published | boolean Set this to true when you want to publish this Usecase Topic. You cannot unpublish a Usecase Topic once it is published. |
{- "name": "sample_topic_changed",
- "description": "This is a changed sample Usecase Topic.",
- "softlink": [
- "sample_usecase_id"
], - "published": true
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a Usecase Topic.
dex required | string A unique name tag for the specific data exchange. |
usecase_topic_id required | string The unique id of the Usecase Topic you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a Participant.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
entity_id required | string The UEN that this participant would be part of. |
alias required | string The alias of the participant. |
description required | string The description of the participant. |
{- "entity_id": "197900305Z",
- "alias": "participant1",
- "description": "This is a sample participant."
}
{- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615"
}
This API allows admin to get a Participant, get a list of Participants based on organisation_id or get all Participants in the Dex.
participant_id
is specified, then this API will only return a list wih a single Participant.
participant_id
is not specified and entity_id
is specified, then this API will return a list of all Participants in the Dex part of this entity_id.
participant_id
and entity_id
are not specified, then this API will return a list of Participants in the Dex.
participant_id | string The unique id of the Participant you are interested in. If this is specified, no query string parameters should be specified. |
entity_id | string Example: entity_id=197900305Z The entity_id you are interested in. If this is specified, participant_id should not be specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
- "alias": "participant1",
- "entity_id": "123456789A",
- "description": "This is a sample participant.",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update a Participant.
participant_id required | string The unique id of the Participant you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
description required | string The new description of the Participant. |
{- "description": "This is the new sample description."
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a Participant.
participant_id required | string The unique id of the Participant you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a JWKS Endpoint.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
participant_id required | string The unique ID of the participant that this JWKS endpoint belongs to. |
url required | string The url of this JWKS Endpoint. |
{- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
}
{- "jwks_endpoint_id": "5349afea-934d-47f1-9ff4-b55a33ef453b"
}
This API allows admin to get a JWKS Endpoint or get a list of JWKS Endpoints based on participant_id.
jwks_endpoint_id
is specified, then this API will return a list with a single JWKS Endpoint.
jwks_endpoint_id
is not specified and participant_id
is specified, then this API will return a list of all JWKS Endpoints belonging to this Participant.
jwks_endpoint_id | string The unique id of the JWKS Endpoint you are interested in. If this is specified, no query string parameters should be specified. |
participant_id | string Example: participant_id=28c60ead-9584-4998-a94d-2fae8ed61615 The participant_id of the Participant you are interested in. If this is specified, jwks_endpoint_id should not be specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "jwks_endpoint_id": "5349afea-934d-47f1-9ff4-b55a33ef453b",
- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update a JWKS Endpoint.
jwks_endpoint_id required | string The unique id of the JWKS Endpoint you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
url required | string The new url of this JWKS Endpoint. |
{- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a JWKS Endpoint.
jwks_endpoint_id required | string The unique id of the JWKS Endpoint you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create an Application.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
application_id | string The unique ID of this application. If not specified, your application will be assigned an application_id. |
name required | string The name of the application. |
description required | string The description of the application. |
participant_id required | string The participant_id of the Participant this application belongs to. |
required | object The security mechanism information of this application. |
webhook_id | string The webhook_id of the Webhook that this application uses. |
{- "application_id": "myApp_id",
- "name": "myApp",
- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
- "description": "This is a sample application.",
- "security_mechanism": {
- "jwks_endpoint_id": "5349afea-934d-47f1-9ff4-b55a33ef453b"
}, - "webhook_id": "d4e677a6-2866-4f93-bcbe-735814c38398"
}
{- "application_id": "myApp_id"
}
This API allows admin to get an Application or get a list of Applications based on participant_id.
application_id
is specified, then this API will return a list with a single Application.
application_id
is not specified and participant_id
is specified, then this API will return a list of all Application belonging to this Participant.
application_id | string The unique id of the Application you are interested in. If this is specified, no query string parameters should be specified. |
participant_id | string Example: participant_id=28c60ead-9584-4998-a94d-2fae8ed61615 The participant_id of the Participant you are interested in. If this is specified, application_id should not be specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "application_id": "myApp_id",
- "name": "myApp",
- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
- "description": "This is a sample application.",
- "security_mechanism": {
- "jwks_endpoint_id": "5349afea-934d-47f1-9ff4-b55a33ef453b"
}, - "webhook_id": "d4e677a6-2866-4f93-bcbe-735814c38398",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "admin",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "admin"
}
]
This API allows admin to update an Application.
application_id required | string The unique id of the application you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
participant_id required | string The unique id of the participant that this application belongs to. |
name required | string The name of this application. |
description required | string The description of this application. |
required | object The security mechanism of this application. |
webhook_id | string The webhook_id of the Webhook that this application uses. |
{- "participant_id": "28c60ead-9584-4998-a94d-2fae8ed61615",
- "name": "myAppNew",
- "description": "This is a new sample application description.",
- "security_mechanism": {
- "jwks_endpoint_id": "5349afea-934d-47f1-9ff4-b55a33ef453b"
}, - "webhook_id": "d4e677a6-2866-4f93-bcbe-735814c38398"
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete an Application.
application_id required | string The unique id of the Application you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create an Endpoint.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
participant_id required | string The participant ID assigned to you. |
name required | string The name of the endpoint you want to create. |
description required | string The description of the endpoint you want to create. |
url required | string The url of the endpoint you want to create. |
http_method required | string The http method of the endpoint you want to create. |
required | object The security mechanism details of the endpoint you want to create. |
timeout | number The timeout value of the endpoint you want to create. |
{- "participant_id": "STG-20230201M-TEST",
- "name": "Sample endpoint",
- "description": "This is a sample endpoint",
- "http_method": "POST",
- "security_mechanism": {
- "type": "JWTRequest",
- "ec_supported": false
}, - "timeout": 8000
}
{- "endpoint_id": "3d8a3fe5-cbaa-4b70-8a6c-a70362ccb6e5"
}
This API allows admin to get an Endpoint or get a list of Endpoints with certain attributes you specify.
endpoint_id
is specified, then this API will return a list with a single Endpoint.
endpoint_id
is not specified and other criteria are specified, then this API will return a list of all Endpoints that satisfy those criteria in the Dex.
endpoint_id required | string The unique id of the Endpoint you are interested in. If this is specified, no query string parameters should be specified. |
participant_id required | string Example: participant_id=STG-231696441I-PARTICIPANT The participant id of the Endpoint you are interested in. This field must be specified if webhook_id is not specified. |
name | string Example: name=sample_name The name of the Endpoint you are interested in. |
http_method | string Example: http_method=POST The http_method of the Endpoint you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "endpoint_id": "3c1cb5d1-1f47-4dec-b745-eb236105f2b5",
- "participant_id": "STG-231696441I-Finance",
- "http_method": "POST",
- "name": "endpoint",
- "description": "this is an endpoint",
- "security_mechanism": {
- "type": "JWTRequest",
- "algo": "RS256",
- "iss": "sgdex",
- "sub": "sgdex",
- "client_id": "client_id",
- "client_secret": "client_secret"
}, - "settings": {
- "timeout": 5000
}, - "created_on": "2021-07-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-07-22T10:53:03+00:00",
- "updated_by": "adminA"
}
]
This API allows admin to update an Endpoint.
endpoint_id required | string The unique id of the Endpoint you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
name required | string The name of the endpoint you want to update. |
description required | string The description of the endpoint you want to update. |
url required | string The url of the endpoint you want to update. |
http_method required | string The http method of the endpoint you want to update. |
required | object The security mechanism details of the endpoint you want to create. |
timeout | number The timeout value of the endpoint you want to update. |
{- "name": "Sample updated endpoint",
- "description": "This is a sample update endpoint request",
- "http_method": "POST",
- "security_mechanism": {
- "type": "JWTRequest",
- "ec_supported": true
}, - "timeout": 5000
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete an Endpoint.
endpoint_id required | string The unique id of the Endpoint you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a Webhook.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
participant_id required | string The participant ID assigned to you. |
description required | string The description of the webhook you want to create. |
url required | string The url of the webhook you want to create. |
required | object The security mechanism details of the webhook you want to create. |
timeout | number The timeout value of the webhook you want to create. |
{- "participant_id": "STG-20230201M-TEST",
- "description": "This is a sample webhook",
- "security_mechanism": {
- "type": "JWTRequest",
- "ec_supported": false
}, - "timeout": 8000
}
{- "webhook_id": "3d8a3fe5-cbaa-4b70-8a6c-a70362ccb6e5"
}
This API allows admin to get a Webhook or get a list of Webhooks with certain attributes you specify.
webhook_id
is specified, then this API will return a list with a single Webhook.
webhook_id
is not specified and other criteria are specified, then this API will return a list of all Webhooks that satisfy those criteria in the Dex.
webhook_id | string The unique id of the Webhook you are interested in. If this is specified, no query string parameters should be specified. |
participant_id | string Example: participant_id=STG-231696441I-PARTICIPANT The participant id of the Webhook you are interested in. This field must be specified if webhook_id is not specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "webhook_id": "aab098a5-377c-4419-9517-629e3a2f48c8",
- "participant_id": "STG-231696441I-Finance",
- "description": "Sample Description",
- "security_mechanism": {
- "type": "JWTRequest",
- "algo": "RS256",
- "iss": "sgdex",
- "sub": "sgdex"
}, - "setting": {
- "timeout": 8000
}, - "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "adminA"
}
]
This API allows admin to update a Webhook.
webhook_id required | string The unique id of the Webhook you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
description required | string The description of the webhook you want to update. |
url required | string The url of the webhook you want to update. |
required | object The security mechanism details of the webhook you want to update. |
timeout | number The timeout value of the webhook you want to update. |
{- "description": "This is a sample update webhook request",
- "security_mechanism": {
- "type": "JWTRequest",
- "ec_supported": true
}, - "timeout": 5000
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete a Webhook.
webhook_id required | string The unique id of the Webhook you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create an Enrolment.
dex required | string A unique name tag for the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
provider_id required | string The participant ID assigned to you. |
enrolment_type required | string The type of the enrolment you want to create. Value can only be |
description required | string The description of the enrolment you want to create. |
usecase_api_id | string The usecase api you want to enrol. **applicable when enrolment_type is api or asyncapi |
scope | string The scope you want to enrol. **applicable when enrolment_type is api |
endpoint_id | string The endpoint you want to use in this enrolment. **applicable when enrolment_type is api or asyncapi |
usecase_topic_id | string The usecase topic you want to enrol. **applicable when enrolment_type is topic |
system_id | string The system you want to use in this enrolment. **applicable when enrolment_type is topic |
status | string The status of the enrolment you want to create. |
required | Array of objects An array of object that contains the list of tasks required for this endpoint. The details required for each task vary depending on the configuration. |
{- "provider_id": "STG-20230201M-TEST",
- "enrolment_type": "api",
- "description": "This is a sample enrolment",
- "usecase_api_id": "19628b69-3fa4-4963-b387-48efff088753",
- "endpoint_id": "238f92b4-6386-4e10-a391-08842b460797",
- "processing_task": [
- {
- "name": "FederateData"
}
]
}
{- "enrolment_id": "b0c97cc9-d458-4f14-b2c8-b348ba06f35a"
}
This API allows admin to get an Enrolment or get a list of Enrolments with certain attributes you specify.
enrolment_id
is specified, then this API will return a list with a single Enrolment.
enrolment_id
is not specified and other criteria are specified, then this API will return a list of all Enrolments that satisfy those criteria in the Dex.
dex required | string A unique name tag for the specific data exchange. |
enrolment_id | string The unique id of the enrolment you are interested in. |
provider_id | string Example: provider_id=STG-231696441I-PROVIDER The participant id of the Webhook you are interested in. This field must be specified if enrolment_id is not specified. |
status | string Example: status=APPROVED enrolment status. Value can be |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "enrolment_id": "a05e7279-f78b-4f29-bdac-b904476046ba",
- "provider_id": "STG-231696441I-Finance",
- "status": "PENDING",
- "description": "sample request data for api enrolment",
- "usecase_api_id": "fac098a5-377c-4419-9517-629e3a2f48c8",
- "usecase_api_name": "fpdata",
- "usecase_api_oauth2": {
- "scope": [
- "scopeA",
- "scopeB"
]
}, - "endpoint_id": "0bc60532-c166-47e3-8122-8926a85001a8",
- "usecase_topic_id": "6ae41b6b-24b9-434b-9449-252168d41464",
- "usecase_topic_name": "topic",
- "system_id": "ac9e4be3-d3f6-419b-8110-fffa991e20bf",
- "system_name": "mysystem",
- "created_on": "2022-07-13T17:33:00+00:00",
- "created_by": "adminA",
- "updated_on": "2022-07-13T17:33:00+00:00",
- "updated_by": "adminA"
}
]
This API allows admin to approve or reject an Enrolment.
dex required | string A unique name tag for the specific data exchange. |
enrolment_id required | string The unique id of the Enrolment you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
status required | string The status you want to update for your enrolment. Current supported values are |
comment | string The comment you want to update for your enrolment. **mandatory when status is REJECTED |
Array of objects An array of object that contains the list of tasks required for this endpoint. The details required for each task vary depending on the configuration. **applicable only when status is APPROVED |
{- "status": "APPROVED",
- "comment": "I approved this enrolment",
- "processing_task": [
- {
- "name": "FederateData"
}
]
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete an Enrolment.
dex required | string A unique name tag for the specific data exchange. |
enrolment_id required | string The unique id of the Enrolment you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
{- "code": 0,
- "message": "string"
}
This API allows admin to create a Subscription.
dex required | string A unique name tag for the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
consumer_id required | string The participant ID assigned to you. |
description required | string The description of the subscription you want to create. |
Array of objects The list of usecase api you want to subscribe. **either api or topic must be presented | |
Array of objects The list of usecase topic you want to subscribe. **either api or topic must be presented |
{- "consumer_id": "STG-20230201M-TEST",
- "description": "My subscription",
- "api": [
- {
- "usecase_api_id": "b97e4a6b-d11d-4089-998d-545380e3bed0",
- "client_id": "fe8c6490-be76-40a9-b7b3-742fe8061f54"
}
], - "topic": [
- {
- "usecase_topic_id": "6c51a028-fda2-48c6-af79-774e9d866187",
- "consumer_webhook_id": "b52ddd05-2bf8-4bb9-9ad9-26d854ffdf11"
}
]
}
{- "subscription_id": [
- "791a3458-dc5b-41e2-abfd-7f2e2574967a",
- "84dcccb9-59a4-411f-bf12-ab9d8f7b4560",
- "bbcb84a0-7f67-434e-89c3-3488ee23262d"
]
}
This API allows admin to get a Subscription or get a list of Subscriptions with certain attributes you specify.
subscription_id
is specified, then this API will return a list with a single Subscription.
subscription_id
is not specified and other criteria are specified, then this API will return a list of all Subscriptions that satisfy those criteria in the Dex.
dex required | string A unique name tag for the specific data exchange. |
subscription_id | string The unique id of the subscription you are interested in. If this is specified, no query string parameters should be specified. |
consumer_id | string Example: consumer_id=STG-231696441I-CONSUMER The participant id of the Webhook you are interested in. This field must be specified if subscription_id is not specified. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "subscription_id": "967c78f6-c019-4c84-937d-471f570394ee",
- "consumer_id": "STG-231696441I-CONSUMER",
- "description": "sample description",
- "usecase_api_id": "fac098a5-377c-4419-9517-629e3a2f48c8",
- "usecase_api_name": "api",
- "status": "APPROVED",
- "usecase_api_oauth2": {
- "scope": [
- "scopeA",
- "scopeB"
], - "requested_scope": [ ]
}, - "client_id": "STG-231696441I-Cient-Application",
- "client_name": "ClientApplication",
- "usecase_topic_id": "9f99198c-93ea-4453-a32e-af60644dd00a",
- "usecase_topic_name": "topic",
- "consumer_webhook_id": "ec15d660-ffed-468b-b892-206b0439ccd1",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "adminA",
- "subscription_request": [
- {
- "subscription_request_id": "84622655-37df-4a34-9b8e-ceab0c4303d5",
- "provider_id": "STG-241696441L-PROVIDER",
- "status": "APPROVED",
- "usecase_api_oauth2": {
- "scope": [
- "scopeA"
]
}, - "endpoint_id": "6ab95cd5-686a-4fd8-a35e-dc114c1f463f",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "adminA"
}, - {
- "subscription_request_id": "fff22655-37df-4a34-9b8e-ceab0c4303d5",
- "provider_id": "STG-202266853I-TEST-PROVIDER1",
- "status": "PENDING",
- "usecase_api_oauth2": {
- "scope": [
- "scopeB"
]
}, - "endpoint_id": "e4c30b44-ec5e-4e79-bbb3-939c3d378c2e",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "adminA"
}
]
}
]
This API allows admin to update the scope of Subscription.
dex required | string A unique name tag for the specific data exchange. |
subscription_id required | string The unique id of the Subscription you want to update. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
scope required | Array of arrays The new scope array to update in subscription. |
{- "scope": [
- "scopeA",
- "scopeB"
]
}
{- "code": 0,
- "message": "string"
}
This API allows admin to delete Subscription/Subscription(s).
dex required | string A unique name tag for the specific data exchange. |
subscription_id | string The unique id of the Subscription you are interested in. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
subscriptions | Array of arrays The list of subscriptions ids to delete. |
{- "subscription": [
- "16a9a4e0-ea02-4f8c-a40d-cc0d8df7a071",
- "c96b757f-7158-4f81-a1ea-ac0a495ab4fd"
]
}
{- "code": 0,
- "message": "string"
}
This API allows admin to approve or reject Subscription.
dex required | string A unique name tag for the specific data exchange. |
subscription_id required | string The unique id of the Subscription you want to approve/reject. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
status required | string The given status for the subscription. |
comment | string The comment of approving/rejecting the subscription. **mandatory when rejecting the subscription |
{- "status": "REJECTED",
- "comment": "Rejected subscription due to invalid scope requested"
}
{- "code": 0,
- "message": "string"
}
This API allows admin to get a Subscription Request or get a list of Subscription Request with certain attributes you specify.
subscription_request_id
is specified, then this API will return a list with a single Subscription Request.
subscription_request_id
is not specified and other criteria are specified, then this API will return a list of all Subscription Request that satisfy those criteria in the Dex.
dex required | string A unique name tag for the specific data exchange. |
subscription_request_id | string The unique id of the subscription request you are interested in. If this is specified, no query string parameters should be specified. |
provider_id | string Example: provider_id=STG-241696441L-PROVIDER The participant id of the subscription request you are interested in. This field must be specified if subscription_request_id is not specified. |
status | string Example: status=APPROVED status of subscription request you are interested in. Value can be |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "subscription_request_id": "84622655-37df-4a34-9b8e-ceab0c4303d5",
- "subscription_id": "967c78f6-c019-4c84-937d-471f570394ee",
- "consumer_id": "STG-231696441I-CONSUMER",
- "provider_id": "STG-241696441L-PROVIDER",
- "usecase_api_id": "fac098a5-377c-4419-9517-629e3a2f48c8",
- "usecase_api_name": "api",
- "usecase_api_oauth2": {
- "scope": [
- "scopeA"
]
}, - "client_id": "STG-231696441I-Client-ClientApplication",
- "client_name": "ClientApplication",
- "endpoint_id": "6ab95cd5-686a-4fd8-a35e-dc114c1f463f",
- "usecase_topic_id": "6913cdd1-b548-4f3b-b7c1-5ed4784b327f",
- "usecase_topic_name": "topic",
- "consumer_webhook_id": "9c630dcd-2656-428d-9ef1-989b8afb90e3",
- "provider_system_id": "96257467-7009-4eab-a568-25ee98fb8521",
- "provider_system_name": "system_name",
- "status": "APPROVED",
- "description": "sample description",
- "created_on": "2021-03-21T10:53:03+00:00",
- "created_by": "adminA",
- "updated_on": "2021-03-21T10:53:03+00:00",
- "updated_by": "adminA"
}
]
This API allows admin to approve or reject Subscription Request.
dex required | string A unique name tag for the specific data exchange. |
subscription_request_id required | string The unique id of the Subscription Request you want to approve/reject. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
status required | string The given status for the subscription request. |
comment | string The comment of approving/rejecting the subscription request. **mandatory when rejecting the subscription request |
{- "status": "REJECTED",
- "comment": "Rejected subscription request"
}
{- "code": 0,
- "message": "string"
}
This API will federate the call to fetch from relevant providers based on pre-existing configuration and return the combined responses.
This is a synchronous GET call to pull the data. Data will be in the response payload.
dex required | string A unique name tag for the specific data exchange. |
apiname required | string A unique api name within the specific data exchange. |
client_id required | string Unique ID for the data consuming service. |
provider | Array of strings The id of providers to get the data from. |
query | string Example: query=filter:my filter parameter An optional query parameter to filter the result based. This parameter will be passed to the provider end and can be intercepted by the data exchange layer to perform a filtered query to the provider API. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
[- {
- "sp": "string",
- "response_code": 0,
- "payload": "string",
- "error": "string"
}
]
This API will federate the call to fetch from relevant providers based on pre-existing configuration and return the combined responses.
This is a synchronous POST call to pull the data. Data will be in the response payload.
dex required | string A unique name tag for the specific data exchange. |
apiname required | string A unique api name within the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
client_id required | string Unique ID for the data consuming service. |
provider | Array of strings The id of providers to get the data from. |
query | string An optional query parameter to filter the result based. This parameter will be passed to the provider end and can be intercepted by the data exchange layer to perform a filtered query to the provider API. |
payload | string An optional stringtify payload parameter. This payload will be passed to the provider end.
|
{- "client_id": "client123",
- "provider": [
- "provider_id1",
- "provider_id2"
], - "query": "filter=myfilter",
- "payload": "{attribute1: xx, attribute2: xx}"
}
[- {
- "sp": "string",
- "response_code": 0,
- "payload": "string",
- "error": "string"
}
]
This API will federate the call to fetch from relevant providers based on authorisation and return the responses in an array.
This is a synchronous GET call to federate the data request, the response will be the received payload packed in an array.
dex required | string A unique name tag for the specific data exchange. |
apiname required | string A unique api name within the specific data exchange. |
identifier required | string A unique identifier of a user. You can get this identifier from the access token (JWT) sub parameter after calling Token endpoint. |
client_id required | string Unique ID for the data consuming service. |
scope required | Array of string Example: scope=scopeA scopeB scopeC Space separated list of scope requested. |
DPoP required | string Example: Refer to Demonstration of Proof of Possesion (DPoP) Include the generated Demonstration of Proof of Possession token. |
Authorization required | string Include the access token (JWT) from /token API in this header prefixed with 'DPoP'. |
[- {
- "sp": "string",
- "response_code": 0,
- "payload": "string",
- "error": "string"
}
]
This API returns user's data from data source(s) when presented with a valid access token obtained from the Token API.
Prerequisite: Client application is required to call Authorise API to get user consent and Token API to get the access token before calling the Data API.
identifier required | string A unique identifier of a user. You can get this identifier from the access token (JWT) |
Authorization required | string Access token JWT that was returned from token call |
client_assertion required | string The assertion being used to authenticate the client, please refer to Client Assertion for details. This JWT is signed with consumer private key and contains the following parameters:
|
client_assertion_type required | string The format of the assertion as defined by the authorization server. The value will be an absolute URI.
Example: |
encryptionKid | string Consuming applications can specify Key ID in their registered JWKS to encrypt response payload with. |
{- "client_assertion": "string",
- "client_assertion_type": "string",
- "encryptionKid": "string"
}
[- {
- "sp": "string",
- "response_code": 0,
- "payload": "string",
- "error": "string"
}
]
This API will federate the call to request data from relevant providers based on pre-existing configuration.
Once the request is received on the provider side, provider will initiate a PUSH call if the request is valid.
This is an asynchronous request for data. Response will only be ACK.
dex required | string A unique name tag for the specific data exchange. |
apiname required | string A unique api name within the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
client_id required | string Unique ID for the data consuming service. |
provider | Array of strings The id of providers to get the data from. |
query | string An optional query parameter to filter the result based. This parameter will be passed to the provider end and can be intercepted by the data exchange layer to perform a filtered query to the provider API. |
payload | string An optional stringtify payload parameter. This payload will be passed to the provider end.
|
{- "client_id": "client123",
- "provider": [
- "provider_id1",
- "provider_id2"
], - "query": "filter=myfilter",
- "payload": "{attribute1: xx, attribute2: xx}"
}
{- "message": "Accepted"
}
This API allows provider to push data to a use case topic.
consumer
(list of consumers) is specified, then data will be sent to the specified consumers who are subscribers of the topic.
consumer
(list of consumers) is not specified, then data will be broadcast to all subscribers of that use case topic.
dex required | string A unique name tag for the specific data exchange. |
topicname required | string A unique api name within the specific data exchange. |
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
consumer | Array of strings The id of consumers to push the data to. |
system_id required | string Unique ID of the provider system. |
payload required | string The data payload to push to the topic |
{- "consumer": [
- "consumer_id1",
- "consumer_id2"
], - "system_id": "my system id",
- "payload": "<encrypted/encoded payload>"
}
{- "request_id": "string"
}
This API will federate the call to pull/push data from/to relevant pitstops
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
type required | string Enum: "PROVIDE" "RECEIVE" "PULL_RESULT" "PUSH_RESULT" "TEST_PUSH" "TEST_PULL" Specifies the type of message e.g. PUSH, PULL, PROVIDE, |
dataElementId required | string The data element ID for this transaction |
requestId required | string UUID of the request ID |
required | object (systemDetail) |
required | Array of objects (systemDetail) |
required | Array of objects (orgDetail) |
payload | string Encrypted payload. Only required for type = RECEIVE | PULL_RESULT |
parameters | object The pull parameters. Only required for type = PROVIDE |
{- "type": "RECEIVE",
- "dataElementId": "bill_of_lading",
- "sender": {
- "id": "c4024479-5925-4573-bc40-f51ddde66eff",
- "name": "DBS Pte. Ltd."
}, - "recipients": [
- {
- "id": "42b2ff1f-b7f2-4734-ae6b-64ae544c9f51"
}
], - "requestId": "1234567890",
- "payload": "<HASHED>",
- "parameters": {
- "key": "value"
}, - "onBehalfOf": [
- {
- "id": "ee7eb200-be7a-4a33-ae8d-d891cb4e9bf3"
}
]
}
{- "message": "Request received"
}
This API allows SGTraDex to notify SGDex of pitstops configuration changes.
Authorization required | string Example: Refer to Data Exchange (Client) Authentication |
recipients required | Array of strings List of System IDs of the recipients to send to |
type required | string Value: "CONFIG_REFRESH" |
senderId required | string Unique identifier of sender's system |
{- "recipients": [
- "64939f65-0a0d-47e8-a0b6-4b1f23c5b7fc",
- "f989dc80-531f-44b0-af4e-31481891200d"
], - "type": "CONFIG_REFRESH"
}
{- "message": "Notification Sent"
}
Create Data Elements
dataElementId required | string^[a-zA-Z0-9-_]+$ |
elementName | string^[a-zA-Z0-9-_.,& ]+$ Name of the data element. This field will be ignored by SGDex |
elementSchema | string Schema of the data element (in JSON Schema Format). This field will be ignored by SGDex |
querySchema | string Schema of how to query the data element (Also in JSON Schema format). This field will be ignored by SGDex |
csvTemplate | string Template in csv. This field will be ignored by SGDex |
jsonTemplate | string Template in JSON. This field will be ignored by SGDex |
type | string Enum: "DOCUMENT" "EVENT" Indicates whether it is a document or event. This field will be ignored by SGDex |
additionalProperties | object Any other addtional properties. This field will be ignored by SGDex |
[- {
- "dataElementId": "string",
- "elementName": "string",
- "elementSchema": "string",
- "querySchema": "string",
- "csvTemplate": "string",
- "jsonTemplate": "string",
- "type": "DOCUMENT",
- "additionalProperties": { }
}
]
Create new Systems
systemId required | string <uuid> The ID of the system |
systemName required | string^[a-zA-Z0-9-_.,&()@:;?!'"‘’“”{}<>\\\/\[\] ]+$... The name of the system |
endPointUrl required | string <uri> The full URL of the pitstop to send data exchange events to e.g. https://trafigura.test.sgtradex.io/api/v1/data/messageHandler |
orgId | string <uuid> The Organization Id that this system belongs to. This field will be ignored by SGDex |
additionalProperties | object Any other addtional properties. This field will be ignored by SGDex |
[- {
- "systemId": "4423a5f3-2691-4d92-a9ef-2418d2c205d8",
- "systemName": "string",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "additionalProperties": { }
}
]
Update a System detail
systemId required | string <uuid> The ID of the system to update |
systemName required | string^[a-zA-Z0-9-_.,&()@:;?!'"‘’“”{}<>\\\/\[\] ]+$... The name of the system |
endPointUrl required | string <uri> The full URL of the pitstop to send data exchange events to e.g. https://trafigura.test.sgtradex.io/api/v1/data/messageHandler |
orgId | string <uuid> The Organization Id that this system belongs to. This field will be ignored by SGDex |
additionalProperties | object Any other addtional properties. This field will be ignored by SGDex |
{- "systemName": "string",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "additionalProperties": { }
}
Create a new subscription between parties
subscriptionId required | string <uuid> The ID of the subscription created |
subscriberOrgId | string <uuid> The ID of the organization consuming the data element. This field will be ignored by SGDex |
subscriberSystemId required | string <uuid> The ID of the system the consuming organization is using to consume the data element |
subscriberEnrolmentId | string <uuid> The Enrolment ID for the consumer. This field will be ignored by SGDex |
prosumerOrgId | string <uuid> The ID of the organization producing the data element. This field will be ignored by SGDex |
prosumerSystemId required | string <uuid> The ID of the system the producing organization is using to produce the data element |
providerEnrolmentId | string <uuid> The Enrolment ID for the producer. This field will be ignored by SGDex |
useCaseId required | string^[a-zA-Z0-9-_]+$ The ID of the Use Case related to this subscription |
dataElementId required | string^[a-zA-Z0-9-_]+$ The Data Element Id related to this subscription |
prosumerType | string This field will be ignored by SGDex |
status required | string Enum: "APPROVED" "PENDING" "REVOKED" "REJECTED" |
requesterOrgId | string <uuid> This field will be ignored by SGDex |
contributorOrgId | string <uuid> The ID of the organization owning the data |
contributorSystemId | string <uuid> The ID of the system the data contributor is using |
[- {
- "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
- "subscriberOrgId": "820951f5-3e95-4d68-9348-a1998d773ead",
- "subscriberSystemId": "7943752a-b052-4ed1-b9bd-17f9e13bf693",
- "subscriberEnrolmentId": "66384c19-5da0-4fdb-99e9-63619e3b24c4",
- "prosumerOrgId": "9fd0bba6-5cc0-41e3-964d-71771be8e501",
- "prosumerSystemId": "603ead66-ae9f-43da-b685-c4e87706c669",
- "providerEnrolmentId": "8bb8d90e-4add-4ba3-87b1-e230898481c2",
- "useCaseId": "string",
- "dataElementId": "string",
- "prosumerType": "string",
- "status": "APPROVED",
- "requesterOrgId": "3da24845-9b65-4a16-b4f5-43d2de82becc",
- "contributorOrgId": "bb83a894-6005-4c41-a037-5fa0df4145b4",
- "contributorSystemId": "aa99e732-3fff-4012-b10c-7efdce76ce0d"
}
]