The /api/process
endpoint expects a JSON object in the request body containing three keys: input, transforms, and settings. Then it transforms the given input with provided transformations and settings and returns the transformed output.
Input: The input key holds a JSON object with initial data or context used for transformations.
Transforms:
Settings:
{
"input": {
"name": {
"first": "Malory",
"last": "Archer"
},
"exes": [
"Nikolai Jakov",
"Len Trexler",
"Burt Reynolds"
],
"lastEx": 2
},
"transforms": [
{
"lastEx": "input.lastEx + 5"
}
],
"settings": {
"merge_method": "overwrite"
}
}
{
"name": {
"first": "Malory",
"last": "Archer"
},
"exes": [
"Nikolai Jakov",
"Len Trexler",
"Burt Reynolds"
],
"lastEx": 7
}
The /api/run
endpoint expects a JSON object in the request body containing three keys: input, emailId, and transformName. Then it transforms the given input with transformations and settings fetched from the KV store for given emailId and transformName and then returns the transformed output. The transforms can be saved in KV store using /api/saveTransform
endpoint.
Input: The input key holds a JSON object with initial data or context used for transformations.
Email Id: The emailId key expects a valid email address, using which you can save your transformations.
Transform Name: The transformName key expects a valid transform name, using which you can save your transformations.
{
"input": {
"name": {
"first": "Malory",
"last": "Archer"
},
"exes": [
"Nikolai Jakov",
"Len Trexler",
"Burt Reynolds"
],
"lastEx": 2
},
"emailId": "someone@example.com",
"transformName": "TRANSFORM1"
}
{
"name": {
"first": "Malory",
"last": "Archer"
},
"exes": [
"Nikolai Jakov",
"Len Trexler",
"Burt Reynolds"
],
"lastEx": 7
}
The /api/saveTransform
endpoint expects a JSON object in the request body containing four keys: transformName, transforms, settings, and emailId. Then it saves the transforms and settings in the KV store for given emailId and transformName and then returns the status if the transformations are successfully saved or not.
Transforms: The transforms key expects a valid parsed transforms object as explained in /api/process
.
Settings: The settings key expects a valid settings object as explained in /api/process
.
Email Id: The emailId key expects a valid email address, which is required in fetching your saved transforms.
Transform Name: The transformName key expects a valid transform name, which is required in fetching your saved transforms.
{
"transforms": [
{
"lastEx": "derived.lastEx + 5"
}
],
"settings": {
"merge_method": "overwrite"
},
"emailId": "someone@example.com",
"transformName": "TRANSFORM1"
}
{
"status": "The transforms are saved successfully!...",
"versionstamp": "00000000000000010000"
}
The /api/retrieveTransform
endpoint expects a JSON object in the request body containing two keys: transformName, and emailId. Then it fetches the transforms and settings from the KV store.
Email Id: The emailId key expects a valid email address, which is required in fetching your saved transforms.
Transform Name: The transformName key expects a valid transform name, which is required in fetching your saved transforms.
{
"emailId": "someone@example.com",
"transformName": "TRANSFORM1"
}
{
"key": [
"someone@example.com",
"TRANSFORM1"
],
"versionstamp": "00000000000000010000",
"value": {
"transforms": [
{
"lastEx": "input.lastEx + 5"
}
],
"settings": {
"merge_method": "overwrite"
}
}
}
The /api/retrieveAllTransformsByEmail
endpoint expects a JSON object in the request body containing one key: emailId. Then it fetches all the transforms and settings from the KV store with the given emailId.
Email Id: The emailId key expects a valid email address, which is required in fetching your saved transforms.
{
"emailId": "someone@example.com"
}
[
{
"key": [
"someone@example.com",
"TRANSFORM1"
],
"versionstamp": "00000000000000010000",
"value": {
"transforms": [
{
"lastEx": "input.lastEx + 7"
}
],
"settings": {
"merge_method": "overwrite"
}
}
},
{
"key": [
"someone@example.com",
"TRANSFORM2"
],
"versionstamp": "00000000000000010000",
"value": {
"transforms": [
{
"lastEx": "input.lastEx + 5"
}
],
"settings": {
"merge_method": "preserve"
}
}
}
]
The /api/deleteTransform
endpoint expects a JSON object in the request body containing two keys: transformName, and emailId. Then it deletes the transforms and settings from the KV store.
Email Id: The emailId key expects a valid email address, which is required in deleting your saved transforms.
Transform Name: The transformName key expects a valid transform name, which is required in deleting your saved transforms.
{
"emailId": "someone@example.com",
"transformName": "TRANSFORM1"
}
{
"status": "The transform TRANSFORM1 is deleted successfully"
}
The /api/deleteAllTransformsByEmail
endpoint expects a JSON object in the request body containing one key: emailId. Then it deletes all the transforms and settings from the KV store with the given emailId.
Email Id: The emailId key expects a valid email address, which is required in deleting your saved transforms.
{
"emailId": "someone@example.com"
}
{
"status": "All transforms created by user someone@example.com are deleted successfully"
}
The /api/health
endpoint tells if the service is UP and running or not.
{
"status": "UP"
}
The /api/errors
returns the error codes list from the core datadance module.
[
"error-101",
"error-102",
"error-103",
"error-104",
"error-105"
]