ploop/backend/openapi.json

960 lines
24 KiB
JSON

{
"components": {
"schemas": {
"ApiError": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"not_found",
"invalid_request",
"service_unavailable",
"internal_error"
],
"title": "Code",
"type": "string"
},
"field_errors": {
"items": {
"$ref": "#/components/schemas/FieldError"
},
"title": "Field Errors",
"type": "array"
},
"message": {
"title": "Message",
"type": "string"
},
"request_id": {
"title": "Request Id",
"type": "string"
}
},
"required": [
"code",
"message",
"request_id"
],
"title": "ApiError",
"type": "object"
},
"CapabilityRange": {
"additionalProperties": false,
"properties": {
"maximum": {
"title": "Maximum",
"type": "integer"
},
"minimum": {
"title": "Minimum",
"type": "integer"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name",
"minimum",
"maximum"
],
"title": "CapabilityRange",
"type": "object"
},
"DatasetDetail": {
"additionalProperties": false,
"properties": {
"case_count": {
"title": "Case Count",
"type": "integer"
},
"dataset_key": {
"title": "Dataset Key",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"language": {
"title": "Language",
"type": "string"
},
"manifest_digest": {
"title": "Manifest Digest",
"type": "string"
},
"public_artifacts": {
"items": {
"$ref": "#/components/schemas/PublicArtifactSummary"
},
"title": "Public Artifacts",
"type": "array"
},
"public_requests_digest": {
"title": "Public Requests Digest",
"type": "string"
},
"source_digest": {
"title": "Source Digest",
"type": "string"
}
},
"required": [
"id",
"dataset_key",
"language",
"case_count",
"source_digest",
"public_requests_digest",
"manifest_digest",
"public_artifacts"
],
"title": "DatasetDetail",
"type": "object"
},
"DatasetSummary": {
"additionalProperties": false,
"properties": {
"case_count": {
"title": "Case Count",
"type": "integer"
},
"dataset_key": {
"title": "Dataset Key",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"language": {
"title": "Language",
"type": "string"
},
"manifest_digest": {
"title": "Manifest Digest",
"type": "string"
},
"public_requests_digest": {
"title": "Public Requests Digest",
"type": "string"
},
"source_digest": {
"title": "Source Digest",
"type": "string"
}
},
"required": [
"id",
"dataset_key",
"language",
"case_count",
"source_digest",
"public_requests_digest",
"manifest_digest"
],
"title": "DatasetSummary",
"type": "object"
},
"FieldError": {
"additionalProperties": false,
"properties": {
"field": {
"title": "Field",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"field",
"message"
],
"title": "FieldError",
"type": "object"
},
"Health": {
"additionalProperties": false,
"properties": {
"status": {
"const": "ok",
"default": "ok",
"title": "Status",
"type": "string"
}
},
"title": "Health",
"type": "object"
},
"Meta": {
"additionalProperties": false,
"properties": {
"next_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next Cursor"
},
"total": {
"default": 0,
"title": "Total",
"type": "integer"
}
},
"title": "Meta",
"type": "object"
},
"PublicArtifactSummary": {
"additionalProperties": false,
"properties": {
"digest": {
"title": "Digest",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"role": {
"title": "Role",
"type": "string"
},
"size_bytes": {
"title": "Size Bytes",
"type": "integer"
}
},
"required": [
"id",
"role",
"digest",
"size_bytes"
],
"title": "PublicArtifactSummary",
"type": "object"
},
"RunSummary": {
"additionalProperties": false,
"properties": {
"dataset_version_id": {
"title": "Dataset Version Id",
"type": "string"
},
"failed_shard_count": {
"title": "Failed Shard Count",
"type": "integer"
},
"id": {
"title": "Id",
"type": "string"
},
"phase": {
"title": "Phase",
"type": "string"
},
"shard_count": {
"title": "Shard Count",
"type": "integer"
},
"status": {
"title": "Status",
"type": "string"
},
"sut_version_id": {
"title": "Sut Version Id",
"type": "string"
},
"terminal_shard_count": {
"title": "Terminal Shard Count",
"type": "integer"
}
},
"required": [
"id",
"dataset_version_id",
"sut_version_id",
"phase",
"status",
"shard_count",
"terminal_shard_count",
"failed_shard_count"
],
"title": "RunSummary",
"type": "object"
},
"SuccessResponse_DatasetDetail_": {
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/components/schemas/DatasetDetail"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[DatasetDetail]",
"type": "object"
},
"SuccessResponse_Health_": {
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/components/schemas/Health"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[Health]",
"type": "object"
},
"SuccessResponse_SutDetail_": {
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/components/schemas/SutDetail"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[SutDetail]",
"type": "object"
},
"SuccessResponse_list_DatasetSummary__": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/DatasetSummary"
},
"title": "Data",
"type": "array"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[list[DatasetSummary]]",
"type": "object"
},
"SuccessResponse_list_RunSummary__": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/RunSummary"
},
"title": "Data",
"type": "array"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[list[RunSummary]]",
"type": "object"
},
"SuccessResponse_list_SutSummary__": {
"additionalProperties": false,
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/SutSummary"
},
"title": "Data",
"type": "array"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data"
],
"title": "SuccessResponse[list[SutSummary]]",
"type": "object"
},
"SutDetail": {
"additionalProperties": false,
"properties": {
"adapter_key": {
"title": "Adapter Key",
"type": "string"
},
"capability_ranges": {
"items": {
"$ref": "#/components/schemas/CapabilityRange"
},
"title": "Capability Ranges",
"type": "array"
},
"id": {
"title": "Id",
"type": "string"
},
"max_batch_size": {
"title": "Max Batch Size",
"type": "integer"
},
"status": {
"title": "Status",
"type": "string"
},
"timeout_seconds": {
"title": "Timeout Seconds",
"type": "integer"
}
},
"required": [
"id",
"adapter_key",
"status",
"timeout_seconds",
"max_batch_size",
"capability_ranges"
],
"title": "SutDetail",
"type": "object"
},
"SutSummary": {
"additionalProperties": false,
"properties": {
"adapter_key": {
"title": "Adapter Key",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"status": {
"title": "Status",
"type": "string"
}
},
"required": [
"id",
"adapter_key",
"status"
],
"title": "SutSummary",
"type": "object"
}
}
},
"info": {
"title": "PLoop API",
"version": "0.1.0"
},
"openapi": "3.1.0",
"paths": {
"/api/v1/datasets": {
"get": {
"operationId": "list_datasets_api_v1_datasets_get",
"parameters": [
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 25,
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cursor"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_list_DatasetSummary__"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "List Datasets",
"tags": [
"datasets"
]
}
},
"/api/v1/datasets/{dataset_version_id}": {
"get": {
"operationId": "get_dataset_api_v1_datasets__dataset_version_id__get",
"parameters": [
{
"in": "path",
"name": "dataset_version_id",
"required": true,
"schema": {
"minLength": 1,
"pattern": "^[^\\s/\\\\\\x00-\\x1f\\x7f]+$",
"title": "Dataset Version Id",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_DatasetDetail_"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "Get Dataset",
"tags": [
"datasets"
]
}
},
"/api/v1/runs": {
"get": {
"operationId": "list_runs_api_v1_runs_get",
"parameters": [
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 25,
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cursor"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_list_RunSummary__"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "List Runs",
"tags": [
"runs"
]
}
},
"/api/v1/suts": {
"get": {
"operationId": "list_suts_api_v1_suts_get",
"parameters": [
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 25,
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cursor"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_list_SutSummary__"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "List Suts",
"tags": [
"suts"
]
}
},
"/api/v1/suts/{sut_version_id}": {
"get": {
"operationId": "get_sut_api_v1_suts__sut_version_id__get",
"parameters": [
{
"in": "path",
"name": "sut_version_id",
"required": true,
"schema": {
"minLength": 1,
"pattern": "^[^\\s/\\\\\\x00-\\x1f\\x7f]+$",
"title": "Sut Version Id",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_SutDetail_"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "Get Sut",
"tags": [
"suts"
]
}
},
"/health": {
"get": {
"operationId": "health_health_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse_Health_"
}
}
},
"description": "Successful Response"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Not Found"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Unprocessable Entity"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Internal Server Error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"description": "Service Unavailable"
}
},
"summary": "Health",
"tags": [
"health"
]
}
}
}
}