Runs a stored transformation (transformationId) or an unsaved definition on a Studio document (documentId) or an inline sample (document) and returns the indented output. Nothing is saved. A stylesheet that fails to compile or run is answered with 400. A stored transformation must belong to the token's company (400 otherwise). The stylesheet runs isolated: it cannot read other files or URLs (document(), xsl:import, xsl:include) or call Java extension functions. Like every POST it needs the write scope, although nothing is saved.
Security
OAuth2(Required scopes: integration-setup.write)
One of:
Set exactly one of transformationId/definition and exactly one of documentId/document.
- API EUhttps://api.cloud.hypatos.ai/v2/integration-setup/xslt-transformations/test
- API UShttps://api.cloud.hypatos.com/v2/integration-setup/xslt-transformations/test
- Mock serverhttps://hypatos.redocly.app/_mock/openapi/integration-setup/xslt-transformations/test
curl -i -X POST \
https://api.cloud.hypatos.ai/v2/integration-setup/xslt-transformations/test \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"definition": {
"transformation": "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"/\"><invoice><xsl:value-of select=\"//documentNumber\"/></invoice></xsl:template></xsl:stylesheet>"
},
"document": {
"documentNumber": "INV-1001"
}
}'Response
{ "output": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><invoice>INV-1001</invoice>\n" }