openapi: 3.0.0 info: version: 0.2.1 title: TraceTest description: OpenAPI definition for TraceTest endpoint and resources servers: - url: /api paths: /definition.yaml: post: tags: - api summary: "Execute a definition" description: "Execute a definition" operationId: executeDefinition requestBody: content: text/json: schema: $ref: "./definition.yaml#/components/schemas/TextDefinition" responses: 201: description: Definition created content: application/json: schema: $ref: "./definition.yaml#/components/schemas/ExecuteDefinitionResponse" 200: description: Definition updated content: application/json: schema: $ref: "./definition.yaml#/components/schemas/ExecuteDefinitionResponse" put: tags: - api summary: "Upsert a definition" description: "Upsert a definition" operationId: upsertDefinition requestBody: content: text/json: schema: $ref: "./definition.yaml#/components/schemas/TextDefinition" responses: 201: description: Definition created content: application/json: schema: $ref: "./definition.yaml#/components/schemas/UpsertDefinitionResponse" 200: description: Definition updated content: application/json: schema: $ref: "./definition.yaml#/components/schemas/UpsertDefinitionResponse" # Transactions /transactions: get: tags: - resource-api summary: "Get transactions" description: "get transactions" operationId: getTransactions parameters: - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" - $ref: "./parameters.yaml#/components/parameters/query" - $ref: "./parameters.yaml#/components/parameters/runnableResourceSortBy" - $ref: "./parameters.yaml#/components/parameters/sortDirection" responses: 200: description: successful operation content: application/json: schema: type: object properties: count: type: integer items: type: array items: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: type: object properties: count: type: integer items: type: array items: $ref: "./transactions.yaml#/components/schemas/TransactionResource" 400: description: "invalid query for transactions, some data was sent in incorrect format." 500: description: "problem with getting transactions" post: tags: - resource-api summary: "Create new transaction" description: "Create new transaction" operationId: createTransaction requestBody: content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" responses: 201: description: successful operation content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" 400: description: "trying to create a transaction with an already existing ID" 500: description: "problem creating a transaction" /transactions/{transactionId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" summary: "get transaction" description: "get transaction" operationId: getTransaction responses: 200: description: successful operation content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" 404: description: "transaction not found" 500: description: "problem getting an transaction" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" summary: "update transaction" description: "update transaction action" operationId: updateTransaction requestBody: content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" responses: 200: description: successful operation content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" text/yaml: schema: $ref: "./transactions.yaml#/components/schemas/TransactionResource" 400: description: "invalid transaction, some data was sent in incorrect format." 404: description: "transaction not found" 500: description: "problem updating a transaction" delete: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" summary: "delete a transaction" description: "delete a transaction" operationId: deleteTransaction responses: 204: description: successful operation 404: description: "transaction not found" 500: description: "problem deleting a transaction" /transactions/{transactionId}/version/{version}: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" - $ref: "./parameters.yaml#/components/parameters/version" summary: "get a transaction specific version" description: "get a transaction specific version" operationId: getTransactionVersion responses: 200: description: successful operation content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/Transaction" 500: description: "problem with getting a test" /transactions/{transactionId}/version/{version}/definition.yaml: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" - $ref: "./parameters.yaml#/components/parameters/version" summary: Get the transaction definition as an YAML file description: Get the transaction as an YAML file operationId: getTransactionVersionDefinitionFile responses: 200: description: OK content: application/yaml: schema: type: string /transactions/{transactionId}/run: post: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" summary: "run transaction" description: "run a particular transaction" operationId: runTransaction requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/RunInformation" responses: 200: description: successful operation content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionRun" get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" summary: "Get all runs from a particular transaction" description: "Get all runs from a particular transaction" operationId: getTransactionRuns responses: 200: description: OK content: application/json: schema: type: array items: $ref: "./transactions.yaml#/components/schemas/TransactionRun" /transactions/{transactionId}/run/{runId}: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "Get a specific run from a particular transaction" description: "Get a specific run from a particular transaction" operationId: getTransactionRun responses: 200: description: OK content: application/json: schema: $ref: "./transactions.yaml#/components/schemas/TransactionRun" 404: description: transaction run not found delete: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/transactionId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "Delete a specific run from a particular transaction" description: "Delete a specific run from a particular transaction" operationId: deleteTransactionRun responses: 204: description: OK 404: description: transaction run not found # Tests /tests: get: tags: - api summary: "Get tests" description: "get tests" operationId: getTests parameters: - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" - $ref: "./parameters.yaml#/components/parameters/query" - $ref: "./parameters.yaml#/components/parameters/runnableResourceSortBy" - $ref: "./parameters.yaml#/components/parameters/sortDirection" responses: 200: description: successful operation headers: X-Total-Count: schema: type: integer description: Total records count content: application/json: schema: type: array items: $ref: "./tests.yaml#/components/schemas/Test" 500: description: "problem with getting tests" post: tags: - api summary: "Create new test" description: "Create new test action" operationId: createTest requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/Test" responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/Test" 400: description: "trying to create a test with an already existing ID" /tests/{testId}: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" summary: "get test" description: "get test" operationId: getTest responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/Test" 500: description: "problem with getting a test" put: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" summary: "update test" description: "update test action" operationId: updateTest requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/Test" responses: 204: description: successful operation 500: description: "problem with updating test" delete: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" summary: "delete a test" description: "delete a test" operationId: deleteTest responses: "204": description: OK /tests/{testId}/run: post: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" summary: "run test" description: "run a particular test" operationId: runTest requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/RunInformation" responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/TestRun" 422: description: some variables are missing content: application/json: schema: $ref: "./variables.yaml#/components/schemas/MissingVariablesError" get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" summary: "get the runs for a test" description: "get the runs from a particular test" operationId: getTestRuns responses: 200: description: successful operation headers: X-Total-Count: schema: type: integer description: Total records count content: application/json: schema: type: array items: $ref: "./tests.yaml#/components/schemas/TestRun" /tests/{testId}/run/{runId}/select: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" - $ref: "./parameters.yaml#/components/parameters/query" summary: "retrieve spans that will be selected by selector" description: "get the spans ids that would be selected by a specific selector query" operationId: getTestResultSelectedSpans responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/SelectedSpansResult" /tests/{testId}/run/{runId}/dry-run: put: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "run given assertions against the traces from the given run without persisting anything" description: "use this method to test a definition against an actual trace without creating a new version or persisting anything" operationId: dryRunAssertion requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/TestSpecs" responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/AssertionResults" /tests/{testId}/run/{runId}/rerun: post: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "rerun a test run" description: "rerun a test run" operationId: rerunTestRun responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/TestRun" /tests/{testId}/run/{runId}/junit.xml: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "get test run results in JUnit xml format" description: "get test run results in JUnit xml format" operationId: getRunResultJUnit responses: 200: description: JUnit formatted file content: application/xml: schema: type: string /tests/{testId}/run/{runId}/export: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: export test and test run information description: export test and test run information for debugging operationId: exportTestRun responses: 200: description: successfuly exported test and test run information content: application/json: schema: $ref: "tests.yaml#/components/schemas/ExportedTestInformation" /tests/import: post: tags: - api summary: import test and test run information description: import test and test run information for debugging operationId: importTestRun requestBody: content: application/json: schema: $ref: "./tests.yaml#/components/schemas/ExportedTestInformation" responses: 200: description: successfuly imported test and test run information content: application/json: schema: $ref: "tests.yaml#/components/schemas/ExportedTestInformation" /tests/{testId}/run/{runId}: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "get test Run" description: "get a particular test Run" operationId: getTestRun responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/TestRun" delete: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "delete a test run" description: "delete a test run" operationId: deleteTestRun responses: "204": description: OK /tests/{testId}/definition: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" operationId: getTestSpecs summary: "Get definition for a test" description: "Gets definition for a test" responses: 201: description: successful operation content: application/json: schema: type: array items: $ref: "./tests.yaml#/components/schemas/TestSpecs" /tests/{testId}/version/{version}: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/version" summary: "get a test specific version" description: "get a test specific version" operationId: getTestVersion responses: 200: description: successful operation content: application/json: schema: $ref: "./tests.yaml#/components/schemas/Test" 500: description: "problem with getting a test" /tests/{testId}/version/{version}/definition.yaml: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/version" summary: Get the test definition as an YAML file description: Get the test definition as an YAML file operationId: getTestVersionDefinitionFile responses: 200: description: OK content: application/yaml: schema: type: string /tests/{testId}/run/{runId}/stop: post: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "stops the execution of a test run" description: "stops the execution of a test run" operationId: stopTestRun responses: 200: description: successful operation 422: description: could not stop execution, probably it's not running anymore # Test events /tests/{testId}/run/{runId}/events: get: tags: - api parameters: - $ref: "./parameters.yaml#/components/parameters/testId" - $ref: "./parameters.yaml#/components/parameters/runId" summary: "get events from a test run" description: "get events from a test run" operationId: getTestRunEvents responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: "./testEvents.yaml#/components/schemas/TestRunEvent" # Expressions /expressions/resolve: post: tags: - api summary: resolves an expression and returns the result string description: resolves an expression and returns the result string operationId: ExpressionResolve requestBody: content: application/json: schema: $ref: "./expressions.yaml#/components/schemas/ResolveRequestInfo" responses: 200: description: successfully resolved the expression content: application/json: schema: $ref: "./expressions.yaml#/components/schemas/ResolveResponseInfo" # Resources (Tests, Transactions) /resources: get: tags: - api summary: "Get resources" description: "get resources" operationId: getResources parameters: - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" - $ref: "./parameters.yaml#/components/parameters/query" - $ref: "./parameters.yaml#/components/parameters/runnableResourceSortBy" - $ref: "./parameters.yaml#/components/parameters/sortDirection" responses: 200: description: successful operation headers: X-Total-Count: schema: type: integer description: Total records count content: application/json: schema: type: array items: $ref: "./resources.yaml#/components/schemas/Resource" # Configuration /config/connection: post: tags: - api summary: "Tests the config data store/exporter connection" description: "Tests the config data store/exporter connection" operationId: testConnection requestBody: content: text/json: schema: $ref: "./dataStores.yaml#/components/schemas/DataStore" responses: 201: description: Test connection Result content: application/json: schema: $ref: "./config.yaml#/components/schemas/TestConnectionResponse" /configs/{configId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/configId" summary: "Get Tracetest configuration" description: "Get Tracetest configuration" operationId: getConfiguration responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" text/yaml: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" 500: description: "problem getting a configuration" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/configId" summary: "Update Tracetest configuration" description: "Update Tracetest configuration" operationId: updateConfiguration requestBody: content: application/json: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" text/yaml: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" text/yaml: schema: $ref: "./config.yaml#/components/schemas/ConfigurationResource" 500: description: "problem updating configuration" # Polling Profile /pollingprofiles/{pollingProfileId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/pollingProfileId" summary: "Get Polling Profile" description: "Get a polling profile used on Tracetest to configure how to fetch traces in a test." operationId: getPollingProfile responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" text/yaml: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" 404: description: "polling profile not found" 500: description: "problem getting a polling profile" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/pollingProfileId" summary: "Update a Polling Profile" description: "Update a polling profile used on Tracetest to configure how to fetch traces in a test." operationId: updatePollingProfile requestBody: content: application/json: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" text/yaml: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" text/yaml: schema: $ref: "./config.yaml#/components/schemas/PollingProfile" 400: description: "invalid polling profile, some data was sent in incorrect format." 404: description: "polling profile not found" 500: description: "problem updating a polling profile" # Demo /demos: get: tags: - resource-api summary: "List Demonstrations" description: "List demonstrations used on Tracetest as quick start examples." operationId: listDemos parameters: - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" - $ref: "./parameters.yaml#/components/parameters/switchableResourceSortBy" - $ref: "./parameters.yaml#/components/parameters/sortDirection" responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/DemoList" text/yaml: schema: type: object properties: count: type: integer items: type: array items: $ref: "./config.yaml#/components/schemas/Demo" 400: description: "invalid query for demos, some data was sent in incorrect format." 500: description: "problem listing demos" post: tags: - resource-api summary: "Create a Demonstration setting" description: "Create a demonstration used on Tracetest as quick start examples." operationId: createDemo requestBody: content: application/json: schema: $ref: "./config.yaml#/components/schemas/Demo" text/yaml: schema: $ref: "./config.yaml#/components/schemas/Demo" responses: 201: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/Demo" text/yaml: schema: $ref: "./config.yaml#/components/schemas/Demo" 500: description: "problem creating a demo" /demos/{demoId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/demoId" summary: "Get Demonstration setting" description: "Get a demonstration used on Tracetest as quick start examples." operationId: getDemo responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/Demo" text/yaml: schema: $ref: "./config.yaml#/components/schemas/Demo" 404: description: "demo not found" 500: description: "problem getting a demo" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/demoId" summary: "Update a Demonstration setting" description: "Update a demonstration used on Tracetest as quick start examples." operationId: updateDemo requestBody: content: application/json: schema: $ref: "./config.yaml#/components/schemas/Demo" text/yaml: schema: $ref: "./config.yaml#/components/schemas/Demo" responses: 200: description: successful operation content: application/json: schema: $ref: "./config.yaml#/components/schemas/Demo" text/yaml: schema: $ref: "./config.yaml#/components/schemas/Demo" 400: description: "invalid demo, some data was sent in incorrect format." 404: description: "demo not found" 500: description: "problem updating a demo" delete: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/demoId" summary: "Delete a Demonstration setting" description: "Delete a demonstration used on Tracetest as quick start examples." operationId: deleteDemo responses: 204: description: successful operation 400: description: "invalid demo, some data was sent in incorrect format." 404: description: "demo not found" 500: description: "problem deleting a demo" # Data Stores /datastores/{dataStoreId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/dataStoreId" summary: "Get a Data Store" description: "Get a Data Store" operationId: getDataStore responses: 200: description: successful operation content: application/json: schema: $ref: "./dataStores.yaml#/components/schemas/DataStoreResource" 404: description: "data store not found" 500: description: "problem with getting a data store" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/dataStoreId" summary: "Update a Data Store" description: "Update a Data Store" operationId: updateDataStore requestBody: content: application/json: schema: $ref: "./dataStores.yaml#/components/schemas/DataStore" responses: 204: description: successful operation 400: description: "invalid data store, some data was sent in incorrect format." 500: description: "problem with updating data store" delete: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/dataStoreId" summary: "Delete a Data Store" description: "Delete a Data Store" operationId: deleteDataStore responses: "204": description: OK # Environments /environments: get: tags: - resource-api summary: "List environments" description: "List environments available in Tracetest." operationId: listEnvironments parameters: - $ref: "./parameters.yaml#/components/parameters/take" - $ref: "./parameters.yaml#/components/parameters/skip" - $ref: "./parameters.yaml#/components/parameters/switchableResourceSortBy" - $ref: "./parameters.yaml#/components/parameters/sortDirection" responses: 200: description: successful operation content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResourceList" text/yaml: schema: type: object properties: count: type: integer items: type: array items: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" 400: description: "invalid query for environments, some data was sent in incorrect format." 500: description: "problem listing environments" post: tags: - resource-api summary: "Create an environment" description: "Create an environment that can be used by tests and transactions" operationId: createEnvironment requestBody: content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" text/yaml: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" responses: 201: description: successful operation content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" text/yaml: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" 500: description: "problem creating an environment" /environments/{environmentId}: get: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/environmentId" summary: "Get a specific environment" description: "Get one environment by its id" operationId: getEnvironment responses: 200: description: successful operation content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" text/yaml: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" 404: description: "environment not found" 500: description: "problem getting an environment" put: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/environmentId" summary: "Update an environment" description: "Update an environment used on Tracetest" operationId: updateEnvironment requestBody: content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" text/yaml: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" responses: 200: description: successful operation content: application/json: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" text/yaml: schema: $ref: "./environments.yaml#/components/schemas/EnvironmentResource" 400: description: "invalid environment, some data was sent in incorrect format." 404: description: "environment not found" 500: description: "problem updating an environment" delete: tags: - resource-api parameters: - $ref: "./parameters.yaml#/components/parameters/environmentId" summary: "Delete an environment" description: "Delete an environment from Tracetest" operationId: deleteEnvironment responses: 204: description: successful operation 400: description: "invalid environment, some data was sent in incorrect format." 404: description: "environment not found" 500: description: "problem deleting an environment"