{ "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/bacalhau-project/bacalhau.", "title": "Bacalhau API", "contact": { "name": "Bacalhau Team", "url": "https://github.com/bacalhau-project/bacalhau", "email": "team@bacalhau.org" }, "license": { "name": "Apache 2.0", "url": "https://github.com/bacalhau-project/bacalhau/blob/main/LICENSE" } }, "host": "bootstrap.production.bacalhau.org:1234", "basePath": "/", "paths": { "/": { "get": { "produces": [ "text/plain" ], "tags": [ "Utils" ], "operationId": "home", "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/api/v1/agent/alive": { "get": { "produces": [ "text/plain" ], "tags": [ "Ops" ], "operationId": "agent/alive", "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/api/v1/agent/debug": { "get": { "produces": [ "application/json" ], "tags": [ "Ops" ], "summary": "Returns debug information on what the current node is doing.", "operationId": "agent/debug", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.DebugInfo" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/agent/node": { "get": { "produces": [ "application/json" ], "tags": [ "Ops" ], "summary": "Returns the info of the node.", "operationId": "agent/node", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.NodeInfo" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/agent/version": { "get": { "description": "See https://github.com/bacalhau-project/bacalhau/releases for a complete list of `gitversion` tags.", "produces": [ "application/json" ], "tags": [ "Ops" ], "summary": "Returns the build version running on the server.", "operationId": "agent/version", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.GetVersionResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/compute/approve": { "get": { "produces": [ "application/json" ], "tags": [ "Compute Node" ], "summary": "Approves a job to be run on this compute node.", "operationId": "apiServer/approver", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "403": { "description": "Forbidden", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/compute/debug": { "get": { "produces": [ "application/json" ], "tags": [ "Compute Node" ], "summary": "Returns debug information on what the current node is doing.", "operationId": "apiServer/debug", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/healthz": { "get": { "produces": [ "application/json" ], "tags": [ "Utils" ], "operationId": "healthz", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/types.HealthInfo" } } } } }, "/api/v1/id": { "get": { "produces": [ "text/plain" ], "tags": [ "Utils" ], "summary": "Returns the id of the host node.", "operationId": "id", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/livez": { "get": { "produces": [ "text/plain" ], "tags": [ "Utils" ], "operationId": "livez", "responses": { "200": { "description": "TODO", "schema": { "type": "string" } } } } }, "/api/v1/node_info": { "get": { "produces": [ "application/json" ], "tags": [ "Utils" ], "summary": "Returns the info of the node.", "operationId": "nodeInfo", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.NodeInfo" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs": { "get": { "description": "Returns a list of jobs.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns a list of jobs.", "operationId": "orchestrator/listJobs", "parameters": [ { "type": "string", "description": "Namespace to get the jobs for", "name": "namespace", "in": "query" }, { "type": "integer", "description": "Limit the number of jobs returned", "name": "limit", "in": "query" }, { "type": "string", "description": "Token to get the next page of jobs", "name": "next_token", "in": "query" }, { "type": "boolean", "description": "Reverse the order of the jobs", "name": "reverse", "in": "query" }, { "type": "string", "description": "Order the jobs by the given field", "name": "order_by", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.ListJobsResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "put": { "description": "Submits a job to the orchestrator.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Submits a job to the orchestrator.", "operationId": "orchestrator/putJob", "parameters": [ { "description": "Job to submit", "name": "putJobRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/apimodels.PutJobRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.PutJobResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs/{id}": { "get": { "description": "Returns a job.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns a job.", "operationId": "orchestrator/getJob", "parameters": [ { "type": "string", "description": "ID to get the job for", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Takes history and executions as options. If empty will not include anything else.", "name": "include", "in": "query" }, { "type": "integer", "description": "Number of history or exeuctions to fetch. Should be used in conjugation with include", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.GetJobResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "delete": { "description": "Stops a job.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Stops a job.", "operationId": "orchestrator/stopJob", "parameters": [ { "type": "string", "description": "ID to stop the job for", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Reason for stopping the job", "name": "reason", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.StopJobResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs/{id}/executions": { "get": { "description": "Returns the executions of a job.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns the executions of a job.", "operationId": "orchestrator/jobExecutions", "parameters": [ { "type": "string", "description": "ID to get the job executions for", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Namespace to get the jobs for", "name": "namespace", "in": "query" }, { "type": "integer", "description": "Limit the number of executions returned", "name": "limit", "in": "query" }, { "type": "string", "description": "Token to get the next page of executions", "name": "next_token", "in": "query" }, { "type": "boolean", "description": "Reverse the order of the executions", "name": "reverse", "in": "query" }, { "type": "string", "description": "Order the executions by the given field", "name": "order_by", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.ListJobExecutionsResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs/{id}/history": { "get": { "description": "Returns the history of a job.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns the history of a job.", "operationId": "orchestrator/jobHistory", "parameters": [ { "type": "string", "description": "ID to get the job history for", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Only return history since this time", "name": "since", "in": "query" }, { "type": "string", "description": "Only return history of this event type", "name": "event_type", "in": "query" }, { "type": "string", "description": "Only return history of this execution ID", "name": "execution_id", "in": "query" }, { "type": "string", "description": "Only return history of this node ID", "name": "node_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.ListJobHistoryResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs/{id}/logs": { "get": { "description": "Shows the output from the job specified by `id`\nThe output will be continuous until either, the client disconnects or the execution completes.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Displays the logs for a current job/execution", "operationId": "orchestrator/logs", "parameters": [ { "type": "string", "description": "ID to get the job logs for", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Fetch logs for a specific execution", "name": "execution_id", "in": "query" }, { "type": "boolean", "description": "Fetch historical logs", "name": "tail", "in": "query" }, { "type": "boolean", "description": "Follow the logs", "name": "follow", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/jobs/{id}/results": { "get": { "description": "Returns the results of a job.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns the results of a job.", "operationId": "orchestrator/jobResults", "parameters": [ { "type": "string", "description": "ID to get the job results for", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.ListJobResultsResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/nodes": { "get": { "description": "Returns a list of orchestrator nodes.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Returns a list of orchestrator nodes.", "operationId": "orchestrator/listNodes", "parameters": [ { "type": "integer", "description": "Limit the number of node returned", "name": "limit", "in": "query" }, { "type": "string", "description": "Token to get the next page of nodes", "name": "next_token", "in": "query" }, { "type": "boolean", "description": "Reverse the order of the nodes", "name": "reverse", "in": "query" }, { "type": "string", "description": "Order the nodes by given field", "name": "order_by", "in": "query" }, { "type": "string", "description": "Filter Approval", "name": "filter_approval", "in": "query" }, { "type": "string", "description": "Filter Status", "name": "filter-status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.ListNodesResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "description": "Update an orchestrator node.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Update an orchestrator node.", "operationId": "orchestrator/updateNode", "parameters": [ { "type": "string", "description": "ID of the orchestrator node.", "name": "id", "in": "path", "required": true }, { "description": "Put Node Request", "name": "putNodeRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/apimodels.PutNodeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.PutNodeResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/orchestrator/nodes/{id}": { "get": { "description": "Get an orchestrator node", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "Get an orchestrator node", "operationId": "orchestrator/getNode", "parameters": [ { "type": "string", "description": "ID of the orchestrator node to fetch for.", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apimodels.GetNodeResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/version": { "post": { "description": "See https://github.com/bacalhau-project/bacalhau/releases for a complete list of `gitversion` tags.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Misc" ], "summary": "Returns the build version running on the server.", "operationId": "apiServer/version", "parameters": [ { "description": "Request must specify a `client_id`. To retrieve your `client_id`, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run `bacalhau describe \u003cjob-id\u003e` and fetch the `ClientID` field.", "name": "VersionRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/shared.VersionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/shared.VersionResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } } }, "definitions": { "apimodels.GetJobResponse": { "type": "object", "properties": { "Executions": { "$ref": "#/definitions/apimodels.ListJobExecutionsResponse" }, "History": { "$ref": "#/definitions/apimodels.ListJobHistoryResponse" }, "Job": { "$ref": "#/definitions/models.Job" } } }, "apimodels.GetNodeResponse": { "type": "object", "properties": { "node": { "$ref": "#/definitions/models.NodeState" } } }, "apimodels.GetVersionResponse": { "type": "object", "properties": { "BuildDate": { "type": "string", "example": "2022-11-16T14:03:31Z" }, "GOARCH": { "type": "string", "example": "amd64" }, "GOOS": { "type": "string", "example": "linux" }, "GitCommit": { "type": "string", "example": "d612b63108f2b5ce1ab2b9e02444eb1dac1d922d" }, "GitVersion": { "type": "string", "example": "v0.3.12" }, "Major": { "type": "string", "example": "0" }, "Minor": { "type": "string", "example": "3" } } }, "apimodels.HTTPCredential": { "type": "object", "properties": { "params": { "description": "For authorization schemes that provide multiple values, a map of names to\nvalues providing the credential", "type": "object", "additionalProperties": { "type": "string" } }, "scheme": { "description": "An HTTP authorization scheme, such as one registered with IANA\nhttps://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml", "type": "string" }, "value": { "description": "For authorization schemes that only provide a single value, such as\nBasic, the single string value providing the credential", "type": "string" } } }, "apimodels.ListJobExecutionsResponse": { "type": "object", "properties": { "Items": { "type": "array", "items": { "$ref": "#/definitions/models.Execution" } }, "NextToken": { "type": "string" } } }, "apimodels.ListJobHistoryResponse": { "type": "object", "properties": { "Items": { "type": "array", "items": { "$ref": "#/definitions/models.JobHistory" } }, "NextToken": { "type": "string" } } }, "apimodels.ListJobResultsResponse": { "type": "object", "properties": { "Items": { "type": "array", "items": { "$ref": "#/definitions/models.SpecConfig" } }, "NextToken": { "type": "string" } } }, "apimodels.ListJobsResponse": { "type": "object", "properties": { "Items": { "type": "array", "items": { "$ref": "#/definitions/models.Job" } }, "NextToken": { "type": "string" } } }, "apimodels.ListNodesResponse": { "type": "object", "properties": { "NextToken": { "type": "string" }, "nodes": { "type": "array", "items": { "$ref": "#/definitions/models.NodeState" } } } }, "apimodels.PutJobRequest": { "type": "object", "properties": { "Job": { "$ref": "#/definitions/models.Job" }, "credential": { "$ref": "#/definitions/apimodels.HTTPCredential" }, "idempotencyToken": { "type": "string" }, "namespace": { "type": "string" } } }, "apimodels.PutJobResponse": { "type": "object", "properties": { "EvaluationID": { "type": "string" }, "JobID": { "type": "string" }, "Warnings": { "type": "array", "items": { "type": "string" } } } }, "apimodels.PutNodeRequest": { "type": "object", "properties": { "action": { "type": "string" }, "credential": { "$ref": "#/definitions/apimodels.HTTPCredential" }, "idempotencyToken": { "type": "string" }, "message": { "type": "string" }, "namespace": { "type": "string" }, "nodeID": { "type": "string" } } }, "apimodels.PutNodeResponse": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } }, "apimodels.StopJobResponse": { "type": "object", "properties": { "EvaluationID": { "type": "string" } } }, "model.DebugInfo": { "type": "object", "properties": { "component": { "type": "string" }, "info": {} } }, "models.AllocatedResources": { "type": "object", "properties": { "Tasks": { "type": "object", "additionalProperties": { "$ref": "#/definitions/models.Resources" } } } }, "models.BuildVersionInfo": { "type": "object", "properties": { "BuildDate": { "type": "string", "example": "2022-11-16T14:03:31Z" }, "GOARCH": { "type": "string", "example": "amd64" }, "GOOS": { "type": "string", "example": "linux" }, "GitCommit": { "type": "string", "example": "d612b63108f2b5ce1ab2b9e02444eb1dac1d922d" }, "GitVersion": { "type": "string", "example": "v0.3.12" }, "Major": { "type": "string", "example": "0" }, "Minor": { "type": "string", "example": "3" } } }, "models.ComputeNodeInfo": { "type": "object", "properties": { "AvailableCapacity": { "$ref": "#/definitions/models.Resources" }, "EnqueuedExecutions": { "type": "integer" }, "ExecutionEngines": { "type": "array", "items": { "type": "string" } }, "MaxCapacity": { "$ref": "#/definitions/models.Resources" }, "MaxJobRequirements": { "$ref": "#/definitions/models.Resources" }, "Publishers": { "type": "array", "items": { "type": "string" } }, "QueueCapacity": { "$ref": "#/definitions/models.Resources" }, "RunningExecutions": { "type": "integer" }, "StorageSources": { "type": "array", "items": { "type": "string" } } } }, "models.Event": { "type": "object", "properties": { "Details": { "description": "Any additional metadata that the system or user may need to know about\nthe event in order to handle it properly.", "type": "object", "additionalProperties": { "type": "string" } }, "Message": { "description": "A human-readable string giving the user all the information they need to\nunderstand and respond to an Event, if a response is required.", "type": "string" }, "Timestamp": { "description": "The moment the event occurred, which may be different to the moment it\nwas recorded.", "type": "string" }, "Topic": { "description": "The topic of the event. See the documentation on EventTopic.", "type": "string" } } }, "models.Execution": { "type": "object", "properties": { "AllocatedResources": { "description": "AllocatedResources is the total resources allocated for the execution tasks.", "allOf": [ { "$ref": "#/definitions/models.AllocatedResources" } ] }, "ComputeState": { "description": "ComputeState observed state of the execution on the compute node", "allOf": [ { "$ref": "#/definitions/models.State-models_ExecutionStateType" } ] }, "CreateTime": { "description": "CreateTime is the time the execution has finished scheduling and been\nverified by the plan applier.", "type": "integer" }, "DesiredState": { "description": "DesiredState of the execution on the compute node", "allOf": [ { "$ref": "#/definitions/models.State-models_ExecutionDesiredStateType" } ] }, "EvalID": { "description": "ID of the evaluation that generated this execution", "type": "string" }, "FollowupEvalID": { "description": "FollowupEvalID captures a follow up evaluation created to handle a failed execution\nthat can be rescheduled in the future", "type": "string" }, "ID": { "description": "ID of the execution (UUID)", "type": "string" }, "Job": { "description": "TODO: evaluate using a copy of the job instead of a pointer", "allOf": [ { "$ref": "#/definitions/models.Job" } ] }, "JobID": { "description": "Job is the parent job of the task being allocated.\nThis is copied at execution time to avoid issues if the job\ndefinition is updated.", "type": "string" }, "ModifyTime": { "description": "ModifyTime is the time the execution was last updated.", "type": "integer" }, "Name": { "description": "Name is a logical name of the execution.", "type": "string" }, "Namespace": { "description": "Namespace is the namespace the execution is created in", "type": "string" }, "NextExecution": { "description": "NextExecution is the execution that this execution is being replaced by", "type": "string" }, "NodeID": { "description": "NodeID is the node this is being placed on", "type": "string" }, "PreviousExecution": { "description": "PreviousExecution is the execution that this execution is replacing", "type": "string" }, "PublishedResult": { "description": "the published results for this execution", "allOf": [ { "$ref": "#/definitions/models.SpecConfig" } ] }, "Revision": { "description": "Revision is increment each time the execution is updated.", "type": "integer" }, "RunOutput": { "description": "RunOutput is the output of the run command\nTODO: evaluate removing this from execution spec in favour of calling `bacalhau logs`", "allOf": [ { "$ref": "#/definitions/models.RunCommandResult" } ] } } }, "models.ExecutionDesiredStateType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "ExecutionDesiredStatePending", "ExecutionDesiredStateRunning", "ExecutionDesiredStateStopped" ] }, "models.ExecutionStateType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "x-enum-comments": { "ExecutionStateBidAccepted": "aka running" }, "x-enum-varnames": [ "ExecutionStateUndefined", "ExecutionStateNew", "ExecutionStateAskForBid", "ExecutionStateAskForBidAccepted", "ExecutionStateAskForBidRejected", "ExecutionStateBidAccepted", "ExecutionStateBidRejected", "ExecutionStateCompleted", "ExecutionStateFailed", "ExecutionStateCancelled" ] }, "models.GPU": { "type": "object", "properties": { "index": { "description": "Self-reported index of the device in the system", "type": "integer" }, "memory": { "description": "Total GPU memory in mebibytes (MiB)", "type": "integer" }, "name": { "description": "Model name of the GPU e.g. Tesla T4", "type": "string" }, "pciaddress": { "description": "PCI address of the device, in the format AAAA:BB:CC.C\nUsed to discover the correct device rendering cards", "type": "string" }, "vendor": { "description": "Maker of the GPU, e.g. NVidia, AMD, Intel", "allOf": [ { "$ref": "#/definitions/models.GPUVendor" } ] } } }, "models.GPUVendor": { "type": "string", "enum": [ "NVIDIA", "AMD/ATI", "Intel" ], "x-enum-varnames": [ "GPUVendorNvidia", "GPUVendorAMDATI", "GPUVendorIntel" ] }, "models.InputSource": { "type": "object", "properties": { "Alias": { "description": "Alias is an optional reference to this input source that can be used for\ndynamic linking to this input. (e.g. dynamic import in wasm by alias)", "type": "string" }, "Source": { "description": "Source is the source of the artifact to be downloaded, e.g a URL, S3 bucket, etc.", "allOf": [ { "$ref": "#/definitions/models.SpecConfig" } ] }, "Target": { "description": "Target is the path where the artifact should be mounted on", "type": "string" } } }, "models.Job": { "type": "object", "properties": { "Constraints": { "description": "Constraints is a selector which must be true for the compute node to run this job.", "type": "array", "items": { "$ref": "#/definitions/models.LabelSelectorRequirement" } }, "Count": { "description": "Count is the number of replicas that should be scheduled.", "type": "integer" }, "CreateTime": { "type": "integer" }, "ID": { "description": "ID is a unique identifier assigned to this job.\nIt helps to distinguish jobs with the same name after they have been deleted and re-created.\nThe ID is generated by the server and should not be set directly by the client.", "type": "string" }, "Labels": { "description": "Labels is used to associate arbitrary labels with this job, which can be used\nfor filtering.\nkey=value", "type": "object", "additionalProperties": { "type": "string" } }, "Meta": { "description": "Meta is used to associate arbitrary metadata with this job.", "type": "object", "additionalProperties": { "type": "string" } }, "ModifyTime": { "type": "integer" }, "Name": { "description": "Name is the logical name of the job used to refer to it.\nSubmitting a job with the same name as an existing job will result in an\nupdate to the existing job.", "type": "string" }, "Namespace": { "description": "Namespace is the namespace this job is running in.", "type": "string" }, "Priority": { "description": "Priority defines the scheduling priority of this job.", "type": "integer" }, "Revision": { "description": "Revision is a per-job monotonically increasing revision number that is incremented\non each update to the job's state or specification", "type": "integer" }, "State": { "description": "State is the current state of the job.", "allOf": [ { "$ref": "#/definitions/models.State-models_JobStateType" } ] }, "Tasks": { "type": "array", "items": { "$ref": "#/definitions/models.Task" } }, "Type": { "description": "Type is the type of job this is, e.g. \"daemon\" or \"batch\".", "type": "string" }, "Version": { "description": "Version is a per-job monotonically increasing version number that is incremented\non each job specification update.", "type": "integer" } } }, "models.JobHistory": { "type": "object", "properties": { "Comment": { "type": "string" }, "Event": { "$ref": "#/definitions/models.Event" }, "ExecutionID": { "type": "string" }, "ExecutionState": { "$ref": "#/definitions/models.StateChange-models_ExecutionStateType" }, "JobID": { "type": "string" }, "JobState": { "$ref": "#/definitions/models.StateChange-models_JobStateType" }, "NewRevision": { "type": "integer" }, "NodeID": { "type": "string" }, "Time": { "type": "string" }, "Type": { "$ref": "#/definitions/models.JobHistoryType" } } }, "models.JobHistoryType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "JobHistoryTypeUndefined", "JobHistoryTypeJobLevel", "JobHistoryTypeExecutionLevel" ] }, "models.JobStateType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "x-enum-varnames": [ "JobStateTypeUndefined", "JobStateTypePending", "JobStateTypeQueued", "JobStateTypeRunning", "JobStateTypeCompleted", "JobStateTypeFailed", "JobStateTypeStopped" ] }, "models.LabelSelectorRequirement": { "type": "object", "properties": { "Key": { "description": "key is the label key that the selector applies to.", "type": "string" }, "Operator": { "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", "allOf": [ { "$ref": "#/definitions/selection.Operator" } ] }, "Values": { "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic", "type": "array", "items": { "type": "string" } } } }, "models.Network": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "NetworkNone", "NetworkFull", "NetworkHTTP" ] }, "models.NetworkConfig": { "type": "object", "properties": { "Domains": { "type": "array", "items": { "type": "string" } }, "Type": { "$ref": "#/definitions/models.Network" } } }, "models.NodeConnectionState": { "type": "object", "properties": { "connection": { "type": "integer", "enum": [ 0, 1 ], "x-enum-varnames": [ "connected", "disconnected" ] } } }, "models.NodeInfo": { "type": "object", "properties": { "BacalhauVersion": { "$ref": "#/definitions/models.BuildVersionInfo" }, "ComputeNodeInfo": { "$ref": "#/definitions/models.ComputeNodeInfo" }, "Labels": { "type": "object", "additionalProperties": { "type": "string" } }, "NodeID": { "description": "TODO replace all access on this field with the `ID()` method", "type": "string" }, "NodeType": { "$ref": "#/definitions/models.NodeType" } } }, "models.NodeMembershipState": { "type": "object", "properties": { "membership": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "x-enum-varnames": [ "unknown", "pending", "approved", "rejected" ] } } }, "models.NodeState": { "type": "object", "properties": { "Connection": { "$ref": "#/definitions/models.NodeConnectionState" }, "Info": { "$ref": "#/definitions/models.NodeInfo" }, "Membership": { "$ref": "#/definitions/models.NodeMembershipState" } } }, "models.NodeType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "nodeTypeUndefined", "NodeTypeRequester", "NodeTypeCompute" ] }, "models.Resources": { "type": "object", "properties": { "CPU": { "description": "CPU units", "type": "number" }, "Disk": { "description": "Disk in bytes", "type": "integer" }, "GPU": { "description": "GPU units", "type": "integer" }, "GPUs": { "description": "GPU details", "type": "array", "items": { "$ref": "#/definitions/models.GPU" } }, "Memory": { "description": "Memory in bytes", "type": "integer" } } }, "models.ResourcesConfig": { "type": "object", "properties": { "CPU": { "description": "CPU https://github.com/BTBurke/k8sresource string", "type": "string" }, "Disk": { "description": "Memory github.com/dustin/go-humanize string", "type": "string" }, "GPU": { "type": "string" }, "Memory": { "description": "Memory github.com/dustin/go-humanize string", "type": "string" } } }, "models.ResultPath": { "type": "object", "properties": { "Name": { "description": "Name", "type": "string" }, "Path": { "description": "The path to the file/dir", "type": "string" } } }, "models.RunCommandResult": { "type": "object", "properties": { "ErrorMsg": { "description": "Runner error", "type": "string" }, "ExitCode": { "description": "exit code of the run.", "type": "integer" }, "StderrTruncated": { "description": "bool describing if stderr was truncated", "type": "boolean" }, "Stdout": { "description": "stdout of the run. Yaml provided for `describe` output", "type": "string" }, "StdoutTruncated": { "description": "bool describing if stdout was truncated", "type": "boolean" }, "stderr": { "description": "stderr of the run.", "type": "string" } } }, "models.SpecConfig": { "type": "object", "properties": { "Params": { "description": "Params is a map of the config params", "type": "object", "additionalProperties": true }, "Type": { "description": "Type of the config", "type": "string" } } }, "models.State-models_ExecutionDesiredStateType": { "type": "object", "properties": { "Message": { "description": "Message is a human readable message describing the state.", "type": "string" }, "StateType": { "description": "StateType is the current state of the object.", "allOf": [ { "$ref": "#/definitions/models.ExecutionDesiredStateType" } ] } } }, "models.State-models_ExecutionStateType": { "type": "object", "properties": { "Message": { "description": "Message is a human readable message describing the state.", "type": "string" }, "StateType": { "description": "StateType is the current state of the object.", "allOf": [ { "$ref": "#/definitions/models.ExecutionStateType" } ] } } }, "models.State-models_JobStateType": { "type": "object", "properties": { "Message": { "description": "Message is a human readable message describing the state.", "type": "string" }, "StateType": { "description": "StateType is the current state of the object.", "allOf": [ { "$ref": "#/definitions/models.JobStateType" } ] } } }, "models.StateChange-models_ExecutionStateType": { "type": "object", "properties": { "New": { "$ref": "#/definitions/models.ExecutionStateType" }, "Previous": { "$ref": "#/definitions/models.ExecutionStateType" } } }, "models.StateChange-models_JobStateType": { "type": "object", "properties": { "New": { "$ref": "#/definitions/models.JobStateType" }, "Previous": { "$ref": "#/definitions/models.JobStateType" } } }, "models.Task": { "type": "object", "properties": { "Engine": { "$ref": "#/definitions/models.SpecConfig" }, "Env": { "description": "Map of environment variables to be used by the driver", "type": "object", "additionalProperties": { "type": "string" } }, "InputSources": { "description": "InputSources is a list of remote artifacts to be downloaded before running the task\nand mounted into the task.", "type": "array", "items": { "$ref": "#/definitions/models.InputSource" } }, "Meta": { "description": "Meta is used to associate arbitrary metadata with this task.", "type": "object", "additionalProperties": { "type": "string" } }, "Name": { "description": "Name of the task", "type": "string" }, "Network": { "$ref": "#/definitions/models.NetworkConfig" }, "Publisher": { "$ref": "#/definitions/models.SpecConfig" }, "Resources": { "description": "ResourcesConfig is the resources needed by this task", "allOf": [ { "$ref": "#/definitions/models.ResourcesConfig" } ] }, "ResultPaths": { "description": "ResultPaths is a list of task volumes to be included in the task's published result", "type": "array", "items": { "$ref": "#/definitions/models.ResultPath" } }, "Timeouts": { "$ref": "#/definitions/models.TimeoutConfig" } } }, "models.TimeoutConfig": { "type": "object", "properties": { "ExecutionTimeout": { "description": "ExecutionTimeout is the maximum amount of time a task is allowed to run in seconds.\nZero means no timeout, such as for a daemon task.", "type": "integer" }, "QueueTimeout": { "description": "QueueTimeout is the maximum amount of time a task is allowed to wait in the orchestrator\nqueue in seconds before being scheduled. Zero means no timeout.", "type": "integer" }, "TotalTimeout": { "description": "TotalTimeout is the maximum amount of time a task is allowed to complete in seconds.\nThis includes the time spent in the queue, the time spent executing and the time spent retrying.\nZero means no timeout.", "type": "integer" } } }, "selection.Operator": { "type": "string", "enum": [ "!", "=", "==", "in", "!=", "notin", "exists", "gt", "lt" ], "x-enum-varnames": [ "DoesNotExist", "Equals", "DoubleEquals", "In", "NotEquals", "NotIn", "Exists", "GreaterThan", "LessThan" ] }, "shared.VersionRequest": { "type": "object", "properties": { "client_id": { "type": "string", "example": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51" } } }, "shared.VersionResponse": { "type": "object", "properties": { "build_version_info": { "$ref": "#/definitions/models.BuildVersionInfo" } } }, "types.FreeSpace": { "type": "object", "properties": { "root": { "$ref": "#/definitions/types.MountStatus" }, "tmp": { "$ref": "#/definitions/types.MountStatus" } } }, "types.HealthInfo": { "type": "object", "properties": { "FreeSpace": { "$ref": "#/definitions/types.FreeSpace" } } }, "types.MountStatus": { "type": "object", "properties": { "All": { "type": "integer" }, "Free": { "type": "integer" }, "Used": { "type": "integer" } } } } }