Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.1.0",
"info": {
"title": "Test Observer",
"description": "Test Observer API (see https://github.com/canonical/test_observer)",
"license": {
"name": "GNU Affero General Public License v3",
"url": "https://raw.githubusercontent.com/canonical/test_observer/refs/heads/main/backend/LICENSE"
},
"version": "0.1.0"
},
"paths": {
"/v1/version": {
"get": {
"summary": "Get Version",
"operationId": "get_version_v1_version_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/v1/test-executions/end-test": {
"put": {
"tags": [
"test-executions"
],
"summary": "End Test Execution",
"operationId": "end_test_execution_v1_test_executions_end_test_put",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EndTestExecutionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_test"
]
}
},
"/v1/test-executions/{id}/test-results": {
"get": {
"tags": [
"test-executions"
],
"summary": "Get Test Results",
"operationId": "get_test_results_v1_test_executions__id__test_results_get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestResultResponse"
},
"title": "Response Get Test Results V1 Test Executions Id Test Results Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"view_test"
]
},
"post": {
"tags": [
"test-executions"
],
"summary": "Post Results",
"operationId": "post_results_v1_test_executions__id__test_results_post",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestResultRequest"
},
"title": "Request"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_test"
]
}
},
"/v1/test-executions/{id}/links": {
"post": {
"tags": [
"test-executions"
],
"summary": "Post Link",
"operationId": "post_link_v1_test_executions__id__links_post",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestExecutionRelevantLinkCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestExecutionRelevantLinkResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_test"
]
}
},
"/v1/test-executions/{id}/links/{link_id}": {
"delete": {
"tags": [
"test-executions"
],
"summary": "Delete Link",
"operationId": "delete_link_v1_test_executions__id__links__link_id__delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
},
{
"name": "link_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Link Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_test"
]
}
},
"/v1/test-executions/reruns": {
"post": {
"tags": [
"test-executions"
],
"summary": "Create Rerun Requests",
"operationId": "create_rerun_requests_v1_test_executions_reruns_post",
"parameters": [
{
"name": "silent",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"description": "If true, omit returning created reruns in the response body. Speeds up bulk operations, as the rerun schema contains a lot of information and returning many reruns can be slow. Required when creating reruns with test_results_filters or test_executions_filters.",
"default": false,
"title": "Silent"
},
"description": "If true, omit returning created reruns in the response body. Speeds up bulk operations, as the rerun schema contains a lot of information and returning many reruns can be slow. Required when creating reruns with test_results_filters or test_executions_filters."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RerunRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/PendingRerun"
}
},
{
"type": "null"
}
],
"title": "Response Create Rerun Requests V1 Test Executions Reruns Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_rerun",
"change_rerun_bulk"
]
},
"get": {
"tags": [
"test-executions"
],
"summary": "Get Rerun Requests",
"operationId": "get_rerun_requests_v1_test_executions_reruns_get",
"parameters": [
{
"name": "family",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/FamilyName"
},
{
"type": "null"
}
],
"title": "Family"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Limit"
}
},
{
"name": "environment",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Environment"
}
},
{
"name": "environment_architecture",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Environment Architecture"
}
},
{
"name": "build_architecture",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Build Architecture"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PendingRerun"
},
"title": "Response Get Rerun Requests V1 Test Executions Reruns Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"view_rerun"
]
},
"delete": {
"tags": [
"test-executions"
],
"summary": "Delete Rerun Requests",
"operationId": "delete_rerun_requests_v1_test_executions_reruns_delete",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteReruns"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_rerun",
"change_rerun_bulk"
]
}
},
"/v1/test-executions/reruns/details": {
"get": {
"tags": [
"test-executions"
],
"summary": "Get Rerun Details",
"operationId": "get_rerun_details_v1_test_executions_reruns_details_get",
"parameters": [
{
"name": "family",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/FamilyName"
}
},
{
"name": "priority",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 1000000,
"minimum": -1000000
},
{
"type": "null"
}
],
"title": "Priority"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 50,
"minimum": 1,
"default": 50,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RerunDetailsResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"view_rerun"
]
}
},
"/v1/test-executions/{id}": {
"get": {
"tags": [
"test-executions"
],
"summary": "Get Test Execution",
"operationId": "get_test_execution_v1_test_executions__id__get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestExecutionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"view_test"
]
},
"patch": {
"tags": [
"test-executions"
],
"summary": "Patch Test Execution",
"operationId": "patch_test_execution_v1_test_executions__id__patch",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestExecutionsPatchRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestExecutionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"x-permissions": [
"change_test"
]
}
},
"/v1/test-executions": {
"get": {
"tags": [
"test-executions"
],
"summary": "Search Test Executions",
"description": "Search test executions with optional test result context.\n\nReturns one item per matching test execution with paginated results.\nThe test_results field contains all filtered test results for that execution.\n\nUse test_result=none to find executions without results,\ntest_result=any to find executions with results,\nor test_result={id} to filter by specific test result IDs.",
"operationId": "search_test_executions_v1_test_executions_get",
"parameters": [
{
"name": "families",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/FamilyName"
}
},
{
"type": "null"
}
],
"description": "Filter by artefact families (e.g., charm,snap)",
"title": "Families"
},
"description": "Filter by artefact families (e.g., charm,snap)"
},
{
"name": "artefacts",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by artefact names",
"title": "Artefacts"
},
"description": "Filter by artefact names"
},
{
"name": "artefact_versions",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by artefact versions",
"title": "Artefact Versions"
},
"description": "Filter by artefact versions"
},
{
"name": "artefact_stages",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by artefact stages",
"title": "Artefact Stages"
},
"description": "Filter by artefact stages"
},
{
"name": "artefact_tracks",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by artefact tracks",
"title": "Artefact Tracks"
},
"description": "Filter by artefact tracks"
},
{
"name": "artefact_is_archived",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Filter by whether the artefact is archived",
"title": "Artefact Is Archived"
},
"description": "Filter by whether the artefact is archived"
},
{
"name": "environments",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by environment names",
"title": "Environments"
},
"description": "Filter by environment names"
},
{
"name": "test_plans",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by test plan names",
"title": "Test Plans"
},
"description": "Filter by test plan names"
},
{
"name": "test_execution_statuses",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TestExecutionStatus"
}
},
{
"type": "null"
}
],
"description": "Filter by test execution statuses",
"title": "Test Execution Statuses"
},
"description": "Filter by test execution statuses"
},
{
"name": "reviewer_ids",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "array",
"items": {
"const": "any",
"type": "string"
}
},
{
"type": "array",
"items": {
"const": "none",
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by reviewer user ids",
"title": "Reviewer Ids"
},
"description": "Filter by reviewer user ids"
},
{
"name": "assignee_ids",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "array",
"items": {
"const": "any",
"type": "string"
}
},
{
"type": "array",
"items": {
"const": "none",
"type": "string"
}
},
{
"type": "null"
}
],
"description": "DEPRECATED: Use reviewer_ids instead",
"deprecated": true,
"title": "Assignee Ids"
},
"description": "DEPRECATED: Use reviewer_ids instead",
"deprecated": true
},
{
"name": "rerun_is_requested",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Filter by whether a rerun has been requested for the test execution",
"title": "Rerun Is Requested"
},
"description": "Filter by whether a rerun has been requested for the test execution"
},
{
"name": "execution_is_latest",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Filter by whether the test execution is the latest in its environment/artefact/test plan combination",
"title": "Execution Is Latest"
},
"description": "Filter by whether the test execution is the latest in its environment/artefact/test plan combination"
},
{
"name": "test_result",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "array",
"items": {
"const": "any",
"type": "string"
}
},
{
"type": "array",
"items": {
"const": "none",
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by test result presence: 'any' (executions with results), 'none' (executions without results), or specific test result ID(s)",
"title": "Test Result"
},
"description": "Filter by test result presence: 'any' (executions with results), 'none' (executions without results), or specific test result ID(s)"
},
{
"name": "event_names",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"const": "any",
"type": "string"
}
},
{
"type": "array",
"items": {
"const": "none",
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by event log: 'any' (executions with any events), 'none' (executions without events), or specific event name(s)",
"title": "Event Names"
},
"description": "Filter by event log: 'any' (executions with any events), 'none' (executions without events), or specific event name(s)"
},
{
"name": "from_date",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"description": "Filter executions updated on or after this datetime",
"title": "From Date"
},
"description": "Filter executions updated on or after this datetime"
},
{
"name": "until_date",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"description": "Filter executions updated on or before this datetime",
"title": "Until Date"
},
"description": "Filter executions updated on or before this datetime"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 1000,
"minimum": 0,
"description": "Maximum number of results to return",
"default": 50,
"title": "Limit"
},
"description": "Maximum number of results to return"
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"description": "Number of results to skip for pagination",
"default": 0,
"title": "Offset"
},
"description": "Number of results to skip for pagination"
},
{
"name": "execution_metadata",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter by execution metadata (base64 encoded category:value pairs).",
"title": "Execution Metadata"
},
"description": "Filter by execution metadata (base64 encoded category:value pairs)."
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
# --- truncated at 32 KB (277 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/canonical/refs/heads/main/openapi/canonical-test-observer-api-openapi.json