Velacent Bridge: beta December 2026, general availability early 2027. E-mail sales to request beta access.

Documentation menu

Scripts API

Last updated . Documentation for the current release. Ask in the product.

6 operations. Back to the API overview. Examples use synthetic data.

List scripts

GET /admin/v1/scripts

Needs the permission: config:history.

Response 200

Response fields of List scripts
FieldTypePresenceDescription
limitsmap of integeroptional-
scriptsanyoptional-
Example response (synthetic data)
{
  "limits": {
    "example": 1
  },
  "scripts": {}
}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request GET \
  --header "Authorization: Bearer $ID_TOKEN" \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts"

Get script

GET /admin/v1/scripts/{id}

Needs the permissions: config:history, payload:read.

Parameters

Parameters of Get script
NameInTypePresenceDescription
idpathstringrequired-

Response 200

Response fields of Get script
FieldTypePresenceDescription
limitsmap of integeroptional-
samplesanyoptional-
samples_visiblebooleanoptional-
scriptobject (ScriptSummary)optional-
script.activeobject (ActiveJSON)optional-
script.descriptionstringoptional-
script.draftobject (ScriptCode)optionalCode is one script version: what runs.
script.draft_sha256stringoptional-
script.idstringoptional-
script.pendingbooleanoptionalPending: the draft differs from the active version.
script.routesarray of stringoptional-
script.samplesintegeroptional-
script.versionintegeroptional-
Example response (synthetic data)
{
  "limits": {
    "example": 1
  },
  "samples": {},
  "samples_visible": true,
  "script": {
    "active": {
      "activated_at": "2026-01-15T14:30:00Z",
      "activated_by": "example",
      "code": {
        "dialect": "example",
        "format": "example",
        "kind": "example",
        "language": "example",
        "limits": {
          "memory_mb": 1,
          "time_ms": 1
        },
        "output": "example",
        "source": "example"
      },
      "draft_version": 1,
      "samples_passed": 1,
      "sha256": "example"
    },
    "description": "example",
    "draft": {
      "dialect": "example",
      "format": "example",
      "kind": "example",
      "language": "example",
      "limits": {
        "memory_mb": 1,
        "time_ms": 1
      },
      "output": "example",
      "source": "example"
    },
    "draft_sha256": "example",
    "id": "example-id",
    "pending": true,
    "routes": [
      "example"
    ],
    "samples": 1,
    "version": 1
  }
}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request GET \
  --header "Authorization: Bearer $ID_TOKEN" \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts/example-id"

Put script

PUT /admin/v1/scripts/{id}

Needs the permission: config:write.

Parameters

Parameters of Put script
NameInTypePresenceDescription
idpathstringrequired-

Request body

Request body of Put script
FieldTypePresenceDescription
descriptionstringoptional-
draftobject (ScriptCode)optionalCode is one script version: what runs.
draft.dialectstringoptional-
draft.formatstringoptional-
draft.kindstringoptional-
draft.languagestringoptional-
draft.limitsobject (ScriptLimits)optionalLimits are a script's resource limits; zero values take the defaults.
draft.outputstringoptionalOutput, for a transform of a json or xml message, converts it: the script builds the result in the global output (hl7v2 or fhir) and the converted message continues through the destination's own pipeline in that format. Empty: the message stays in its format.
draft.sourcestringoptional-
reasonstringoptional-
samplesarray of object (SampleIn)optional-
samples.[]expectstringoptional-
samples.[]messagestringoptional-
samples.[]namestringoptional-
samples.[]outputstringoptional-
samples.[]previousstringoptionalPrevious names the stored sample a renamed one keeps its masked message and output from (default: Name).
versionintegeroptional-
Example request body (synthetic data)
{
  "description": "example",
  "draft": {
    "dialect": "example",
    "format": "example",
    "kind": "example",
    "language": "example",
    "limits": {
      "memory_mb": 1,
      "time_ms": 1
    },
    "output": "example",
    "source": "example"
  },
  "reason": "Example text",
  "samples": [
    {
      "expect": "example",
      "message": "Example text",
      "name": "example-name",
      "output": "example",
      "previous": "example"
    }
  ],
  "version": 1
}

Response 200

Example response (synthetic data)
{}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request PUT \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"description":"example","draft":{"dialect":"example","format":"example","kind":"example","language":"example","limits":{"memory_mb":1,"time_ms":1},"output":"example","source":"example"},"reason":"Example text","samples":[{"expect":"example","message":"Example text","name":"example-name","output":"example","previous":"example"}],"version":1}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts/example-id"

