Functions endpoints
Mapping-set functions allow you to transform your data between source and destination schemas. You can use the /languages/el
endpoint to validate your expressions as well as get a list of all the available mapping-set functions.
Validate expressions
You can validate if your current expression is valid by making a POST request to the /languages/el/validate
endpoint.
API format
POST /languages/el/validate
Request
curl -X POST https://platform.adobe.io/data/foundation/conversion/languages/el/validate \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"expression": "concat(\"Hi\", \",\", \"there\", \"!\")"
}'
Response
A successful response returns HTTP status 200 with the validation status of the expression.
{
"validationStatus": "succeeded",
"error": "none"
}
List mapping set functions
You can retrieve a list of all the mapping-set functions available to you by making a GET request to the /languages/el/functions
endpoint.
API format
GET /languages/el/functions
Request
curl -X GET https://platform.adobe.io/data/foundation/conversion/languages/el/functions \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns HTTP status 200 with a list of all the available mapping-set functions.
[
{
"category": "Date / Time",
"function": "date",
"description": "Function that converts date string into a ZonedDateTime object.",
"syntax": "ZonedDateTime date(String, String, ZonedDateTime)",
"returns": "Returns the date object that is formatted in given format or a default date if the expression evaluates to a null date.",
"returnType": "java.time.ZonedDateTime",
"example": "",
"result": "",
"params": [],
"since": 1
},
{
"category": "Hierarchies - Arrays",
"function": "first",
"description": "Function to retrieve the first element of the given array.",
"syntax": "T first(T...)",
"returns": "The first element or null if the array is null or empty.",
"returnType": "java.lang.Object",
"example": "first(\"1\", \"2\", \"3\")",
"result": "\"1\"",
"params": [
{
"name": "values",
"description": "Zero or more arguments",
"type": "object",
"dataType": "[Ljava.lang.Object;",
"position": 1
}
],
"since": 1
}
]
List mapping set operators
You can retrieve a list of all the mapping-set operators available to you by making a GET request to the /languages/el/operators
endpoint.
API format
GET /languages/el/operators
Request
curl -X GET https://platform.adobe.io/data/foundation/conversion/languages/el/operators \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns HTTP status 200 with a list of all the available mapping-set operators.
[
{
"operatorSymbol": "+",
"methodName": "add",
"numberOfOperands": 2,
"description": "Simple arithmetic addition",
"example": "1 + 2"
},
{
"operatorSymbol": "/",
"methodName": "divide",
"numberOfOperands": 2,
"description": "Simple arithmetic division",
"example": "1 / 2"
},
{
"operatorSymbol": "~",
"methodName": "complement",
"numberOfOperands": 1,
"description": "The usual ~ operator is used, e.g.\n~33\n, ~0010 0001 = 1101 1110 = -34.",
"example": "~44"
},
{
"operatorSymbol": "-",
"methodName": "negate",
"numberOfOperands": 1,
"description": "The unary - operator is used. For example\n-12",
"example": "-12"
},
{
"operatorSymbol": "!",
"methodName": "not",
"numberOfOperands": 1,
"description": "The usual ! operator can be used as well as the word not, e.g.\n!cond1\nand\nnot cond1\nare equivalent",
"example": "!cond1"
}
]