Skip to main content
Version: 2.0

Test Instruction API Definition

The Test Instruction API enables you to validate the syntax and compilation of an instruction template written in Apache Velocity Template Language (VTL). This is a crucial step in the development process, as it allows you to catch errors in your templates before they are used by an agent.

Test Instruction Request and Response

To test an instruction, send a POST request to /v2/instructions/{instruction_id}/test. The instruction_id is the unique identifier of the instruction you want to test.

There is no request body for this endpoint. If the instruction template is valid, the API responds with a 204 No Content status. If the template is invalid, the API returns a 400 Bad Request with an error message detailing the syntax error.

Example Request

EXAMPLE REQUEST
1

Example Response (Success)

EXAMPLE RESPONSE (SUCCESS)
1

Example Response (Failure)

EXAMPLE RESPONSE (FAILURE)
1

Error Responses

The API returns standard HTTP error codes with detailed error information:

HTTP CodeError CodeDescription
400invalid_requestInvalid instruction_id format
400invalid_templateThe instruction template has a syntax error
401unauthorizedInvalid or missing API key
403forbiddenInsufficient permissions for testing this instruction
404not_foundInstruction with the specified ID does not exist
429rate_limit_exceededRequest rate limit exceeded