Activate script

POST /admin/v1/scripts/{id}/activate

With customer SSO, requires a recent sign-in (re-authentication).

Needs the permissions: payload:read, scripts:activate.

Parameters

Parameters of Activate script
NameInTypePresenceDescription
idpathstringrequired-

Request body

Request body of Activate script
FieldTypePresenceDescription
reasonstringoptional-
versionintegeroptional-
Example request body (synthetic data)
{
  "reason": "Example text",
  "version": 1
}

Response 200

Example response (synthetic data)
{}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request POST \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"reason":"Example text","version":1}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts/example-id/activate"

Delete script

POST /admin/v1/scripts/{id}/delete

Needs the permission: config:write.

Parameters

Parameters of Delete script
NameInTypePresenceDescription
idpathstringrequired-

Request body

Request body of Delete script
FieldTypePresenceDescription
reasonstringoptional-
versionintegeroptional-
Example request body (synthetic data)
{
  "reason": "Example text",
  "version": 1
}

Response 200

Example response (synthetic data)
{}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request POST \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"reason":"Example text","version":1}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts/example-id/delete"

Test script

POST /admin/v1/scripts/{id}/test

Needs the permissions: config:write, payload:read.

Parameters

Parameters of Test script
NameInTypePresenceDescription
idpathstringrequired-

Request body

Request body of Test script
FieldTypePresenceDescription
draftobject (ScriptCode)optionalDraft is a candidate to test instead of the saved draft (the editor's unsaved text).
draft.dialectstringoptional-
draft.formatstringoptional-
draft.kindstringoptional-
draft.languagestringoptional-
draft.limitsobject (ScriptLimits)optionalLimits are a script's resource limits; zero values take the defaults.
draft.outputstringoptionalOutput, for a transform of a json or xml message, converts it: the script builds the result in the global output (hl7v2 or fhir) and the converted message continues through the destination's own pipeline in that format. Empty: the message stays in its format.
draft.sourcestringoptional-
messagestringoptionalMessage, when set, is one pasted message to run instead of the samples (payload:read).
Example request body (synthetic data)
{
  "draft": {
    "dialect": "example",
    "format": "example",
    "kind": "example",
    "language": "example",
    "limits": {
      "memory_mb": 1,
      "time_ms": 1
    },
    "output": "example",
    "source": "example"
  },
  "message": "Example text"
}

Response 200

Response fields of Test script
FieldTypePresenceDescription
compile_errorstringoptional-
compile_lineintegeroptional-
compiledbooleanoptional-
content_shownbooleanoptional-
passedintegeroptional-
resultsarray of object (SampleResult)optional-
results.[]changedbooleanoptional-
results.[]duration_msintegeroptional-
results.[]expectstringoptional-
results.[]failureobject (FailureJSON)optional-
results.[]inputstringoptionalInput and Output: payload:read only.
results.[]logsarray of object (LogJSON)optional-
results.[]lookupsarray of object (ScriptLookupUse)optional-
results.[]namestringoptional-
results.[]outcomestringoptional-
results.[]outputstringoptional-
results.[]output_matchedbooleanoptional-
results.[]passedbooleanoptional-
results.[]problemstringoptionalwhy it did not pass (no values)
sha256stringoptional-
totalintegeroptional-
Example response (synthetic data)
{
  "compile_error": "Example text",
  "compile_line": 1,
  "compiled": true,
  "content_shown": true,
  "passed": 1,
  "results": [
    {
      "changed": true,
      "duration_ms": 1,
      "expect": "example",
      "failure": {
        "class": "example",
        "detail": "example",
        "limit": "example",
        "line": 1,
        "reason": "Example text"
      },
      "input": "example",
      "logs": [
        {
          "level": "example",
          "text": "example"
        }
      ],
      "lookups": [
        {
          "count": 1,
          "id": "example-id",
          "kind": "example"
        }
      ],
      "name": "example-name",
      "outcome": "example",
      "output": "example",
      "output_matched": true,
      "passed": true,
      "problem": "example"
    }
  ],
  "sha256": "example",
  "total": 1
}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request POST \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"draft":{"dialect":"example","format":"example","kind":"example","language":"example","limits":{"memory_mb":1,"time_ms":1},"output":"example","source":"example"},"message":"Example text"}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/scripts/example-id/test"

Something unclear or missing? Ask Help in the Velacent Bridge console; answers link to the right screen. How support works.