diff --git a/generate/swagger.json b/generate/swagger.json index 56ff826..48f8e91 100644 --- a/generate/swagger.json +++ b/generate/swagger.json @@ -1,6 +1,36 @@ { "basePath": "/api/v2", "definitions": { + "CapturePointDiffSummary": { + "properties": { + "additions": { + "type": "integer" + }, + "capturedBy": { + "$ref": "#/definitions/trafficmodels.By" + }, + "captures": { + "type": "integer" + }, + "maxRelevance": { + "description": "MaxRelevance indicates a score in 0..1 of the maximally relevant diff\noperation, or 1.0 if either the baseline or target are missing.", + "type": "number" + }, + "removals": { + "type": "integer" + }, + "replacements": { + "type": "integer" + }, + "top": { + "items": { + "$ref": "#/definitions/TrafficDiffPairedDiff" + }, + "type": "array" + } + }, + "type": "object" + }, "Cluster": { "properties": { "createdAt": { @@ -54,6 +84,30 @@ }, "type": "object" }, + "DiffOp": { + "properties": { + "classification": { + "$ref": "#/definitions/DiffOpClassification" + }, + "oldValue": {}, + "op": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": {} + }, + "type": "object" + }, + "DiffOpClassification": { + "properties": { + "noise": { + "type": "number" + } + }, + "type": "object" + }, "EmptyResponse": { "type": "object" }, @@ -157,6 +211,23 @@ }, "type": "object" }, + "RequestDiff": { + "properties": { + "baseline": { + "$ref": "#/definitions/capture.Request" + }, + "diffOps": { + "items": { + "$ref": "#/definitions/DiffOp" + }, + "type": "array" + }, + "target": { + "$ref": "#/definitions/capture.Request" + } + }, + "type": "object" + }, "ResourceInfo": { "properties": { "cluster": { @@ -197,6 +268,23 @@ }, "type": "object" }, + "ResponseDiff": { + "properties": { + "baseline": { + "$ref": "#/definitions/capture.Response" + }, + "diffOps": { + "items": { + "$ref": "#/definitions/DiffOp" + }, + "type": "array" + }, + "target": { + "$ref": "#/definitions/capture.Response" + } + }, + "type": "object" + }, "RouteGroup": { "properties": { "createdAt": { @@ -263,944 +351,932 @@ }, "type": "object" }, - "cluster.Operator": { + "Test": { "properties": { - "version": { - "description": "The operator version of the cluster. This may be\nnil if the cluster has not yet connected to Signadot.", + "createdAt": { + "type": "string" + }, + "name": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/TestSpec" + }, + "status": { + "$ref": "#/definitions/TestStatus" + }, + "updatedAt": { "type": "string" } }, "type": "object" }, - "defaults.CompositeDefaults": { - "properties": { - "cluster": { - "items": { - "$ref": "#/definitions/defaults.Default" - }, - "type": "array" - } - }, - "type": "object" - }, - "defaults.Default": { + "TestExecution": { "properties": { - "class": { + "canceledAt": { "type": "string" }, "createdAt": { "type": "string" }, - "resourceKind": { + "name": { "type": "string" }, - "updatedAt": { - "type": "string" + "results": { + "$ref": "#/definitions/TestExecutionResults" }, - "value": {} + "spec": { + "$ref": "#/definitions/TestExecutionSpec" + }, + "status": { + "$ref": "#/definitions/TestExecutionStatus" + } }, "type": "object" }, - "job.EnvItem": { + "TestExecutionAutoDiff": { "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" + "enabled": { + "description": "Enabled = true, requires the definition of a valid routing context", + "type": "boolean" } }, "type": "object" }, - "job.RoutingContext": { + "TestExecutionCanceledState": { "properties": { - "routegroup": { + "canceledBy": { "type": "string" }, - "sandbox": { + "message": { "type": "string" } }, "type": "object" }, - "job.Spec": { + "TestExecutionContext": { "properties": { - "command": { - "items": { - "type": "string" - }, - "type": "array" - }, - "env": { - "items": { - "$ref": "#/definitions/job.EnvItem" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" + "autoDiff": { + "$ref": "#/definitions/TestExecutionAutoDiff" }, - "namePrefix": { + "cluster": { "type": "string" }, - "routingContext": { + "routing": { "$ref": "#/definitions/job.RoutingContext" - }, - "runnerGroup": { - "type": "string" - }, - "script": { - "type": "string" - }, - "trafficManager": { - "$ref": "#/definitions/job.TrafficManager" - }, - "uploadArtifact": { - "items": { - "$ref": "#/definitions/job.UploadArtifact" - }, - "type": "array" } }, "type": "object" }, - "job.TrafficManager": { + "TestExecutionFailedState": { "properties": { - "injectRoutingKey": { - "description": "InjectRoutingKey indicates if the system should perform automatic\ninjection of routing key headers or not. It may be the empty string,\n\"auto\" or \"disabled\". The empty string defaults to meaning \"disabled\".", - "enum": [ - "disabled", - "auto" - ], + "message": { "type": "string" } }, "type": "object" }, - "job.UploadArtifact": { + "TestExecutionResults": { "properties": { - "meta": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "path": { - "type": "string" + "trafficDiff": { + "$ref": "#/definitions/TrafficDiff" } }, "type": "object" }, - "jobRunnerGroup.AutoScaling": { + "TestExecutionSpec": { "properties": { - "maxPods": { - "type": "integer" + "executionContext": { + "$ref": "#/definitions/TestExecutionContext" }, - "minPods": { - "type": "integer" + "test": { + "type": "string" } }, "type": "object" }, - "jobRunnerGroup.ExecutionsStatus": { + "TestExecutionState": { "properties": { - "queued": { - "type": "integer" + "canceled": { + "$ref": "#/definitions/TestExecutionCanceledState" }, - "running": { - "type": "integer" + "failed": { + "$ref": "#/definitions/TestExecutionFailedState" } }, "type": "object" }, - "jobRunnerGroup.ManualScaling": { + "TestExecutionStatus": { "properties": { - "desiredPods": { - "type": "integer" + "baselineJob": { + "type": "string" + }, + "finalState": { + "$ref": "#/definitions/TestExecutionState" + }, + "phase": { + "type": "string" + }, + "targetJob": { + "type": "string" + }, + "triggeredBy": { + "$ref": "#/definitions/TestExecutionTriggeredBy" } }, "type": "object" }, - "jobRunnerGroup.PodsStatus": { + "TestExecutionTemplate": { "properties": { - "idle": { - "type": "integer" - }, - "notReady": { - "type": "integer" + "autoDiff": { + "$ref": "#/definitions/TestExecutionAutoDiff" }, - "ready": { - "type": "integer" + "cluster": { + "type": "string" } }, "type": "object" }, - "jobRunnerGroup.Scaling": { + "TestExecutionTriggeredBy": { "properties": { - "auto": { - "$ref": "#/definitions/jobRunnerGroup.AutoScaling" + "sandbox": { + "type": "string" }, - "manual": { - "$ref": "#/definitions/jobRunnerGroup.ManualScaling" + "triggerID": { + "type": "string" } }, "type": "object" }, - "jobRunnerGroup.Spec": { + "TestSpec": { "properties": { - "cluster": { - "type": "string" - }, - "image": { - "type": "string" - }, - "jobTimeout": { - "description": "JobTimeout specifies the max job execution time\nof jobs running with this RunnerGroup. If not\nspecified, it defaults to 30 minutes (\"30m\")", + "script": { "type": "string" }, - "labels": { - "additionalProperties": { - "type": "string" + "triggers": { + "items": { + "$ref": "#/definitions/TestTrigger" }, - "type": "object" - }, - "namespace": { - "type": "string" - }, - "podTemplate": {}, - "scaling": { - "$ref": "#/definitions/jobRunnerGroup.Scaling" + "type": "array" } }, "type": "object" }, - "jobRunnerGroup.Status": { + "TestStatus": { + "type": "object" + }, + "TestTrigger": { "properties": { - "executions": { - "$ref": "#/definitions/jobRunnerGroup.ExecutionsStatus" + "executionTemplate": { + "$ref": "#/definitions/TestExecutionTemplate" }, - "pods": { - "$ref": "#/definitions/jobRunnerGroup.PodsStatus" + "id": { + "type": "string" + }, + "sandboxOf": { + "$ref": "#/definitions/sandbox.ForkOf" } }, "type": "object" }, - "jobs.Attempt": { + "TrafficDiff": { "properties": { - "createdAt": { - "type": "string" - }, - "executionCount": { + "additions": { "type": "integer" }, - "finishedAt": { - "type": "string" + "capturePoints": { + "type": "integer" }, - "id": { + "captures": { "type": "integer" }, - "phase": { - "type": "string" + "green": { + "items": { + "$ref": "#/definitions/CapturePointDiffSummary" + }, + "type": "array" }, - "startedAt": { - "type": "string" + "maxRelevance": { + "description": "MaxRelevance indicates a score in 0..1 of the maximally relevant\ndiff of captures.", + "type": "number" }, - "state": { - "$ref": "#/definitions/jobs.State" - } - }, - "type": "object" - }, - "jobs.CanceledState": { - "properties": { - "canceledAt": { - "type": "string" + "red": { + "items": { + "$ref": "#/definitions/CapturePointDiffSummary" + }, + "type": "array" }, - "canceledBy": { - "type": "string" + "removals": { + "type": "integer" }, - "inCluster": { - "type": "boolean" + "replacements": { + "type": "integer" }, - "message": { - "type": "string" + "yellow": { + "items": { + "$ref": "#/definitions/CapturePointDiffSummary" + }, + "type": "array" } }, "type": "object" }, - "jobs.FailedState": { + "TrafficDiffPairedDiff": { "properties": { - "exitCode": { - "type": "integer", - "x-nullable": true + "request": { + "$ref": "#/definitions/RequestDiff" }, - "message": { - "type": "string" + "response": { + "$ref": "#/definitions/ResponseDiff" + } + }, + "type": "object" + }, + "TrafficDiffPointResult": { + "properties": { + "by": { + "$ref": "#/definitions/trafficmodels.By" }, - "retryAttempt": { - "type": "boolean" + "diffs": { + "items": { + "$ref": "#/definitions/TrafficDiffPairedDiff" + }, + "type": "array" } }, "type": "object" }, - "jobs.QueuedState": { + "TrafficDiffResult": { "properties": { - "lastMessage": { + "baseline": { "type": "string" }, - "message": { + "results": { + "items": { + "$ref": "#/definitions/TrafficDiffPointResult" + }, + "type": "array" + }, + "target": { "type": "string" } }, "type": "object" }, - "jobs.RunningState": { + "capture.Message": { "properties": { - "podName": { + "body": {}, + "finishedAt": { "type": "string" }, - "podNamespace": { + "headers": { + "$ref": "#/definitions/capture.Values" + }, + "startedAt": { "type": "string" } }, "type": "object" }, - "jobs.State": { + "capture.Request": { "properties": { - "canceled": { - "$ref": "#/definitions/jobs.CanceledState" + "host": { + "type": "string" }, - "failed": { - "$ref": "#/definitions/jobs.FailedState" + "message": { + "$ref": "#/definitions/capture.Message" }, - "queued": { - "$ref": "#/definitions/jobs.QueuedState" + "method": { + "type": "string" }, - "running": { - "$ref": "#/definitions/jobs.RunningState" + "proto": { + "type": "string" }, - "succeeded": { - "$ref": "#/definitions/jobs.SucceededState" + "query": { + "$ref": "#/definitions/capture.Values" + }, + "uri": { + "type": "string" } }, "type": "object" }, - "jobs.Status": { + "capture.Response": { "properties": { - "attempts": { - "items": { - "$ref": "#/definitions/jobs.Attempt" - }, - "type": "array" + "error": { + "type": "string" }, - "runnerGroupDeletionCompletedAt": { + "message": { + "$ref": "#/definitions/capture.Message" + }, + "proto": { "type": "string" + }, + "statusCode": { + "type": "integer" } }, "type": "object" }, - "jobs.SucceededState": { + "capture.Values": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "cluster.Operator": { "properties": { - "exitCode": { - "type": "integer" + "version": { + "description": "The operator version of the cluster. This may be\nnil if the cluster has not yet connected to Signadot.", + "type": "string" } }, "type": "object" }, - "local": { + "defaults.CompositeDefaults": { "properties": { - "from": { - "$ref": "#/definitions/local.From" - }, - "mappings": { + "cluster": { "items": { - "$ref": "#/definitions/local.PortMapping" + "$ref": "#/definitions/defaults.Default" }, "type": "array" - }, - "name": { - "type": "string" } }, "type": "object" }, - "local.From": { + "defaults.Default": { "properties": { - "kind": { - "description": "Kind of entity that we want to route to. One of (Service or Deployment or Rollout).", - "example": "Deployment", + "class": { "type": "string" }, - "name": { - "description": "Name of the entity within the Kubernetes cluster.", - "example": "my-frontend", + "createdAt": { "type": "string" }, - "namespace": { - "description": "Namespace within which the entity lives in the Kubernetes cluster.", - "example": "default", + "resourceKind": { "type": "string" - } + }, + "updatedAt": { + "type": "string" + }, + "value": {} }, - "required": [ - "kind", - "name", - "namespace" - ], "type": "object" }, - "local.PortMapping": { + "job.EnvItem": { "properties": { - "port": { - "type": "integer" + "name": { + "type": "string" }, - "toLocal": { + "value": { "type": "string" } }, "type": "object" }, - "resourceplugin.Runner": { + "job.RoutingContext": { "properties": { - "image": { - "description": "Image for the runner instance", - "type": "string" - }, - "namespace": { - "description": "Namespace to create this runner instance in", + "routegroup": { "type": "string" }, - "podTemplateOverlay": { - "description": "Pod template overlay", + "sandbox": { "type": "string" } }, "type": "object" }, - "resourceplugin.Spec": { + "job.Spec": { "properties": { - "create": { - "description": "Create refers to the `create` steps for spinning up the resource", + "command": { "items": { - "$ref": "#/definitions/resourceplugin.Step" + "type": "string" }, "type": "array" }, - "delete": { - "description": "Delete refers to the `delete` steps for spinning up the resource", + "env": { "items": { - "$ref": "#/definitions/resourceplugin.Step" + "$ref": "#/definitions/job.EnvItem" }, "type": "array" }, - "description": { - "description": "Description for the resource", + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "namePrefix": { "type": "string" }, - "runner": { - "$ref": "#/definitions/resourceplugin.Runner" + "routingContext": { + "$ref": "#/definitions/job.RoutingContext" + }, + "runnerGroup": { + "type": "string" + }, + "script": { + "type": "string" + }, + "trafficManager": { + "$ref": "#/definitions/job.TrafficManager" + }, + "uploadArtifact": { + "items": { + "$ref": "#/definitions/job.UploadArtifact" + }, + "type": "array" } }, "type": "object" }, - "resourceplugin.Status": { + "job.TrafficManager": { "properties": { - "resources": { - "description": "Resources created using the resource plugin", - "items": { - "$ref": "#/definitions/ResourceInfo" - }, - "type": "array" + "injectRoutingKey": { + "description": "InjectRoutingKey indicates if the system should perform automatic\ninjection of routing key headers or not. It may be the empty string,\n\"auto\" or \"disabled\". The empty string defaults to meaning \"disabled\".", + "enum": [ + "disabled", + "auto" + ], + "type": "string" } }, "type": "object" }, - "resourceplugin.Step": { + "job.UploadArtifact": { "properties": { - "inputs": { - "description": "Inputs for the step", - "items": { - "$ref": "#/definitions/resourceplugin.StepInput" - }, - "type": "array" - }, - "name": { - "description": "Name for the step", - "type": "string" - }, - "outputs": { - "description": "Outputs for the step", - "items": { - "$ref": "#/definitions/resourceplugin.StepOut" + "meta": { + "additionalProperties": { + "type": "string" }, - "type": "array" + "type": "object" }, - "script": { - "description": "Script to execute in the step", + "path": { "type": "string" } }, "type": "object" }, - "resourceplugin.StepInput": { + "jobRunnerGroup.AutoScaling": { "properties": { - "as": { - "$ref": "#/definitions/resourceplugin.StepInputTo" - }, - "name": { - "description": "Name for the input", - "type": "string" - }, - "type": { - "description": "Type of input", - "type": "string" - }, - "valueFromSandbox": { - "description": "ValueFromSandbox defines whether or not to source value from the sandbox spec", - "type": "boolean" + "maxPods": { + "type": "integer" }, - "valueFromStep": { - "$ref": "#/definitions/resourceplugin.ValueFromStep" + "minPods": { + "type": "integer" } }, "type": "object" }, - "resourceplugin.StepInputTo": { + "jobRunnerGroup.ExecutionsStatus": { "properties": { - "env": { - "description": "Inject the input as an env variable with name Env inside the\nmain container", - "type": "string" + "queued": { + "type": "integer" }, - "path": { - "description": "Expose the input as a file at Path inside the main container", - "type": "string" + "running": { + "type": "integer" } }, "type": "object" }, - "resourceplugin.StepOut": { + "jobRunnerGroup.ManualScaling": { "properties": { - "description": { - "description": "Description for the output", - "type": "string" - }, - "name": { - "description": "Name of the output variable", - "type": "string" + "desiredPods": { + "type": "integer" + } + }, + "type": "object" + }, + "jobRunnerGroup.PodsStatus": { + "properties": { + "idle": { + "type": "integer" }, - "type": { - "description": "Type of output", - "type": "string" + "notReady": { + "type": "integer" }, - "valueFromPath": { - "description": "Path within the main container from where the output will be read", - "type": "string" + "ready": { + "type": "integer" } }, "type": "object" }, - "resourceplugin.ValueFromStep": { + "jobRunnerGroup.Scaling": { "properties": { - "name": { - "description": "Name of the step", - "type": "string" + "auto": { + "$ref": "#/definitions/jobRunnerGroup.AutoScaling" }, - "output": { - "description": "Name of the variable from the step", - "type": "string" + "manual": { + "$ref": "#/definitions/jobRunnerGroup.ManualScaling" } }, "type": "object" }, - "routeGroup.Endpoint": { + "jobRunnerGroup.Spec": { "properties": { - "name": { + "cluster": { "type": "string" }, - "target": { + "image": { "type": "string" }, - "url": { + "jobTimeout": { + "description": "JobTimeout specifies the max job execution time\nof jobs running with this RunnerGroup. If not\nspecified, it defaults to 30 minutes (\"30m\")", "type": "string" - } - }, - "type": "object" - }, - "routeGroup.Match": { - "properties": { - "all": { - "description": "When All is non-nil, T matches a set of labels if and only if every element of All matches them.\nOnly one field may be non-nil.", - "items": { - "$ref": "#/definitions/routeGroup.Match" - }, - "type": "array", - "x-omitempty": true }, - "any": { - "description": "When Any is non-nil, T matches a set of labels if and only if some element of Any matches them.\nOnly one field may be non-nil.", - "items": { - "$ref": "#/definitions/routeGroup.Match" + "labels": { + "additionalProperties": { + "type": "string" }, - "type": "array", - "x-omitempty": true + "type": "object" }, - "label": { - "$ref": "#/definitions/routeGroup.MatchLabel" + "namespace": { + "type": "string" + }, + "podTemplate": {}, + "scaling": { + "$ref": "#/definitions/jobRunnerGroup.Scaling" } }, "type": "object" }, - "routeGroup.MatchLabel": { + "jobRunnerGroup.Status": { "properties": { - "key": { - "description": "Key is an exact match on a label key, glob\ncharacters are just considered normal characters.", - "type": "string" + "executions": { + "$ref": "#/definitions/jobRunnerGroup.ExecutionsStatus" }, - "value": { - "description": "Value is a glob match for the value of a\nsandbox label. See https://pkg.go.dev/path/filepath#Match\nfor the file glob syntax.", - "type": "string" + "pods": { + "$ref": "#/definitions/jobRunnerGroup.PodsStatus" } }, "type": "object" }, - "routeGroup.Spec": { + "jobs.Attempt": { "properties": { - "cluster": { - "description": "Cluster gives the cluster to which the route group applies.", + "createdAt": { "type": "string" }, - "description": { - "description": "Description provides a short description of the route group.", + "executionCount": { + "type": "integer" + }, + "finishedAt": { "type": "string" }, - "endpoints": { - "description": "Endpoints define endpoints which target different in-cluster\nservices.", - "items": { - "$ref": "#/definitions/routeGroup.SpecEndpoint" - }, - "type": "array" + "id": { + "type": "integer" }, - "match": { - "$ref": "#/definitions/routeGroup.Match" + "phase": { + "type": "string" }, - "ttl": { - "$ref": "#/definitions/routeGroup.TTL" + "startedAt": { + "type": "string" + }, + "state": { + "$ref": "#/definitions/jobs.State" } }, "type": "object" }, - "routeGroup.SpecEndpoint": { + "jobs.CanceledState": { "properties": { - "name": { + "canceledAt": { "type": "string" }, - "target": { + "canceledBy": { + "type": "string" + }, + "inCluster": { + "type": "boolean" + }, + "message": { "type": "string" } }, "type": "object" }, - "routeGroup.Status": { + "jobs.FailedState": { "properties": { - "matchedSandboxes": { - "description": "MatchedSandboxes gives the list of sandboxes whose labels\nwere matched by the 'match' object in the spec.", - "items": { - "type": "string" - }, - "type": "array" + "exitCode": { + "type": "integer", + "x-nullable": true }, "message": { - "description": "Message is a human readable explanation of why\nthe sandbox is healthy or not.", "type": "string" }, - "ready": { - "description": "Ready indicates whether the sandbox is ready,\nmeaning that it can be used for testing.", + "retryAttempt": { "type": "boolean" - }, - "reason": { - "description": "Reason is a machine readable explanation of why\nthe sandbox is healthy or not.", - "type": "string" - }, - "scheduledDeleteTime": { - "description": "ScheduledDeleteTime returns the formatted and computed ttl based on the Duration\nand OffsetFrom", - "type": "string" } }, "type": "object" }, - "routeGroup.TTL": { + "jobs.QueuedState": { "properties": { - "duration": { - "description": "Duration represents the duration until routegroup's end of life.\nIt should be an unsigned integer not exceeding 32 bits followed by\na units character, which can be one of the following.\n - 'm' for minutes\n - 'h' for hours\n - 'd' for days\n - 'w' for weeks", + "lastMessage": { "type": "string" }, - "offsetFrom": { - "description": "OffsetFrom indicates what the Duration is relative to. It\nmay be the empty string, \"noMatchedSandboxes\", \"createdAt\" or \"updatedAt\". The empty string\ndefaults to meaning \"noMatchedSandboxes\".", + "message": { "type": "string" } }, "type": "object" }, - "sandbox.CustomPatch": { + "jobs.RunningState": { "properties": { - "type": { + "podName": { "type": "string" }, - "value": { + "podNamespace": { "type": "string" } }, "type": "object" }, - "sandbox.Customizations": { + "jobs.State": { "properties": { - "env": { - "description": "Environment variable modifications that will be applied to the forked workload", - "items": { - "$ref": "#/definitions/sandbox.EnvVar" - }, - "type": "array" + "canceled": { + "$ref": "#/definitions/jobs.CanceledState" }, - "images": { - "description": "One or more docker images that will be applied to the forked workload", - "items": { - "$ref": "#/definitions/sandbox.Image" - }, - "type": "array" + "failed": { + "$ref": "#/definitions/jobs.FailedState" }, - "patch": { - "$ref": "#/definitions/sandbox.CustomPatch" + "queued": { + "$ref": "#/definitions/jobs.QueuedState" + }, + "running": { + "$ref": "#/definitions/jobs.RunningState" + }, + "succeeded": { + "$ref": "#/definitions/jobs.SucceededState" } }, "type": "object" }, - "sandbox.DefaultRouteGroup": { + "jobs.Status": { "properties": { - "endpoints": { + "attempts": { "items": { - "$ref": "#/definitions/routeGroup.SpecEndpoint" + "$ref": "#/definitions/jobs.Attempt" }, "type": "array" - } - }, - "type": "object" - }, - "sandbox.Endpoint": { - "properties": { - "baselineUrl": { - "type": "string" - }, - "host": { - "type": "string" - }, - "name": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "protocol": { - "type": "string" - }, - "routeType": { - "type": "string" - }, - "target": { - "type": "string" }, - "url": { + "runnerGroupDeletionCompletedAt": { "type": "string" } }, "type": "object" }, - "sandbox.EnvValueFrom": { + "jobs.SucceededState": { "properties": { - "fork": { - "$ref": "#/definitions/sandbox.EnvValueFromFork" - }, - "resource": { - "$ref": "#/definitions/sandbox.EnvValueFromResource" + "exitCode": { + "type": "integer" } }, "type": "object" }, - "sandbox.EnvValueFromFork": { + "resourceplugin.Runner": { "properties": { - "expression": { + "image": { + "description": "Image for the runner instance", "type": "string" }, - "forkOf": { - "$ref": "#/definitions/sandbox.ForkOf" + "namespace": { + "description": "Namespace to create this runner instance in", + "type": "string" + }, + "podTemplateOverlay": { + "description": "Pod template overlay", + "type": "string" } }, "type": "object" }, - "sandbox.EnvValueFromResource": { + "resourceplugin.Spec": { "properties": { - "name": { - "type": "string" + "create": { + "description": "Create refers to the `create` steps for spinning up the resource", + "items": { + "$ref": "#/definitions/resourceplugin.Step" + }, + "type": "array" }, - "outputKey": { + "delete": { + "description": "Delete refers to the `delete` steps for spinning up the resource", + "items": { + "$ref": "#/definitions/resourceplugin.Step" + }, + "type": "array" + }, + "description": { + "description": "Description for the resource", "type": "string" + }, + "runner": { + "$ref": "#/definitions/resourceplugin.Runner" } }, "type": "object" }, - "sandbox.EnvVar": { + "resourceplugin.Status": { "properties": { - "container": { - "description": "name of container to which it applies", - "type": "string" + "resources": { + "description": "Resources created using the resource plugin", + "items": { + "$ref": "#/definitions/ResourceInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "resourceplugin.Step": { + "properties": { + "inputs": { + "description": "Inputs for the step", + "items": { + "$ref": "#/definitions/resourceplugin.StepInput" + }, + "type": "array" }, "name": { - "description": "environmental variable name", + "description": "Name for the step", "type": "string" }, - "operation": { - "description": "upsert or delete", - "type": "string" + "outputs": { + "description": "Outputs for the step", + "items": { + "$ref": "#/definitions/resourceplugin.StepOut" + }, + "type": "array" }, - "value": { - "description": "environmental variable value", + "script": { + "description": "Script to execute in the step", "type": "string" - }, - "valueFrom": { - "$ref": "#/definitions/sandbox.EnvValueFrom" } }, "type": "object" }, - "sandbox.Fork": { + "resourceplugin.StepInput": { "properties": { - "customizations": { - "$ref": "#/definitions/sandbox.Customizations" + "as": { + "$ref": "#/definitions/resourceplugin.StepInputTo" }, - "endpoints": { - "description": "Deprecated. Use defaultRouteGroup.Endpoints instead.", - "items": { - "$ref": "#/definitions/sandbox.ForkEndpoint" - }, - "type": "array", - "x-omitempty": "true" + "name": { + "description": "Name for the input", + "type": "string" }, - "forkOf": { - "$ref": "#/definitions/sandbox.ForkOf" + "type": { + "description": "Type of input", + "type": "string" + }, + "valueFromSandbox": { + "description": "ValueFromSandbox defines whether or not to source value from the sandbox spec", + "type": "boolean" + }, + "valueFromStep": { + "$ref": "#/definitions/resourceplugin.ValueFromStep" } }, "type": "object" }, - "sandbox.ForkEndpoint": { + "resourceplugin.StepInputTo": { "properties": { - "name": { - "description": "Name of the endpoint", + "env": { + "description": "Inject the input as an env variable with name Env inside the\nmain container", "type": "string" }, - "port": { - "description": "Port it will map to on the forked workload", - "type": "integer" - }, - "protocol": { - "description": "Protocol that this endpoint uses", + "path": { + "description": "Expose the input as a file at Path inside the main container", "type": "string" } }, "type": "object" }, - "sandbox.ForkOf": { + "resourceplugin.StepOut": { "properties": { - "kind": { - "description": "Kind of entity that we want to route to. One of (Service or Deployment or Rollout).", - "example": "Deployment", + "description": { + "description": "Description for the output", "type": "string" }, "name": { - "description": "Name of the entity within the Kubernetes cluster.", - "example": "my-frontend", + "description": "Name of the output variable", "type": "string" }, - "namespace": { - "description": "Namespace within which the entity lives in the Kubernetes cluster.", - "example": "default", + "type": { + "description": "Type of output", + "type": "string" + }, + "valueFromPath": { + "description": "Path within the main container from where the output will be read", "type": "string" } }, - "required": [ - "kind", - "name", - "namespace" - ], "type": "object" }, - "sandbox.HostEndpoint": { + "resourceplugin.ValueFromStep": { "properties": { - "host": { - "description": "Hostname that this endpoint points to", + "name": { + "description": "Name of the step", "type": "string" }, + "output": { + "description": "Name of the variable from the step", + "type": "string" + } + }, + "type": "object" + }, + "routeGroup.Endpoint": { + "properties": { "name": { - "description": "Name of the endpoint", "type": "string" }, - "port": { - "description": "Port it will map to on the specified host", - "type": "integer" + "target": { + "type": "string" }, - "protocol": { - "description": "Protocol that this endpoint uses", + "url": { "type": "string" } }, "type": "object" }, - "sandbox.Image": { + "routeGroup.Match": { "properties": { - "container": { - "description": "Container is the container this image must apply to in the forked workload", + "all": { + "description": "When All is non-nil, T matches a set of labels if and only if every element of All matches them.\nOnly one field may be non-nil.", + "items": { + "$ref": "#/definitions/routeGroup.Match" + }, + "type": "array", + "x-omitempty": true + }, + "any": { + "description": "When Any is non-nil, T matches a set of labels if and only if some element of Any matches them.\nOnly one field may be non-nil.", + "items": { + "$ref": "#/definitions/routeGroup.Match" + }, + "type": "array", + "x-omitempty": true + }, + "label": { + "$ref": "#/definitions/routeGroup.MatchLabel" + } + }, + "type": "object" + }, + "routeGroup.MatchLabel": { + "properties": { + "key": { + "description": "Key is an exact match on a label key, glob\ncharacters are just considered normal characters.", "type": "string" }, - "image": { - "description": "Name of the image (e.g. gcr.io/my-image/repo:my-tag)", + "value": { + "description": "Value is a glob match for the value of a\nsandbox label. See https://pkg.go.dev/path/filepath#Match\nfor the file glob syntax.", "type": "string" } }, "type": "object" }, - "sandbox.LocalWorkloadStatus": { + "routeGroup.Spec": { "properties": { - "name": { + "cluster": { + "description": "Cluster gives the cluster to which the route group applies.", "type": "string" }, - "tunnel": { - "properties": { - "health": { - "properties": { - "connected": { - "type": "boolean" - }, - "lastCheckTime": { - "type": "string" - }, - "lastConnectedTime": { - "type": "string" - } - }, - "type": "object" - } + "description": { + "description": "Description provides a short description of the route group.", + "type": "string" + }, + "endpoints": { + "description": "Endpoints define endpoints which target different in-cluster\nservices.", + "items": { + "$ref": "#/definitions/routeGroup.SpecEndpoint" }, - "type": "object" + "type": "array" + }, + "match": { + "$ref": "#/definitions/routeGroup.Match" + }, + "ttl": { + "$ref": "#/definitions/routeGroup.TTL" } }, "type": "object" }, - "sandbox.Readiness": { + "routeGroup.SpecEndpoint": { "properties": { - "local": { + "name": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "type": "object" + }, + "routeGroup.Status": { + "properties": { + "matchedSandboxes": { + "description": "MatchedSandboxes gives the list of sandboxes whose labels\nwere matched by the 'match' object in the spec.", "items": { - "$ref": "#/definitions/sandbox.LocalWorkloadStatus" + "type": "string" }, "type": "array" }, @@ -1223,115 +1299,1042 @@ }, "type": "object" }, - "sandbox.Resource": { + "routeGroup.TTL": { "properties": { - "name": { + "duration": { + "description": "Duration represents the duration until routegroup's end of life.\nIt should be an unsigned integer not exceeding 32 bits followed by\na units character, which can be one of the following.\n - 'm' for minutes\n - 'h' for hours\n - 'd' for days\n - 'w' for weeks", "type": "string" }, - "params": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "plugin": { + "offsetFrom": { + "description": "OffsetFrom indicates what the Duration is relative to. It\nmay be the empty string, \"noMatchedSandboxes\", \"createdAt\" or \"updatedAt\". The empty string\ndefaults to meaning \"noMatchedSandboxes\".", "type": "string" } }, "type": "object" }, - "sandbox.Spec": { + "sandbox.CustomPatch": { "properties": { - "cluster": { - "description": "Cluster within which this sandbox should be created", + "type": { "type": "string" }, - "defaultRouteGroup": { - "$ref": "#/definitions/sandbox.DefaultRouteGroup" - }, - "description": { - "description": "Description of the purpose of this sandbox", + "value": { "type": "string" - }, - "endpoints": { - "description": "Deprecated. Use defaultRouteGroup.Endpoints instead.", + } + }, + "type": "object" + }, + "sandbox.Customizations": { + "properties": { + "env": { + "description": "Environment variable modifications that will be applied to the forked workload", "items": { - "$ref": "#/definitions/sandbox.HostEndpoint" + "$ref": "#/definitions/sandbox.EnvVar" }, - "type": "array", - "x-omitempty": "true" + "type": "array" }, - "forks": { - "description": "Forks is the specification of each forked entity", + "images": { + "description": "One or more docker images that will be applied to the forked workload", "items": { - "$ref": "#/definitions/sandbox.Fork" + "$ref": "#/definitions/sandbox.Image" }, "type": "array" }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels are used to specify metadata associated with the sandbox as key-value pairs.", - "type": "object" - }, - "local": { - "description": "Local Workloads", + "patch": { + "$ref": "#/definitions/sandbox.CustomPatch" + } + }, + "type": "object" + }, + "sandbox.DefaultRouteGroup": { + "properties": { + "endpoints": { "items": { - "$ref": "#/definitions/local" + "$ref": "#/definitions/routeGroup.SpecEndpoint" }, "type": "array" + } + }, + "type": "object" + }, + "sandbox.Endpoint": { + "properties": { + "baselineUrl": { + "type": "string" }, - "localMachineID": { - "description": "Identifier of the machine from where a sandbox containing local workloads\nwas created or is intended to be ran", + "host": { "type": "string" }, - "resources": { - "description": "Resources specifies each required resource to spin up the sandbox", + "name": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "routeType": { + "type": "string" + }, + "target": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "sandbox.EnvValueFrom": { + "properties": { + "fork": { + "$ref": "#/definitions/sandbox.EnvValueFromFork" + }, + "resource": { + "$ref": "#/definitions/sandbox.EnvValueFromResource" + } + }, + "type": "object" + }, + "sandbox.EnvValueFromFork": { + "properties": { + "expression": { + "type": "string" + }, + "forkOf": { + "$ref": "#/definitions/sandbox.ForkOf" + } + }, + "type": "object" + }, + "sandbox.EnvValueFromResource": { + "properties": { + "name": { + "type": "string" + }, + "outputKey": { + "type": "string" + } + }, + "type": "object" + }, + "sandbox.EnvVar": { + "properties": { + "container": { + "description": "name of container to which it applies", + "type": "string" + }, + "name": { + "description": "environmental variable name", + "type": "string" + }, + "operation": { + "description": "upsert or delete", + "type": "string" + }, + "value": { + "description": "environmental variable value", + "type": "string" + }, + "valueFrom": { + "$ref": "#/definitions/sandbox.EnvValueFrom" + } + }, + "type": "object" + }, + "sandbox.Fork": { + "properties": { + "customizations": { + "$ref": "#/definitions/sandbox.Customizations" + }, + "endpoints": { + "description": "Deprecated. Use defaultRouteGroup.Endpoints instead.", "items": { - "$ref": "#/definitions/sandbox.Resource" + "$ref": "#/definitions/sandbox.ForkEndpoint" }, - "type": "array" + "type": "array", + "x-omitempty": "true" }, - "ttl": { - "$ref": "#/definitions/sandbox.TTL" + "forkOf": { + "$ref": "#/definitions/sandbox.ForkOf" + } + }, + "type": "object" + }, + "sandbox.ForkEndpoint": { + "properties": { + "name": { + "description": "Name of the endpoint", + "type": "string" + }, + "port": { + "description": "Port it will map to on the forked workload", + "type": "integer" + }, + "protocol": { + "description": "Protocol that this endpoint uses", + "type": "string" + } + }, + "type": "object" + }, + "sandbox.ForkOf": { + "properties": { + "kind": { + "description": "Kind of entity that we want to route to. One of (Service or Deployment or Rollout).", + "example": "Deployment", + "type": "string" + }, + "name": { + "description": "Name of the entity within the Kubernetes cluster.", + "example": "my-frontend", + "type": "string" + }, + "namespace": { + "description": "Namespace within which the entity lives in the Kubernetes cluster.", + "example": "default", + "type": "string" } }, "required": [ - "cluster", - "forks" + "kind", + "name", + "namespace" ], "type": "object" }, - "sandbox.TTL": { + "sandbox.HostEndpoint": { "properties": { - "duration": { - "description": "Duration represents the duration until sandbox end of life.\nIt should be an unsigned integer not exceeding 32 bits followed by\na units character, which can be one of the following.\n - 'm' for minutes\n - 'h' for hours\n - 'd' for days\n - 'w' for weeks", + "host": { + "description": "Hostname that this endpoint points to", "type": "string" }, - "offsetFrom": { - "description": "OffsetFrom indicates what the Duration is relative to. It\nmay be the empty string, \"createdAt\" or \"updatedAt\". The empty string\ndefaults to meaning \"createdAt\".", + "name": { + "description": "Name of the endpoint", + "type": "string" + }, + "port": { + "description": "Port it will map to on the specified host", + "type": "integer" + }, + "protocol": { + "description": "Protocol that this endpoint uses", "type": "string" } }, "type": "object" - } - }, - "host": "api.signadot.com", - "info": { - "contact": {}, - "description": "API for Signadot Sandboxes", - "title": "Signadot API", - "version": "2.0" - }, - "paths": { - "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}": { - "get": { - "consumes": [ - "application/json" - ], - "description": "List all artifacts for a given job attempt.", - "operationId": "list-job-attempt-artifacts", + }, + "sandbox.Image": { + "properties": { + "container": { + "description": "Container is the container this image must apply to in the forked workload", + "type": "string" + }, + "image": { + "description": "Name of the image (e.g. gcr.io/my-image/repo:my-tag)", + "type": "string" + } + }, + "type": "object" + }, + "sandbox.LocalWorkloadStatus": { + "properties": { + "name": { + "type": "string" + }, + "tunnel": { + "properties": { + "health": { + "properties": { + "connected": { + "type": "boolean" + }, + "lastCheckTime": { + "type": "string" + }, + "lastConnectedTime": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "sandbox.Readiness": { + "properties": { + "local": { + "items": { + "$ref": "#/definitions/sandbox.LocalWorkloadStatus" + }, + "type": "array" + }, + "message": { + "description": "Message is a human readable explanation of why\nthe sandbox is healthy or not.", + "type": "string" + }, + "ready": { + "description": "Ready indicates whether the sandbox is ready,\nmeaning that it can be used for testing.", + "type": "boolean" + }, + "reason": { + "description": "Reason is a machine readable explanation of why\nthe sandbox is healthy or not.", + "type": "string" + }, + "scheduledDeleteTime": { + "description": "ScheduledDeleteTime returns the formatted and computed ttl based on the Duration\nand OffsetFrom", + "type": "string" + } + }, + "type": "object" + }, + "sandbox.Resource": { + "properties": { + "name": { + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "plugin": { + "type": "string" + } + }, + "type": "object" + }, + "sandbox.Spec": { + "properties": { + "cluster": { + "description": "Cluster within which this sandbox should be created", + "type": "string" + }, + "defaultRouteGroup": { + "$ref": "#/definitions/sandbox.DefaultRouteGroup" + }, + "description": { + "description": "Description of the purpose of this sandbox", + "type": "string" + }, + "endpoints": { + "description": "Deprecated. Use defaultRouteGroup.Endpoints instead.", + "items": { + "$ref": "#/definitions/sandbox.HostEndpoint" + }, + "type": "array", + "x-omitempty": "true" + }, + "forks": { + "description": "Forks is the specification of each forked entity", + "items": { + "$ref": "#/definitions/sandbox.Fork" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels are used to specify metadata associated with the sandbox as key-value pairs.", + "type": "object" + }, + "resources": { + "description": "Resources specifies each required resource to spin up the sandbox", + "items": { + "$ref": "#/definitions/sandbox.Resource" + }, + "type": "array" + }, + "ttl": { + "$ref": "#/definitions/sandbox.TTL" + } + }, + "required": [ + "cluster", + "forks" + ], + "type": "object" + }, + "sandbox.TTL": { + "properties": { + "duration": { + "description": "Duration represents the duration until sandbox end of life.\nIt should be an unsigned integer not exceeding 32 bits followed by\na units character, which can be one of the following.\n - 'm' for minutes\n - 'h' for hours\n - 'd' for days\n - 'w' for weeks", + "type": "string" + }, + "offsetFrom": { + "description": "OffsetFrom indicates what the Duration is relative to. It\nmay be the empty string, \"createdAt\" or \"updatedAt\". The empty string\ndefaults to meaning \"createdAt\".", + "type": "string" + } + }, + "type": "object" + }, + "testexecutions.QueryResult": { + "properties": { + "cursor": { + "type": "string" + }, + "execution": { + "$ref": "#/definitions/TestExecution" + } + }, + "type": "object" + }, + "trafficmodels.By": { + "properties": { + "direction": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "type": "object" + } + }, + "host": "api.signadot.com", + "info": { + "contact": {}, + "description": "API for Signadot Sandboxes", + "title": "Signadot API", + "version": "2.0" + }, + "paths": { + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}": { + "get": { + "consumes": [ + "application/json" + ], + "description": "List all artifacts for a given job attempt.", + "operationId": "list-job-attempt-artifacts", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "integer" + }, + { + "description": "Filter by artifact space, one of 'user' or 'system' (by default there is no filter)", + "enum": [ + "user", + "system" + ], + "in": "query", + "name": "space", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/JobArtifact" + }, + "type": "array" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List job attempt artifacts", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/": { + "get": { + "consumes": [ + "application/json" + ], + "description": "Get info about a job attempt artifact", + "operationId": "info-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "integer" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + }, + { + "description": "Artifact space, one of 'user' or 'system' (by default 'user')", + "enum": [ + "user", + "system" + ], + "in": "query", + "name": "space", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/JobArtifactInfo" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Job attempt artifact info", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/download": { + "get": { + "consumes": [ + "application/json" + ], + "description": "Downloads an artifact for a given job attempt.", + "operationId": "download-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "integer" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + }, + { + "description": "Artifact space, one of 'user' or 'system' (by default 'user')", + "enum": [ + "user", + "system" + ], + "in": "query", + "name": "space", + "type": "string" + }, + { + "description": "Downloads the specified byte range of the artifact. Retrieving multiple ranges of data per request is not supported", + "in": "header", + "name": "Range", + "type": "string" + } + ], + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "Artifact successfully downloaded", + "headers": { + "signadot-artifact-checksumSHA256": { + "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", + "type": "string" + }, + "signadot-artifact-last-modified": { + "description": "Date and time when the artifact was last modified", + "type": "string" + }, + "signadot-artifact-metadata": { + "description": "A json-encoded, map of the artifact metadata", + "type": "string" + } + }, + "schema": { + "type": "file" + } + }, + "206": { + "description": "Artifact range successfully downloaded", + "headers": { + "signadot-artifact-last-modified": { + "description": "Date and time when the artifact was last modified", + "type": "string" + }, + "signadot-artifact-metadata": { + "description": "A json-encoded, map of the artifact metadata", + "type": "string" + } + }, + "schema": { + "type": "file" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Download job attempt artifact", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/upload": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "description": "Uploads an artifact for a given job attempt.", + "operationId": "upload-job-attempt-artifact", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Job Name", + "in": "path", + "name": "jobName", + "required": true, + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "integer" + }, + { + "description": "Artifact Path", + "in": "query", + "name": "path", + "required": true, + "type": "string" + }, + { + "description": "Artifact space, one of 'user' or 'system' (by default 'user')", + "enum": [ + "user", + "system" + ], + "in": "query", + "name": "space", + "type": "string" + }, + { + "description": "Job Execution ID", + "in": "formData", + "name": "jobExecution", + "type": "integer" + }, + { + "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", + "in": "formData", + "name": "checksumSHA256", + "type": "string" + }, + { + "description": "A json-encoded, map of metadata to store with the artifact", + "in": "formData", + "name": "metadata", + "type": "string" + }, + { + "description": "Artifact File", + "in": "formData", + "name": "artifact", + "required": true, + "type": "file" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EmptyResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "413": { + "description": "Request Entity Too Large", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Upload job attempt artifact", + "tags": [ + "Artifacts" + ] + } + }, + "/orgs/{orgName}/clusters/": { + "get": { + "consumes": [ + "application/json" + ], + "description": "List clusters.", + "operationId": "list-clusters", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/Cluster" + }, + "type": "array" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List clusters", + "tags": [ + "Cluster" + ] + } + }, + "/orgs/{orgName}/clusters/{clusterName}/": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "Remove a Kubernetes cluster from Signadot.", + "operationId": "remove-cluster", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Cluster Name", + "in": "path", + "name": "clusterName", + "required": true, + "type": "string", + "x-example": "my-cluster" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EmptyResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Remove a cluster", + "tags": [ + "Cluster" + ] + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "Get a cluster.", + "operationId": "get-cluster", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Cluster Name", + "in": "path", + "name": "clusterName", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get a cluster", + "tags": [ + "Cluster" + ] + }, + "put": { + "consumes": [ + "application/json" + ], + "description": "Add a Kubernetes cluster to Signadot.", + "operationId": "add-cluster", "parameters": [ { "description": "Signadot Org Name", @@ -1342,28 +2345,12 @@ "x-example": "my-company" }, { - "description": "Job Name", - "in": "path", - "name": "jobName", - "required": true, - "type": "string" - }, - { - "description": "Job Attempt ID", + "description": "Cluster Name", "in": "path", - "name": "jobAttempt", + "name": "clusterName", "required": true, - "type": "integer" - }, - { - "description": "Filter by artifact space, one of 'user' or 'system' (by default there is no filter)", - "enum": [ - "user", - "system" - ], - "in": "query", - "name": "space", - "type": "string" + "type": "string", + "x-example": "my-cluster" } ], "produces": [ @@ -1373,10 +2360,7 @@ "200": { "description": "OK", "schema": { - "items": { - "$ref": "#/definitions/JobArtifact" - }, - "type": "array" + "$ref": "#/definitions/Cluster" } }, "400": { @@ -1391,14 +2375,8 @@ "$ref": "#/definitions/ErrorResponse" } }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "500": { - "description": "Internal Server Error", + "502": { + "description": "Bad Gateway", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1409,19 +2387,19 @@ "ApiKeyAuth": [] } ], - "summary": "List job attempt artifacts", + "summary": "Add a cluster", "tags": [ - "Artifacts" + "Cluster" ] } }, - "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/": { - "get": { + "/orgs/{orgName}/clusters/{clusterName}/tokens": { + "post": { "consumes": [ "application/json" ], - "description": "Get info about a job attempt artifact", - "operationId": "info-job-attempt-artifact", + "description": "Create a new token for connecting a cluster.", + "operationId": "create-cluster-token", "parameters": [ { "description": "Signadot Org Name", @@ -1432,35 +2410,59 @@ "x-example": "my-company" }, { - "description": "Job Name", + "description": "Cluster Name", "in": "path", - "name": "jobName", + "name": "clusterName", "required": true, - "type": "string" - }, + "type": "string", + "x-example": "my-new-cluster" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ClusterToken" + } + } + }, + "security": [ { - "description": "Job Attempt ID", + "ApiKeyAuth": [] + } + ], + "summary": "Create cluster token", + "tags": [ + "Cluster" + ] + } + }, + "/orgs/{orgName}/clusters/{clusterName}/tokens/": { + "get": { + "consumes": [ + "application/json" + ], + "description": "List the cluster tokens associated with a cluster.", + "operationId": "list-cluster-tokens", + "parameters": [ + { + "description": "Signadot Org Name", "in": "path", - "name": "jobAttempt", + "name": "orgName", "required": true, - "type": "integer" + "type": "string", + "x-example": "my-company" }, { - "description": "Artifact Path", - "in": "query", - "name": "path", + "description": "Cluster Name", + "in": "path", + "name": "clusterName", "required": true, - "type": "string" - }, - { - "description": "Artifact space, one of 'user' or 'system' (by default 'user')", - "enum": [ - "user", - "system" - ], - "in": "query", - "name": "space", - "type": "string" + "type": "string", + "x-example": "my-new-cluster" } ], "produces": [ @@ -1470,31 +2472,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/JobArtifactInfo" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" + "items": { + "$ref": "#/definitions/ClusterToken" + }, + "type": "array" } } }, @@ -1503,19 +2484,19 @@ "ApiKeyAuth": [] } ], - "summary": "Job attempt artifact info", + "summary": "List cluster tokens", "tags": [ - "Artifacts" + "Cluster" ] } }, - "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/download": { - "get": { + "/orgs/{orgName}/clusters/{clusterName}/tokens/{tokenId}": { + "delete": { "consumes": [ "application/json" ], - "description": "Downloads an artifact for a given job attempt.", - "operationId": "download-job-attempt-artifact", + "description": "Delete a cluster token associated with a cluster.", + "operationId": "delete-cluster-token", "parameters": [ { "description": "Signadot Org Name", @@ -1526,105 +2507,30 @@ "x-example": "my-company" }, { - "description": "Job Name", + "description": "Cluster Name", "in": "path", - "name": "jobName", + "name": "clusterName", "required": true, - "type": "string" + "type": "string", + "x-example": "my-new-cluster" }, { - "description": "Job Attempt ID", + "description": "Token Id", "in": "path", - "name": "jobAttempt", - "required": true, - "type": "integer" - }, - { - "description": "Artifact Path", - "in": "query", - "name": "path", + "name": "tokenId", "required": true, - "type": "string" - }, - { - "description": "Artifact space, one of 'user' or 'system' (by default 'user')", - "enum": [ - "user", - "system" - ], - "in": "query", - "name": "space", - "type": "string" - }, - { - "description": "Downloads the specified byte range of the artifact. Retrieving multiple ranges of data per request is not supported", - "in": "header", - "name": "Range", - "type": "string" + "type": "string", + "x-example": "kq6mtksk7mn5" } ], "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "Artifact successfully downloaded", - "headers": { - "signadot-artifact-checksumSHA256": { - "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", - "type": "string" - }, - "signadot-artifact-last-modified": { - "description": "Date and time when the artifact was last modified", - "type": "string" - }, - "signadot-artifact-metadata": { - "description": "A json-encoded, map of the artifact metadata", - "type": "string" - } - }, - "schema": { - "type": "file" - } - }, - "206": { - "description": "Artifact range successfully downloaded", - "headers": { - "signadot-artifact-last-modified": { - "description": "Date and time when the artifact was last modified", - "type": "string" - }, - "signadot-artifact-metadata": { - "description": "A json-encoded, map of the artifact metadata", - "type": "string" - } - }, - "schema": { - "type": "file" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "500": { - "description": "Internal Server Error", + "application/json" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/EmptyResponse" } } }, @@ -1633,19 +2539,17 @@ "ApiKeyAuth": [] } ], - "summary": "Download job attempt artifact", + "summary": "Delete cluster token", "tags": [ - "Artifacts" + "Cluster" ] - } - }, - "/orgs/{orgName}/artifacts/jobs/{jobName}/attempts/{jobAttempt}/objects/upload": { - "post": { + }, + "get": { "consumes": [ - "multipart/form-data" + "application/json" ], - "description": "Uploads an artifact for a given job attempt.", - "operationId": "upload-job-attempt-artifact", + "description": "Get a cluster token associated with a cluster.", + "operationId": "get-cluster-token", "parameters": [ { "description": "Signadot Org Name", @@ -1656,60 +2560,20 @@ "x-example": "my-company" }, { - "description": "Job Name", + "description": "Cluster Name", "in": "path", - "name": "jobName", + "name": "clusterName", "required": true, - "type": "string" + "type": "string", + "x-example": "my-new-cluster" }, { - "description": "Job Attempt ID", + "description": "Token Id", "in": "path", - "name": "jobAttempt", - "required": true, - "type": "integer" - }, - { - "description": "Artifact Path", - "in": "query", - "name": "path", - "required": true, - "type": "string" - }, - { - "description": "Artifact space, one of 'user' or 'system' (by default 'user')", - "enum": [ - "user", - "system" - ], - "in": "query", - "name": "space", - "type": "string" - }, - { - "description": "Job Execution ID", - "in": "formData", - "name": "jobExecution", - "type": "integer" - }, - { - "description": "A base64-encoded, 256-bit SHA-256 digest of the artifact", - "in": "formData", - "name": "checksumSHA256", - "type": "string" - }, - { - "description": "A json-encoded, map of metadata to store with the artifact", - "in": "formData", - "name": "metadata", - "type": "string" - }, - { - "description": "Artifact File", - "in": "formData", - "name": "artifact", + "name": "tokenId", "required": true, - "type": "file" + "type": "string", + "x-example": "kq6mtksk7mn5" } ], "produces": [ @@ -1719,31 +2583,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "413": { - "description": "Request Entity Too Large", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/ClusterToken" } } }, @@ -1752,19 +2592,19 @@ "ApiKeyAuth": [] } ], - "summary": "Upload job attempt artifact", + "summary": "Get a cluster token", "tags": [ - "Artifacts" + "Cluster" ] } }, - "/orgs/{orgName}/clusters/": { + "/orgs/{orgName}/jobs": { "get": { "consumes": [ "application/json" ], - "description": "List clusters.", - "operationId": "list-clusters", + "description": "List Jobs", + "operationId": "list-jobs", "parameters": [ { "description": "Signadot Org Name", @@ -1783,7 +2623,7 @@ "description": "OK", "schema": { "items": { - "$ref": "#/definitions/Cluster" + "$ref": "#/definitions/Job" }, "type": "array" } @@ -1812,19 +2652,17 @@ "ApiKeyAuth": [] } ], - "summary": "List clusters", + "summary": "List Jobs", "tags": [ - "Cluster" + "Jobs" ] - } - }, - "/orgs/{orgName}/clusters/{clusterName}/": { - "delete": { + }, + "post": { "consumes": [ "application/json" ], - "description": "Remove a Kubernetes cluster from Signadot.", - "operationId": "remove-cluster", + "description": "Creates a job with the provided parameters.", + "operationId": "create-job", "parameters": [ { "description": "Signadot Org Name", @@ -1835,12 +2673,13 @@ "x-example": "my-company" }, { - "description": "Cluster Name", - "in": "path", - "name": "clusterName", + "description": "Request to create a job", + "in": "body", + "name": "data", "required": true, - "type": "string", - "x-example": "my-cluster" + "schema": { + "$ref": "#/definitions/Job" + } } ], "produces": [ @@ -1850,7 +2689,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" + "$ref": "#/definitions/Job" } }, "400": { @@ -1877,17 +2716,19 @@ "ApiKeyAuth": [] } ], - "summary": "Remove a cluster", + "summary": "Create a job", "tags": [ - "Cluster" + "Jobs" ] - }, - "get": { + } + }, + "/orgs/{orgName}/jobs/{jobName}": { + "delete": { "consumes": [ "application/json" ], - "description": "Get a cluster.", - "operationId": "get-cluster", + "description": "Delete a given job.", + "operationId": "delete-job", "parameters": [ { "description": "Signadot Org Name", @@ -1898,11 +2739,12 @@ "x-example": "my-company" }, { - "description": "Cluster Name", + "description": "Job Name", "in": "path", - "name": "clusterName", + "name": "jobName", "required": true, - "type": "string" + "type": "string", + "x-example": "job-xyz" } ], "produces": [ @@ -1912,7 +2754,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Cluster" + "$ref": "#/definitions/EmptyResponse" } }, "400": { @@ -1939,17 +2781,17 @@ "ApiKeyAuth": [] } ], - "summary": "Get a cluster", + "summary": "Delete a job", "tags": [ - "Cluster" + "Jobs" ] }, - "put": { + "get": { "consumes": [ "application/json" ], - "description": "Add a Kubernetes cluster to Signadot.", - "operationId": "add-cluster", + "description": "Fetch the details about a given job.", + "operationId": "get-job", "parameters": [ { "description": "Signadot Org Name", @@ -1960,12 +2802,12 @@ "x-example": "my-company" }, { - "description": "Cluster Name", + "description": "Job Name", "in": "path", - "name": "clusterName", + "name": "jobName", "required": true, "type": "string", - "x-example": "my-cluster" + "x-example": "job-xyz" } ], "produces": [ @@ -1975,7 +2817,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Cluster" + "$ref": "#/definitions/Job" } }, "400": { @@ -2002,19 +2844,19 @@ "ApiKeyAuth": [] } ], - "summary": "Add a cluster", + "summary": "Get a job", "tags": [ - "Cluster" + "Jobs" ] } }, - "/orgs/{orgName}/clusters/{clusterName}/tokens": { - "post": { + "/orgs/{orgName}/jobs/{jobName}/attempts/{jobAttempt}/logs/stream": { + "get": { "consumes": [ "application/json" ], - "description": "Create a new token for connecting a cluster.", - "operationId": "create-cluster-token", + "description": "Stream logs for a given job attempt.", + "operationId": "stream-job-attempt-logs", "parameters": [ { "description": "Signadot Org Name", @@ -2025,22 +2867,68 @@ "x-example": "my-company" }, { - "description": "Cluster Name", + "description": "Job Name", "in": "path", - "name": "clusterName", + "name": "jobName", "required": true, - "type": "string", - "x-example": "my-new-cluster" + "type": "string" + }, + { + "description": "Job Attempt ID", + "in": "path", + "name": "jobAttempt", + "required": true, + "type": "integer" + }, + { + "description": "Stream type (stdout or stderr)", + "enum": [ + "stdout", + "stderr" + ], + "in": "query", + "name": "type", + "type": "string" + }, + { + "description": "If set, the number of lines from the end of the logs to show", + "in": "query", + "name": "tailLines", + "type": "integer" + }, + { + "description": "If set, resume logs stream from the given cursor", + "in": "query", + "name": "cursor", + "type": "string" } ], "produces": [ - "application/json" + "text/event-stream" ], "responses": { "200": { - "description": "OK", + "description": "Log lines stream", "schema": { - "$ref": "#/definitions/ClusterToken" + "type": "file" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResponse" } } }, @@ -2049,19 +2937,19 @@ "ApiKeyAuth": [] } ], - "summary": "Create cluster token", + "summary": "Stream job attempt logs", "tags": [ - "Cluster" + "JobLogs" ] } }, - "/orgs/{orgName}/clusters/{clusterName}/tokens/": { - "get": { + "/orgs/{orgName}/jobs/{jobName}/cancel": { + "put": { "consumes": [ "application/json" ], - "description": "List the cluster tokens associated with a cluster.", - "operationId": "list-cluster-tokens", + "description": "Cancel a given job.", + "operationId": "cancel-job", "parameters": [ { "description": "Signadot Org Name", @@ -2072,12 +2960,12 @@ "x-example": "my-company" }, { - "description": "Cluster Name", + "description": "Job Name", "in": "path", - "name": "clusterName", + "name": "jobName", "required": true, "type": "string", - "x-example": "my-new-cluster" + "x-example": "job-xyz" } ], "produces": [ @@ -2087,10 +2975,25 @@ "200": { "description": "OK", "schema": { - "items": { - "$ref": "#/definitions/ClusterToken" - }, - "type": "array" + "$ref": "#/definitions/Job" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" } } }, @@ -2099,19 +3002,19 @@ "ApiKeyAuth": [] } ], - "summary": "List cluster tokens", + "summary": "Cancel a job", "tags": [ - "Cluster" + "Jobs" ] } }, - "/orgs/{orgName}/clusters/{clusterName}/tokens/{tokenId}": { - "delete": { + "/orgs/{orgName}/resource-plugins": { + "get": { "consumes": [ "application/json" ], - "description": "Delete a cluster token associated with a cluster.", - "operationId": "delete-cluster-token", + "description": "List all resource plugins under the specified Signadot org.", + "operationId": "list-resource-plugins", "parameters": [ { "description": "Signadot Org Name", @@ -2120,22 +3023,6 @@ "required": true, "type": "string", "x-example": "my-company" - }, - { - "description": "Cluster Name", - "in": "path", - "name": "clusterName", - "required": true, - "type": "string", - "x-example": "my-new-cluster" - }, - { - "description": "Token Id", - "in": "path", - "name": "tokenId", - "required": true, - "type": "string", - "x-example": "kq6mtksk7mn5" } ], "produces": [ @@ -2145,7 +3032,28 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" + "items": { + "$ref": "#/definitions/ResourcePlugin" + }, + "type": "array" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" } } }, @@ -2154,17 +3062,19 @@ "ApiKeyAuth": [] } ], - "summary": "Delete cluster token", + "summary": "List resource plugins", "tags": [ - "Cluster" + "ResourcePlugins" ] - }, - "get": { + } + }, + "/orgs/{orgName}/resource-plugins/{pluginName}": { + "delete": { "consumes": [ "application/json" ], - "description": "Get a cluster token associated with a cluster.", - "operationId": "get-cluster-token", + "description": "Delete the resource plugin by name", + "operationId": "delete-resource-plugin", "parameters": [ { "description": "Signadot Org Name", @@ -2175,20 +3085,12 @@ "x-example": "my-company" }, { - "description": "Cluster Name", - "in": "path", - "name": "clusterName", - "required": true, - "type": "string", - "x-example": "my-new-cluster" - }, - { - "description": "Token Id", + "description": "Resource plugin name", "in": "path", - "name": "tokenId", + "name": "pluginName", "required": true, "type": "string", - "x-example": "kq6mtksk7mn5" + "x-example": "mariadb-plugin" } ], "produces": [ @@ -2198,7 +3100,25 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ClusterToken" + "$ref": "#/definitions/EmptyResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" } } }, @@ -2207,19 +3127,17 @@ "ApiKeyAuth": [] } ], - "summary": "Get a cluster token", + "summary": "Delete a resource plugin", "tags": [ - "Cluster" + "ResourcePlugins" ] - } - }, - "/orgs/{orgName}/jobs": { + }, "get": { "consumes": [ "application/json" ], - "description": "List Jobs", - "operationId": "list-jobs", + "description": "Get the specified resource plugin by name", + "operationId": "get-resource-plugin", "parameters": [ { "description": "Signadot Org Name", @@ -2228,6 +3146,14 @@ "required": true, "type": "string", "x-example": "my-company" + }, + { + "description": "Resource plugin name", + "in": "path", + "name": "pluginName", + "required": true, + "type": "string", + "x-example": "mariadb-plugin" } ], "produces": [ @@ -2237,10 +3163,7 @@ "200": { "description": "OK", "schema": { - "items": { - "$ref": "#/definitions/Job" - }, - "type": "array" + "$ref": "#/definitions/ResourcePlugin" } }, "400": { @@ -2267,17 +3190,17 @@ "ApiKeyAuth": [] } ], - "summary": "List Jobs", + "summary": "Get the requested resource plugin", "tags": [ - "Jobs" + "ResourcePlugins" ] }, - "post": { + "put": { "consumes": [ "application/json" ], - "description": "Creates a job with the provided parameters.", - "operationId": "create-job", + "description": "Apply a resource plugin. Updates are not supported at this time.", + "operationId": "apply-resource-plugin", "parameters": [ { "description": "Signadot Org Name", @@ -2288,12 +3211,20 @@ "x-example": "my-company" }, { - "description": "Request to create a job", + "description": "Resource plugin name", + "in": "path", + "name": "pluginName", + "required": true, + "type": "string", + "x-example": "mariadb-plugin" + }, + { + "description": "Request to create or update a resource plugin", "in": "body", "name": "data", "required": true, "schema": { - "$ref": "#/definitions/Job" + "$ref": "#/definitions/ResourcePlugin" } } ], @@ -2304,7 +3235,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Job" + "$ref": "#/definitions/EmptyResponse" } }, "400": { @@ -2331,19 +3262,19 @@ "ApiKeyAuth": [] } ], - "summary": "Create a job", + "summary": "Apply a resource plugin", "tags": [ - "Jobs" + "ResourcePlugins" ] } }, - "/orgs/{orgName}/jobs/{jobName}": { - "delete": { + "/orgs/{orgName}/routegroups": { + "get": { "consumes": [ "application/json" ], - "description": "Delete a given job.", - "operationId": "delete-job", + "description": "List all routegroups under the specified Signadot org.", + "operationId": "list-routegroups", "parameters": [ { "description": "Signadot Org Name", @@ -2352,14 +3283,6 @@ "required": true, "type": "string", "x-example": "my-company" - }, - { - "description": "Job Name", - "in": "path", - "name": "jobName", - "required": true, - "type": "string", - "x-example": "job-xyz" } ], "produces": [ @@ -2369,7 +3292,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" + "items": { + "$ref": "#/definitions/RouteGroup" + }, + "type": "array" } }, "400": { @@ -2396,17 +3322,19 @@ "ApiKeyAuth": [] } ], - "summary": "Delete a job", + "summary": "List routegroups", "tags": [ - "Jobs" + "RouteGroups" ] - }, - "get": { + } + }, + "/orgs/{orgName}/routegroups/{routegroupName}": { + "delete": { "consumes": [ "application/json" ], - "description": "Fetch the details about a given job.", - "operationId": "get-job", + "description": "Delete a given routegroup.", + "operationId": "delete-routegroup", "parameters": [ { "description": "Signadot Org Name", @@ -2417,12 +3345,12 @@ "x-example": "my-company" }, { - "description": "Job Name", + "description": "RouteGroup Name", "in": "path", - "name": "jobName", + "name": "routegroupName", "required": true, "type": "string", - "x-example": "job-xyz" + "x-example": "my-routegroup" } ], "produces": [ @@ -2432,7 +3360,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Job" + "$ref": "#/definitions/EmptyResponse" } }, "400": { @@ -2459,73 +3387,43 @@ "ApiKeyAuth": [] } ], - "summary": "Get a job", + "summary": "Delete a routegroup", "tags": [ - "Jobs" + "RouteGroups" ] - } - }, - "/orgs/{orgName}/jobs/{jobName}/attempts/{jobAttempt}/logs/stream": { + }, "get": { "consumes": [ "application/json" ], - "description": "Stream logs for a given job attempt.", - "operationId": "stream-job-attempt-logs", + "description": "Fetch the details about a given routegroup.", + "operationId": "get-routegroup", "parameters": [ { "description": "Signadot Org Name", "in": "path", "name": "orgName", "required": true, - "type": "string", - "x-example": "my-company" - }, - { - "description": "Job Name", - "in": "path", - "name": "jobName", - "required": true, - "type": "string" + "type": "string", + "x-example": "my-company" }, { - "description": "Job Attempt ID", + "description": "RouteGroup Name", "in": "path", - "name": "jobAttempt", + "name": "routegroupName", "required": true, - "type": "integer" - }, - { - "description": "Stream type (stdout or stderr)", - "enum": [ - "stdout", - "stderr" - ], - "in": "query", - "name": "type", - "type": "string" - }, - { - "description": "If set, the number of lines from the end of the logs to show", - "in": "query", - "name": "tailLines", - "type": "integer" - }, - { - "description": "If set, resume logs stream from the given cursor", - "in": "query", - "name": "cursor", - "type": "string" + "type": "string", + "x-example": "my-routegroup" } ], "produces": [ - "text/event-stream" + "application/json" ], "responses": { "200": { - "description": "Log lines stream", + "description": "OK", "schema": { - "type": "file" + "$ref": "#/definitions/RouteGroup" } }, "400": { @@ -2540,8 +3438,8 @@ "$ref": "#/definitions/ErrorResponse" } }, - "404": { - "description": "Not Found", + "502": { + "description": "Bad Gateway", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -2552,19 +3450,17 @@ "ApiKeyAuth": [] } ], - "summary": "Stream job attempt logs", + "summary": "Get a routegroup", "tags": [ - "JobLogs" + "RouteGroups" ] - } - }, - "/orgs/{orgName}/jobs/{jobName}/cancel": { + }, "put": { "consumes": [ "application/json" ], - "description": "Cancel a given job.", - "operationId": "cancel-job", + "description": "Creates or updates a routegroup with the provided parameters.", + "operationId": "apply-routegroup", "parameters": [ { "description": "Signadot Org Name", @@ -2575,12 +3471,21 @@ "x-example": "my-company" }, { - "description": "Job Name", + "description": "RouteGroup Name", "in": "path", - "name": "jobName", + "name": "routegroupName", "required": true, "type": "string", - "x-example": "job-xyz" + "x-example": "my-routegroup" + }, + { + "description": "Request to create or update routegroup", + "in": "body", + "name": "data", + "required": true, + "schema": { + "$ref": "#/definitions/RouteGroup" + } } ], "produces": [ @@ -2590,7 +3495,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Job" + "$ref": "#/definitions/RouteGroup" } }, "400": { @@ -2617,19 +3522,19 @@ "ApiKeyAuth": [] } ], - "summary": "Cancel a job", + "summary": "Create or update a routegroup", "tags": [ - "Jobs" + "RouteGroups" ] } }, - "/orgs/{orgName}/resource-plugins": { + "/orgs/{orgName}/runnergroups": { "get": { "consumes": [ "application/json" ], - "description": "List all resource plugins under the specified Signadot org.", - "operationId": "list-resource-plugins", + "description": "List RunnerGroups", + "operationId": "list-runnergroup", "parameters": [ { "description": "Signadot Org Name", @@ -2648,7 +3553,7 @@ "description": "OK", "schema": { "items": { - "$ref": "#/definitions/ResourcePlugin" + "$ref": "#/definitions/JobRunnerGroup" }, "type": "array" } @@ -2677,19 +3582,19 @@ "ApiKeyAuth": [] } ], - "summary": "List resource plugins", + "summary": "List RunnerGroups", "tags": [ - "ResourcePlugins" + "RunnerGroups" ] } }, - "/orgs/{orgName}/resource-plugins/{pluginName}": { + "/orgs/{orgName}/runnergroups/{runnergroupName}": { "delete": { "consumes": [ "application/json" ], - "description": "Delete the resource plugin by name", - "operationId": "delete-resource-plugin", + "description": "Delete a given runnergroup.", + "operationId": "delete-runnergroup", "parameters": [ { "description": "Signadot Org Name", @@ -2700,12 +3605,12 @@ "x-example": "my-company" }, { - "description": "Resource plugin name", + "description": "RunnerGroup Name", "in": "path", - "name": "pluginName", + "name": "runnergroupName", "required": true, "type": "string", - "x-example": "mariadb-plugin" + "x-example": "my-runnergroup" } ], "produces": [ @@ -2742,17 +3647,17 @@ "ApiKeyAuth": [] } ], - "summary": "Delete a resource plugin", + "summary": "Delete a runnergroup", "tags": [ - "ResourcePlugins" + "RunnerGroups" ] }, "get": { "consumes": [ "application/json" ], - "description": "Get the specified resource plugin by name", - "operationId": "get-resource-plugin", + "description": "Fetch the details about a given runnergroup.", + "operationId": "get-runnergroup", "parameters": [ { "description": "Signadot Org Name", @@ -2763,12 +3668,12 @@ "x-example": "my-company" }, { - "description": "Resource plugin name", + "description": "RunnerGroup Name", "in": "path", - "name": "pluginName", + "name": "runnergroupName", "required": true, "type": "string", - "x-example": "mariadb-plugin" + "x-example": "my-runnergroup" } ], "produces": [ @@ -2778,7 +3683,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ResourcePlugin" + "$ref": "#/definitions/JobRunnerGroup" } }, "400": { @@ -2805,17 +3710,17 @@ "ApiKeyAuth": [] } ], - "summary": "Get the requested resource plugin", + "summary": "Get a runnergroup", "tags": [ - "ResourcePlugins" + "RunnerGroups" ] }, "put": { "consumes": [ "application/json" ], - "description": "Apply a resource plugin. Updates are not supported at this time.", - "operationId": "apply-resource-plugin", + "description": "Creates or updates a runnergroup with the provided parameters.", + "operationId": "apply-runnergroup", "parameters": [ { "description": "Signadot Org Name", @@ -2826,20 +3731,20 @@ "x-example": "my-company" }, { - "description": "Resource plugin name", + "description": "RunnerGroup Name", "in": "path", - "name": "pluginName", + "name": "runnergroupName", "required": true, "type": "string", - "x-example": "mariadb-plugin" + "x-example": "my-runnergroup" }, { - "description": "Request to create or update a resource plugin", + "description": "Request to create or update runnergroup", "in": "body", "name": "data", "required": true, "schema": { - "$ref": "#/definitions/ResourcePlugin" + "$ref": "#/definitions/JobRunnerGroup" } } ], @@ -2850,7 +3755,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" + "$ref": "#/definitions/JobRunnerGroup" } }, "400": { @@ -2877,19 +3782,19 @@ "ApiKeyAuth": [] } ], - "summary": "Apply a resource plugin", + "summary": "Create or update a runnergroup", "tags": [ - "ResourcePlugins" + "RunnerGroups" ] } }, - "/orgs/{orgName}/routegroups": { + "/orgs/{orgName}/sandboxes": { "get": { "consumes": [ "application/json" ], - "description": "List all routegroups under the specified Signadot org.", - "operationId": "list-routegroups", + "description": "List all sandboxes under the specified Signadot org.", + "operationId": "list-sandboxes", "parameters": [ { "description": "Signadot Org Name", @@ -2908,7 +3813,7 @@ "description": "OK", "schema": { "items": { - "$ref": "#/definitions/RouteGroup" + "$ref": "#/definitions/Sandbox" }, "type": "array" } @@ -2937,19 +3842,19 @@ "ApiKeyAuth": [] } ], - "summary": "List routegroups", + "summary": "List sandboxes", "tags": [ - "RouteGroups" + "Sandboxes" ] } }, - "/orgs/{orgName}/routegroups/{routegroupName}": { + "/orgs/{orgName}/sandboxes/{sandboxName}": { "delete": { "consumes": [ "application/json" ], - "description": "Delete a given routegroup.", - "operationId": "delete-routegroup", + "description": "Delete a given sandbox.", + "operationId": "delete-sandbox", "parameters": [ { "description": "Signadot Org Name", @@ -2960,12 +3865,18 @@ "x-example": "my-company" }, { - "description": "RouteGroup Name", + "description": "Sandbox Name", "in": "path", - "name": "routegroupName", + "name": "sandboxName", "required": true, "type": "string", - "x-example": "my-routegroup" + "x-example": "my-sandbox" + }, + { + "description": "force", + "in": "query", + "name": "force", + "type": "boolean" } ], "produces": [ @@ -3002,17 +3913,17 @@ "ApiKeyAuth": [] } ], - "summary": "Delete a routegroup", + "summary": "Delete a sandbox", "tags": [ - "RouteGroups" + "Sandboxes" ] }, "get": { "consumes": [ "application/json" ], - "description": "Fetch the details about a given routegroup.", - "operationId": "get-routegroup", + "description": "Fetch the details about a given sandbox.", + "operationId": "get-sandbox", "parameters": [ { "description": "Signadot Org Name", @@ -3023,12 +3934,12 @@ "x-example": "my-company" }, { - "description": "RouteGroup Name", + "description": "Sandbox Name", "in": "path", - "name": "routegroupName", + "name": "sandboxName", "required": true, "type": "string", - "x-example": "my-routegroup" + "x-example": "my-sandbox" } ], "produces": [ @@ -3038,7 +3949,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/RouteGroup" + "$ref": "#/definitions/Sandbox" } }, "400": { @@ -3065,17 +3976,17 @@ "ApiKeyAuth": [] } ], - "summary": "Get a routegroup", + "summary": "Get a sandbox", "tags": [ - "RouteGroups" + "Sandboxes" ] }, "put": { "consumes": [ "application/json" ], - "description": "Creates or updates a routegroup with the provided parameters.", - "operationId": "apply-routegroup", + "description": "Creates or updates a sandbox with the provided parameters.", + "operationId": "apply-sandbox", "parameters": [ { "description": "Signadot Org Name", @@ -3086,21 +3997,78 @@ "x-example": "my-company" }, { - "description": "RouteGroup Name", + "description": "Sandbox Name", + "in": "path", + "name": "sandboxName", + "required": true, + "type": "string", + "x-example": "my-sandbox" + }, + { + "description": "Request to create sandbox", + "in": "body", + "name": "data", + "required": true, + "schema": { + "$ref": "#/definitions/Sandbox" + } + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Sandbox" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Create or update a sandbox", + "tags": [ + "Sandboxes" + ] + } + }, + "/orgs/{orgName}/tests": { + "get": { + "consumes": [ + "application/json" + ], + "description": "List Tests", + "operationId": "list-tests", + "parameters": [ + { + "description": "Signadot Org Name", "in": "path", - "name": "routegroupName", + "name": "orgName", "required": true, "type": "string", - "x-example": "my-routegroup" - }, - { - "description": "Request to create or update routegroup", - "in": "body", - "name": "data", - "required": true, - "schema": { - "$ref": "#/definitions/RouteGroup" - } + "x-example": "my-company" } ], "produces": [ @@ -3110,7 +4078,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/RouteGroup" + "items": { + "$ref": "#/definitions/Test" + }, + "type": "array" } }, "400": { @@ -3137,27 +4108,118 @@ "ApiKeyAuth": [] } ], - "summary": "Create or update a routegroup", + "summary": "List Tests", "tags": [ - "RouteGroups" + "Tests" ] } }, - "/orgs/{orgName}/runnergroups": { + "/orgs/{orgName}/tests/executions/": { "get": { "consumes": [ "application/json" ], - "description": "List RunnerGroups", - "operationId": "list-runnergroup", + "description": "Query test executions based on different criteria", + "operationId": "query-test-executions", "parameters": [ { - "description": "Signadot Org Name", + "description": "Signadot Org name", "in": "path", "name": "orgName", "required": true, "type": "string", "x-example": "my-company" + }, + { + "description": "Target sandbox name", + "in": "query", + "name": "targetSandboxName", + "type": "string" + }, + { + "description": "Target route group name", + "in": "query", + "name": "targetRouteGroupName", + "type": "string" + }, + { + "description": "Revision of the target routing context", + "in": "query", + "name": "targetRevision", + "type": "string" + }, + { + "description": "Cluster name", + "in": "query", + "name": "clusterName", + "type": "string" + }, + { + "description": "Test name", + "in": "query", + "name": "testName", + "type": "string" + }, + { + "description": "Trigger name", + "in": "query", + "name": "triggerName", + "type": "string" + }, + { + "description": "Trigger workload in JSON format", + "in": "query", + "name": "triggerWorkload", + "type": "string" + }, + { + "description": "Test execution phase", + "in": "query", + "name": "executionPhase", + "type": "string" + }, + { + "description": "Filter results starting from this time", + "in": "query", + "name": "from", + "type": "string" + }, + { + "description": "Filter results until this time", + "in": "query", + "name": "to", + "type": "string" + }, + { + "description": "Group results by entity (so far, only triggers is supported)", + "enum": [ + "trigger" + ], + "in": "query", + "name": "groupBy", + "type": "string" + }, + { + "description": "Sorting direction", + "enum": [ + "asc", + "desc" + ], + "in": "query", + "name": "orderDir", + "type": "string" + }, + { + "description": "Number of rows to be included in the response", + "in": "query", + "name": "pageSize", + "type": "string" + }, + { + "description": "Start sending results from this cursor", + "in": "query", + "name": "cursor", + "type": "string" } ], "produces": [ @@ -3168,7 +4230,7 @@ "description": "OK", "schema": { "items": { - "$ref": "#/definitions/JobRunnerGroup" + "$ref": "#/definitions/testexecutions.QueryResult" }, "type": "array" } @@ -3197,19 +4259,19 @@ "ApiKeyAuth": [] } ], - "summary": "List RunnerGroups", + "summary": "Query Test Executions", "tags": [ - "RunnerGroups" + "TestExecutions" ] } }, - "/orgs/{orgName}/runnergroups/{runnergroupName}": { + "/orgs/{orgName}/tests/{testName}": { "delete": { "consumes": [ "application/json" ], - "description": "Delete a given runnergroup.", - "operationId": "delete-runnergroup", + "description": "Delete a given test.", + "operationId": "delete-test", "parameters": [ { "description": "Signadot Org Name", @@ -3220,12 +4282,12 @@ "x-example": "my-company" }, { - "description": "RunnerGroup Name", + "description": "Test Name", "in": "path", - "name": "runnergroupName", + "name": "testName", "required": true, "type": "string", - "x-example": "my-runnergroup" + "x-example": "job-xyz" } ], "produces": [ @@ -3262,17 +4324,17 @@ "ApiKeyAuth": [] } ], - "summary": "Delete a runnergroup", + "summary": "Delete a test", "tags": [ - "RunnerGroups" + "Tests" ] }, "get": { "consumes": [ "application/json" ], - "description": "Fetch the details about a given runnergroup.", - "operationId": "get-runnergroup", + "description": "Fetch the details about a given test.", + "operationId": "get-test", "parameters": [ { "description": "Signadot Org Name", @@ -3283,12 +4345,11 @@ "x-example": "my-company" }, { - "description": "RunnerGroup Name", + "description": "Test Name", "in": "path", - "name": "runnergroupName", + "name": "testName", "required": true, - "type": "string", - "x-example": "my-runnergroup" + "type": "string" } ], "produces": [ @@ -3298,7 +4359,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/JobRunnerGroup" + "$ref": "#/definitions/Test" } }, "400": { @@ -3325,17 +4386,17 @@ "ApiKeyAuth": [] } ], - "summary": "Get a runnergroup", + "summary": "Get a test", "tags": [ - "RunnerGroups" + "Tests" ] }, "put": { "consumes": [ "application/json" ], - "description": "Creates or updates a runnergroup with the provided parameters.", - "operationId": "apply-runnergroup", + "description": "Creates or updates a test with the provided parameters.", + "operationId": "apply-test", "parameters": [ { "description": "Signadot Org Name", @@ -3346,20 +4407,19 @@ "x-example": "my-company" }, { - "description": "RunnerGroup Name", + "description": "Test Name", "in": "path", - "name": "runnergroupName", + "name": "testName", "required": true, - "type": "string", - "x-example": "my-runnergroup" + "type": "string" }, { - "description": "Request to create or update runnergroup", + "description": "Test Spec", "in": "body", "name": "data", "required": true, "schema": { - "$ref": "#/definitions/JobRunnerGroup" + "$ref": "#/definitions/TestSpec" } } ], @@ -3370,7 +4430,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/JobRunnerGroup" + "$ref": "#/definitions/Test" } }, "400": { @@ -3397,19 +4457,19 @@ "ApiKeyAuth": [] } ], - "summary": "Create or update a runnergroup", + "summary": "Create or update a Test", "tags": [ - "RunnerGroups" + "Tests" ] } }, - "/orgs/{orgName}/sandboxes": { + "/orgs/{orgName}/tests/{testName}/executions/": { "get": { "consumes": [ "application/json" ], - "description": "List all sandboxes under the specified Signadot org.", - "operationId": "list-sandboxes", + "description": "List test executions for a given test", + "operationId": "list-test-executions", "parameters": [ { "description": "Signadot Org Name", @@ -3418,6 +4478,13 @@ "required": true, "type": "string", "x-example": "my-company" + }, + { + "description": "Test name", + "in": "path", + "name": "testName", + "required": true, + "type": "string" } ], "produces": [ @@ -3428,7 +4495,7 @@ "description": "OK", "schema": { "items": { - "$ref": "#/definitions/Sandbox" + "$ref": "#/definitions/TestExecution" }, "type": "array" } @@ -3457,19 +4524,17 @@ "ApiKeyAuth": [] } ], - "summary": "List sandboxes", + "summary": "List Test Executions", "tags": [ - "Sandboxes" + "TestExecutions" ] - } - }, - "/orgs/{orgName}/sandboxes/{sandboxName}": { - "delete": { + }, + "post": { "consumes": [ "application/json" ], - "description": "Delete a given sandbox.", - "operationId": "delete-sandbox", + "description": "Creates a test with the provided parameters.", + "operationId": "create-test-execution", "parameters": [ { "description": "Signadot Org Name", @@ -3480,18 +4545,20 @@ "x-example": "my-company" }, { - "description": "Sandbox Name", + "description": "Test name", "in": "path", - "name": "sandboxName", + "name": "testName", "required": true, - "type": "string", - "x-example": "my-sandbox" + "type": "string" }, { - "description": "force", - "in": "query", - "name": "force", - "type": "boolean" + "description": "Request to create a test execution", + "in": "body", + "name": "data", + "required": true, + "schema": { + "$ref": "#/definitions/TestExecutionSpec" + } } ], "produces": [ @@ -3501,7 +4568,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmptyResponse" + "$ref": "#/definitions/TestExecution" } }, "400": { @@ -3528,17 +4595,19 @@ "ApiKeyAuth": [] } ], - "summary": "Delete a sandbox", + "summary": "Create a Test Execution", "tags": [ - "Sandboxes" + "TestExecutions" ] - }, + } + }, + "/orgs/{orgName}/tests/{testName}/executions/{executionName}": { "get": { "consumes": [ "application/json" ], - "description": "Fetch the details about a given sandbox.", - "operationId": "get-sandbox", + "description": "Fetch the details about a given test execution.", + "operationId": "get-test-execution", "parameters": [ { "description": "Signadot Org Name", @@ -3549,12 +4618,18 @@ "x-example": "my-company" }, { - "description": "Sandbox Name", + "description": "Test Name", "in": "path", - "name": "sandboxName", + "name": "testName", "required": true, - "type": "string", - "x-example": "my-sandbox" + "type": "string" + }, + { + "description": "Test Execution Name", + "in": "path", + "name": "executionName", + "required": true, + "type": "string" } ], "produces": [ @@ -3564,7 +4639,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Sandbox" + "$ref": "#/definitions/TestExecution" } }, "400": { @@ -3591,17 +4666,19 @@ "ApiKeyAuth": [] } ], - "summary": "Get a sandbox", + "summary": "Get a test execution", "tags": [ - "Sandboxes" + "TestExecutions" ] - }, - "put": { + } + }, + "/orgs/{orgName}/tests/{testName}/executions/{executionName}/cancel": { + "post": { "consumes": [ "application/json" ], - "description": "Creates or updates a sandbox with the provided parameters.", - "operationId": "apply-sandbox", + "description": "Cancel a given test execution.", + "operationId": "cancel-test-execution", "parameters": [ { "description": "Signadot Org Name", @@ -3612,21 +4689,89 @@ "x-example": "my-company" }, { - "description": "Sandbox Name", + "description": "Test Name", "in": "path", - "name": "sandboxName", + "name": "testName", "required": true, - "type": "string", - "x-example": "my-sandbox" + "type": "string" }, { - "description": "Request to create sandbox", - "in": "body", - "name": "data", + "description": "Test Execution Name", + "in": "path", + "name": "executionName", "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/Sandbox" + "$ref": "#/definitions/EmptyResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResponse" } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "502": { + "description": "Bad Gateway", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Cancel a test execution", + "tags": [ + "TestExecutions" + ] + } + }, + "/orgs/{orgName}/tests/{testName}/executions/{executionName}/traffic-diff": { + "get": { + "consumes": [ + "application/json" + ], + "description": "Get the full traffic diff of a test execution", + "operationId": "test-execution-traffic-diff", + "parameters": [ + { + "description": "Signadot Org Name", + "in": "path", + "name": "orgName", + "required": true, + "type": "string", + "x-example": "my-company" + }, + { + "description": "Test Name", + "in": "path", + "name": "testName", + "required": true, + "type": "string" + }, + { + "description": "Test Execution Name", + "in": "path", + "name": "executionName", + "required": true, + "type": "string" } ], "produces": [ @@ -3636,7 +4781,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Sandbox" + "$ref": "#/definitions/TrafficDiffResult" } }, "400": { @@ -3663,9 +4808,9 @@ "ApiKeyAuth": [] } ], - "summary": "Create or update a sandbox", + "summary": "Get the full traffic diff of a test execution", "tags": [ - "Sandboxes" + "TestExecutions" ] } } @@ -3678,4 +4823,4 @@ } }, "swagger": "2.0" -} +} \ No newline at end of file