This API possibility to transform string with python code.
Transformation API (1)
Download OpenAPI description
Languages
Servers
Production
https://api.cdq.com/transformation/rest/
Bodyapplication/jsonrequired
Set to 'true' if you want to apply the reverse mapping
 Default false
 Example: "true"
- Production
https://api.cdq.com/transformation/rest/datatransformationdefinitions/{id}/transform
 
- cURL
 - Java
 - JavaScript
 - Python
 - Node.js
 
curl -i -X POST \
  https://api.cdq.com/transformation/rest/datatransformationdefinitions/c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4/transform \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "inputJson": [
      {}
    ],
    "reverse": "true",
    "validationSchemaId": "66432427ba96dd27add2ea34"
  }'Response
application/json
{ "resultJson": [ {} ] }
Bodyapplication/json
Set to 'true' if you want to apply the reverse mapping
 Default false
 Example: "true"
ID of Json validation schema
 Example: "66432427ba96dd27add2ea34"
- Production
https://api.cdq.com/transformation/rest/datatransformationdefinitions/transform
 
- cURL
 - Java
 - JavaScript
 - Python
 - Node.js
 
curl -i -X POST \
  https://api.cdq.com/transformation/rest/datatransformationdefinitions/transform \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "inputJson": [
      {}
    ],
    "reverse": "true",
    "validationSchemaId": "66432427ba96dd27add2ea34",
    "dataTransformationDefinition": {
      "imports": [
        {
          "id": "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4"
        }
      ],
      "name": "My DTD",
      "direction": "INBOUND",
      "type": {
        "name": "BUSINESS_PARTNER",
        "technicalKey": "BUSINESS_PARTNER"
      },
      "mappings": [
        {
          "sourceAttributes": [
            "businessPartner.record"
          ],
          "sourceSelections": [
            {
              "selectionType": "CONCATENATION",
              "value": ","
            }
          ],
          "targetAttributes": [
            "businessPartner.externalId"
          ],
          "targetTransformations": [
            {
              "constantValue": "constant",
              "targetAttributes": [
                "businessPartner.externalId"
              ],
              "transformationName": "CAPITALIZE",
              "defaultValue": "default",
              "transformationType": "CAPITALIZE"
            }
          ],
          "ignoredValues": [
            "ignored value"
          ]
        }
      ],
      "reverseMappings": [
        {
          "sourceAttributes": [
            "businessPartner.record"
          ],
          "sourceSelections": [
            {
              "selectionType": "CONCATENATION",
              "value": ","
            }
          ],
          "targetAttributes": [
            "businessPartner.externalId"
          ],
          "targetTransformations": [
            {
              "constantValue": "constant",
              "targetAttributes": [
                "businessPartner.externalId"
              ],
              "transformationName": "CAPITALIZE",
              "defaultValue": "default",
              "transformationType": "CAPITALIZE"
            }
          ],
          "ignoredValues": [
            "ignored value"
          ]
        }
      ],
      "valueMappings": [
        {
          "sourceConditions": [
            {
              "sourceValue": "AU",
              "sourceAttribute": "$.identifications[*].country.code",
              "sourceRegex": "^GR\\..{1,}"
            }
          ],
          "sourceValue": "AE1",
          "targetValue": "AE",
          "targetAttribute": "$.identifications[*].country.code",
          "sourceAttribute": "$.identifications[*].country.code",
          "disabled": "false"
        }
      ],
      "values": [
        {
          "sourceValue": "AE1",
          "sourceAttribute": "identifications[*].indentificationType.code"
        }
      ]
    }
  }'Response
application/json
{ "resultJson": [ {} ] }