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 Ops 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: localhost:1234 basePath: / schemes: - http tags: - name: Ops paths: /api/v1/agent/alive: get: produces: - text/plain tags: - Ops operationId: agent/alive responses: '200': description: OK schema: $ref: '#/definitions/apimodels.IsAliveResponse' /api/v1/agent/authconfig: get: produces: - application/json tags: - Ops summary: Returns the OAuth2 configuration of the node. operationId: agent/authconfig responses: '200': description: OK schema: $ref: '#/definitions/apimodels.GetAgentNodeAuthConfigResponse' '500': description: Internal Server Error schema: type: string /api/v1/agent/config: get: produces: - application/json tags: - Ops summary: Returns the current configuration of the node. operationId: agent/config responses: '200': description: OK schema: $ref: '#/definitions/types.Bacalhau' '500': description: Internal Server Error 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/models.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 definitions: types.Orchestrator: type: object properties: Advertise: description: Advertise specifies URL to advertise to other servers. type: string Auth: description: Auth specifies the authentication configuration for compute nodes to connect to the orchestrator. allOf: - $ref: '#/definitions/types.OrchestratorAuth' Cluster: $ref: '#/definitions/types.Cluster' Enabled: description: Enabled indicates whether the orchestrator node is active and available for job submission. type: boolean EvaluationBroker: $ref: '#/definitions/types.EvaluationBroker' Host: description: Host specifies the hostname or IP address on which the Orchestrator server listens for compute node connections. type: string NodeManager: $ref: '#/definitions/types.NodeManager' Port: description: Host specifies the port number on which the Orchestrator server listens for compute node connections. type: integer Scheduler: $ref: '#/definitions/types.Scheduler' SupportReverseProxy: description: SupportReverseProxy configures the orchestrator node to run behind a reverse proxy type: boolean TLS: description: TLS specifies the TLS related configuration on the orchestrator for when compute nodes need to connect. allOf: - $ref: '#/definitions/types.OrchestratorTLS' types.IPFSStorage: type: object properties: Endpoint: description: Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 type: string types.BatchTaskDefaultConfig: type: object properties: Publisher: $ref: '#/definitions/types.DefaultPublisherConfig' Resources: $ref: '#/definitions/types.ResourcesConfig' Timeouts: $ref: '#/definitions/types.TaskTimeoutConfig' types.ResourceScaler: type: object properties: CPU: description: 'CPU specifies the amount of CPU a compute node allocates for running jobs. It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "100m").' type: string Disk: description: 'Disk specifies the amount of Disk space a compute node allocates for running jobs. It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "10Gi").' type: string GPU: description: 'GPU specifies the amount of GPU a compute node allocates for running jobs. It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "1"). Note: When using percentages, the result is always rounded up to the nearest whole GPU.' type: string Memory: description: 'Memory specifies the amount of Memory a compute node allocates for running jobs. It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "1Gi").' type: string types.NodeManager: type: object properties: DisconnectTimeout: description: DisconnectTimeout specifies how long to wait before considering a node disconnected. type: integer ManualApproval: description: ManualApproval, if true, requires manual approval for new compute nodes joining the cluster. type: boolean types.Docker: type: object properties: ManifestCache: description: ManifestCache specifies the settings for the Docker manifest cache. allOf: - $ref: '#/definitions/types.DockerManifestCache' types.TLS: type: object properties: AutoCert: description: AutoCert specifies the domain for automatic certificate generation. type: string AutoCertCachePath: description: AutoCertCachePath specifies the directory to cache auto-generated certificates. type: string CAFile: description: CAFile specifies the path to the Certificate Authority file. type: string CertFile: description: CertFile specifies the path to the TLS certificate file. type: string Insecure: description: Insecure allows insecure TLS connections (e.g., self-signed certificates). type: boolean KeyFile: description: KeyFile specifies the path to the TLS private key file. type: string SelfSigned: description: SelfSigned indicates whether to use a self-signed certificate. type: boolean UseTLS: description: UseTLS indicates whether to use TLS for client connections. type: boolean types.NetworkConfig: type: object properties: AdvertisedAddress: description: 'AdvertisedAddress is the address that this compute node advertises to other nodes. If empty, a default address will be auto-discovered.' type: string PortRangeEnd: description: PortRangeEnd is the last port in the range (inclusive) that can be allocated to jobs type: integer PortRangeStart: description: PortRangeStart is the first port in the range (inclusive) that can be allocated to jobs type: integer types.TaskTimeoutConfig: type: object properties: ExecutionTimeout: description: ExecutionTimeout is the maximum time allowed for task execution type: integer TotalTimeout: description: TotalTimeout is the maximum total time allowed for a task type: integer types.AuthUser: type: object properties: APIKey: type: string Alias: type: string Capabilities: type: array items: $ref: '#/definitions/types.Capability' Password: type: string Username: type: string types.IpfsDownloader: type: object properties: Endpoint: description: Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 type: string types.EnvConfig: type: object properties: AllowList: description: 'AllowList specifies which host environment variables can be forwarded to jobs. Supports glob patterns (e.g., "AWS_*", "API_*")' type: array items: type: string types.DockerManifestCache: type: object properties: Refresh: description: Refresh specifies the refresh interval for cache entries. type: integer Size: description: Size specifies the size of the Docker manifest cache. type: integer TTL: description: TTL specifies the time-to-live duration for cache entries. type: integer models.NodeType: type: integer enum: - 0 - 1 - 2 x-enum-varnames: - nodeTypeUndefined - NodeTypeRequester - NodeTypeCompute types.WebUI: type: object properties: Backend: description: 'Backend specifies the address and port of the backend API server. If empty, the Web UI will use the same address and port as the API server.' type: string Enabled: description: Enabled indicates whether the Web UI is enabled. type: boolean Listen: description: Listen specifies the address and port on which the Web UI listens. type: string models.Protocol: type: string enum: - ncl/v1 - bprotocol/v2 x-enum-varnames: - ProtocolNCLV1 - ProtocolBProtocolV2 types.InputSourcesConfig: type: object properties: Disabled: description: Disabled specifies a list of storages that are disabled. type: array items: type: string MaxRetryCount: description: ReadTimeout specifies the maximum number of attempts for reading from a storage. type: integer ReadTimeout: description: ReadTimeout specifies the maximum time allowed for reading from a storage. type: integer Types: $ref: '#/definitions/types.InputSourcesTypes' types.WASM: type: object types.OrchestratorAuth: type: object properties: Token: description: Token specifies the key for compute nodes to be able to access the orchestrator type: string types.ResultDownloadersTypes: type: object properties: IPFS: $ref: '#/definitions/types.IpfsDownloader' apimodels.IsAliveResponse: type: object properties: Status: type: string 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 address: description: 'Address is the network location where this compute node can be reached Format: IPv4 or hostname (e.g., "192.168.1.100" or "node1.example.com")' type: string types.ComputeTLS: type: object properties: CACert: description: CACert specifies the CA file path that the compute node trusts when connecting to orchestrator. type: string RequireTLS: description: RequireTLS specifies if the compute node enforces encrypted communication with orchestrator. type: boolean types.EngineConfigTypes: type: object properties: Docker: $ref: '#/definitions/types.Docker' WASM: $ref: '#/definitions/types.WASM' types.InputSourcesTypes: type: object properties: IPFS: $ref: '#/definitions/types.IPFSStorage' types.Heartbeat: type: object properties: InfoUpdateInterval: description: InfoUpdateInterval specifies the time between updates of non-resource information to the orchestrator. type: integer Interval: description: Interval specifies the time between heartbeat signals sent to the orchestrator. type: integer ResourceUpdateInterval: description: 'Deprecated: use Interval instead' type: integer models.JobSelectionDataLocality: type: integer format: int64 enum: - 0 - 1 x-enum-comments: Anywhere: anywhere Local: local x-enum-descriptions: - local - anywhere x-enum-varnames: - Local - Anywhere apimodels.GetAgentNodeAuthConfigResponse: type: object properties: config: $ref: '#/definitions/types.Oauth2Config' version: type: string types.AuthenticatorConfig: type: object properties: PolicyPath: type: string Type: type: string types.LongRunningJobDefaultsConfig: type: object properties: Priority: description: 'Priority specifies the default priority allocated to a service or daemon job. This value is used when the job hasn''t explicitly set its priority requirement.' type: integer Task: $ref: '#/definitions/types.LongRunningTaskDefaultConfig' types.OrchestratorTLS: type: object properties: CACert: description: CACert specifies the CA file path that the orchestrator node trusts when connecting to NATS server. type: string ServerCert: description: ServerCert specifies the certificate file path given to NATS server to serve TLS connections. type: string ServerKey: description: ServerKey specifies the private key file path given to NATS server to serve TLS connections. type: string ServerTimeout: description: ServerTimeout specifies the TLS timeout, in seconds, set on the NATS server. type: integer types.Logging: type: object properties: Level: description: 'Level sets the logging level. One of: trace, debug, info, warn, error, fatal, panic.' type: string LogDebugInfoInterval: description: LogDebugInfoInterval specifies the interval for logging debug information. type: integer Mode: description: 'Mode specifies the logging mode. One of: default, json.' type: string models.DebugInfo: type: object properties: component: type: string info: {} types.ResultDownloaders: type: object properties: Disabled: description: Disabled is a list of downloaders that are disabled. type: array items: type: string Timeout: description: Timeout specifies the maximum time allowed for a download operation. type: integer Types: $ref: '#/definitions/types.ResultDownloadersTypes' types.Oauth2Config: type: object properties: Audience: type: string DeviceAuthorizationEndpoint: type: string DeviceClientID: type: string Issuer: type: string JWKSUri: type: string PollingInterval: type: integer ProviderID: type: string ProviderName: type: string Scopes: type: array items: type: string TokenEndpoint: type: string types.EvaluationBroker: type: object properties: MaxRetryCount: description: MaxRetryCount specifies the maximum number of times an evaluation can be retried before being marked as failed. type: integer VisibilityTimeout: description: VisibilityTimeout specifies how long an evaluation can be claimed before it's returned to the queue. type: integer types.Bacalhau: type: object properties: API: $ref: '#/definitions/types.API' Compute: $ref: '#/definitions/types.Compute' DataDir: description: DataDir specifies a location on disk where the bacalhau node will maintain state. type: string DisableAnalytics: description: DisableAnalytics, when true, disables sharing anonymous analytics data with the Bacalhau development team type: boolean Engines: $ref: '#/definitions/types.EngineConfig' FeatureFlags: $ref: '#/definitions/types.FeatureFlags' InputSources: $ref: '#/definitions/types.InputSourcesConfig' JobAdmissionControl: $ref: '#/definitions/types.JobAdmissionControl' JobDefaults: $ref: '#/definitions/types.JobDefaults' Labels: description: Labels are key-value pairs used to describe and categorize the nodes. type: object additionalProperties: type: string Logging: $ref: '#/definitions/types.Logging' NameProvider: description: 'NameProvider specifies the method used to generate names for the node. One of: hostname, aws, gcp, uuid, puuid.' type: string Orchestrator: $ref: '#/definitions/types.Orchestrator' Publishers: $ref: '#/definitions/types.PublishersConfig' ResultDownloaders: $ref: '#/definitions/types.ResultDownloaders' StrictVersionMatch: description: StrictVersionMatch indicates whether to enforce strict version matching. type: boolean UpdateConfig: $ref: '#/definitions/types.UpdateConfig' WebUI: $ref: '#/definitions/types.WebUI' 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' types.JobAdmissionControl: type: object properties: Locality: description: Locality specifies the locality of the job input data. allOf: - $ref: '#/definitions/models.JobSelectionDataLocality' ProbeExec: description: ProbeExec specifies the command to execute for probing job submission. type: string ProbeHTTP: description: ProbeHTTP specifies the HTTP endpoint for probing job submission. type: string RejectNetworkedJobs: description: RejectNetworkedJobs indicates whether to reject jobs that require network access. type: boolean RejectStatelessJobs: description: RejectStatelessJobs indicates whether to reject stateless jobs, i.e. jobs without inputs. type: boolean types.LongRunningTaskDefaultConfig: type: object properties: Resources: $ref: '#/definitions/types.ResourcesConfig' 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.GPU: type: object properties: index: description: Self-reported index of the device in the system type: integer format: int64 memory: description: Total GPU memory in mebibytes (MiB) type: integer format: int64 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 Used 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 types.S3Publisher: type: object properties: PreSignedURLDisabled: description: PreSignedURLDisabled specifies whether pre-signed URLs are enabled for the S3 provider. type: boolean PreSignedURLExpiration: description: PreSignedURLExpiration specifies the duration before a pre-signed URL expires. type: integer types.PublisherTypes: type: object properties: IPFS: $ref: '#/definitions/types.IPFSPublisher' Local: $ref: '#/definitions/types.LocalPublisher' S3: $ref: '#/definitions/types.S3Publisher' S3Managed: $ref: '#/definitions/types.S3ManagedPublisher' types.Scheduler: type: object properties: HousekeepingInterval: description: HousekeepingInterval specifies how often to run housekeeping tasks. type: integer HousekeepingTimeout: description: HousekeepingTimeout specifies the maximum time allowed for a single housekeeping run. type: integer QueueBackoff: description: QueueBackoff specifies the time to wait before retrying a failed job. type: integer WorkerCount: description: WorkerCount specifies the number of concurrent workers for job scheduling. type: integer types.Compute: type: object properties: AllocatedCapacity: $ref: '#/definitions/types.ResourceScaler' AllowListedLocalPaths: description: AllowListedLocalPaths specifies a list of local file system paths that the compute node is allowed to access. type: array items: type: string Auth: description: Auth specifies the authentication configuration for compute nodes to connect to the orchestrator. allOf: - $ref: '#/definitions/types.ComputeAuth' Enabled: description: Enabled indicates whether the compute node is active and available for job execution. type: boolean Env: description: Env specifies environment variable configuration for the compute node allOf: - $ref: '#/definitions/types.EnvConfig' Heartbeat: $ref: '#/definitions/types.Heartbeat' Network: description: Network specifies the networking configuration for this compute node allOf: - $ref: '#/definitions/types.NetworkConfig' Orchestrators: description: Orchestrators specifies a list of orchestrator endpoints that this compute node connects to. type: array items: type: string TLS: description: TLS specifies the TLS related configuration on the compute node when connecting with the orchestrator. allOf: - $ref: '#/definitions/types.ComputeTLS' types.API: type: object properties: Auth: $ref: '#/definitions/types.AuthConfig' Host: description: Host specifies the hostname or IP address on which the API server listens or the client connects. type: string Port: description: Port specifies the port number on which the API server listens or the client connects. type: integer TLS: $ref: '#/definitions/types.TLS' types.ResourcesConfig: type: object properties: CPU: description: 'CPU specifies the default amount of CPU allocated to a task. It uses Kubernetes resource string format (e.g., "100m" for 0.1 CPU cores). This value is used when the task hasn''t explicitly set its CPU requirement.' type: string Disk: description: 'Disk specifies the default amount of disk space allocated to a task. It uses Kubernetes resource string format (e.g., "1Gi" for 1 gibibyte). This value is used when the task hasn''t explicitly set its disk space requirement.' type: string GPU: description: 'GPU specifies the default number of GPUs allocated to a task. It uses Kubernetes resource string format (e.g., "1" for 1 GPU). This value is used when the task hasn''t explicitly set its GPU requirement.' type: string Memory: description: 'Memory specifies the default amount of memory allocated to a task. It uses Kubernetes resource string format (e.g., "256Mi" for 256 mebibytes). This value is used when the task hasn''t explicitly set its memory requirement.' type: string types.Cluster: type: object properties: Advertise: description: Advertise specifies the address to advertise to other cluster members. type: string Host: description: Host specifies the hostname or IP address for cluster communication. type: string Name: description: Name specifies the unique identifier for this orchestrator cluster. type: string Peers: description: Peers is a list of other cluster members to connect to on startup. type: array items: type: string Port: description: Port specifies the port number for cluster communication. type: integer models.NodeInfo: type: object properties: BacalhauVersion: $ref: '#/definitions/models.BuildVersionInfo' ComputeNodeInfo: $ref: '#/definitions/models.ComputeNodeInfo' Labels: type: object additionalProperties: type: string NodeID: type: string NodeType: $ref: '#/definitions/models.NodeType' SupportedProtocols: description: SupportedProtocols indicates which communication protocols this node supports type: array items: $ref: '#/definitions/models.Protocol' types.AuthConfig: type: object properties: AccessPolicyPath: description: 'AccessPolicyPath is the path to a file or directory that will be loaded as the policy to apply to all inbound API requests. If unspecified, a policy that permits access to all API endpoints to both authenticated and unauthenticated users (the default as of v1.2.0) will be used.' type: string Methods: description: 'Methods maps "method names" to authenticator implementations. A method name is a human-readable string chosen by the person configuring the system that is shown to users to help them pick the authentication method they want to use. There can be multiple usages of the same Authenticator *type* but with different configs and parameters, each identified with a unique method name. For example, if an implementation wants to allow users to log in with Github or Bitbucket, they might both use an authenticator implementation of type "oidc", and each would appear once on this provider with key / method name "github" and "bitbucket". By default, only a single authentication method that accepts authentication via client keys will be enabled.' type: object additionalProperties: $ref: '#/definitions/types.AuthenticatorConfig' Oauth2: $ref: '#/definitions/types.Oauth2Config' Users: type: array items: $ref: '#/definitions/types.AuthUser' types.FeatureFlags: type: object types.BatchJobDefaultsConfig: type: object properties: Priority: description: 'Priority specifies the default priority allocated to a batch or ops job. This value is used when the job hasn''t explicitly set its priority requirement.' type: integer Task: $ref: '#/definitions/types.BatchTaskDefaultConfig' types.Capability: type: object properties: Actions: type: array items: type: string types.JobDefaults: type: object properties: Batch: $ref: '#/definitions/types.BatchJobDefaultsConfig' Daemon: $ref: '#/definitions/types.LongRunningJobDefaultsConfig' Ops: $ref: '#/definitions/types.BatchJobDefaultsConfig' Service: $ref: '#/definitions/types.LongRunningJobDefaultsConfig' types.LocalPublisher: type: object properties: Address: description: Address specifies the endpoint the publisher serves on. type: string Port: description: Port specifies the port the publisher serves on. type: integer 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' types.EngineConfig: type: object properties: Disabled: description: Disabled specifies a list of engines that are disabled. type: array items: type: string Types: $ref: '#/definitions/types.EngineConfigTypes' types.UpdateConfig: type: object properties: Interval: description: Interval specifies the time between update checks, when set to 0 update checks are not performed. type: integer types.ComputeAuth: type: object properties: Token: description: Token specifies the key for compute nodes to be able to access the orchestrator. type: string types.IPFSPublisher: type: object properties: Endpoint: description: Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 type: string types.DefaultPublisherConfig: type: object properties: Params: description: Params specifies the publisher configuration data. type: object additionalProperties: type: string Type: description: Type specifies the publisher type. e.g. "s3", "local", "ipfs", etc. type: string types.S3ManagedPublisher: type: object properties: Bucket: description: Bucket specifies the S3 bucket name for managed publisher type: string Endpoint: description: Endpoint specifies an optional custom S3 endpoint type: string Key: description: Key specifies an optional prefix for objects stored in the bucket type: string PreSignedURLExpiration: description: PreSignedURLExpiration specifies the duration before a pre-signed URL expires. type: integer Region: description: Region specifies the region the S3 bucket is in type: string types.PublishersConfig: type: object properties: Disabled: description: Disabled specifies a list of publishers that are disabled. type: array items: type: string Types: $ref: '#/definitions/types.PublisherTypes'