{"openapi":"3.1.0","info":{"title":"nilcc-api","description":"This API lets users create and manipulate workloads in nilcc.\n","version":"0.1.0-beta.1"},"servers":[{"url":"https://nilcc-api.sandbox.app-cluster.sandbox.nilogy.xyz","description":"The sandbox environment"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"AdminApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ChallengeResponse":{"type":"object","properties":{"message":{"type":"string","description":"The message to sign with your wallet."},"nonce":{"type":"string","description":"The nonce used in the challenge."}},"required":["message","nonce"]},"ApiErrorResponse":{"type":"object","properties":{"error":{},"kind":{"type":"string"},"ts":{"type":"string"},"stackTrace":{"type":"string"}},"required":["kind","ts"]},"LoginResponse":{"type":"object","properties":{"token":{"type":"string","description":"JWT token for authenticating API requests."},"expiresAt":{"type":"string","format":"date-time","description":"When the token expires."},"account":{"type":"object","properties":{"accountId":{"type":"string"},"walletAddress":{"type":"string"},"balance":{"type":"number"}},"required":["accountId","walletAddress","balance"],"description":"The authenticated account."}},"required":["token","expiresAt","account"]},"Account":{"type":"object","properties":{"accountId":{"type":"string","description":"The account identifier."},"name":{"type":"string","maxLength":32,"description":"The account name."},"walletAddress":{"type":"string","description":"The Ethereum wallet address for this account."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when this account was created."},"balance":{"type":"number","description":"The USD balance (decimal, e.g. 5.50 means $5.50)."}},"required":["accountId","name","walletAddress","createdAt","balance"]},"MyAccount":{"allOf":[{"$ref":"#/components/schemas/Account"}],"properties":{"burnRatePerMin":{"type":"number","description":"The USD amount being spent per minute across all running workloads."}},"required":["burnRatePerMin"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","minLength":1},"accountId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["account-admin","user"]},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","type","active","createdAt","updatedAt"]},"ListApiKeysResponse":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"Artifact":{"type":"object","properties":{"version":{"type":"string","description":"The artifact version."},"builtAt":{"type":"string","format":"date-time","description":"The timestamp when this artifact was built."}},"required":["version","builtAt"]},"CreateWorkloadRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"A descriptive name for the workload","examples":["my-favorite-workload"]},"artifactsVersion":{"type":"string","description":"The artifact version to use for this workload.","examples":["0.1.0"]},"dockerCompose":{"type":"string","description":"The docker compose to be ran. The docker compose can contain any number of services but it must contain a single one that will act as the public entry point to the CVM.","examples":["services:\n  api:\n    image: caddy:2\n    command: |\n      caddy respond --listen :80 --body '{\"hi\":\"foo\"}' --header \"Content-Type: application/json\""]},"envVars":{"type":"object","additionalProperties":{"type":"string"},"description":"The optional environment variables to set on this workload. Environment variables are private and are not included in the attestation measurement.","examples":[{"FOO":"42"}]},"files":{"type":"object","additionalProperties":{"type":"string","contentEncoding":"base64"},"description":"The optional set of files that are meant to be mounted in the docker compose file. These are available under a special `$FILES` prefix that must be used in the docker compose file when referencing these files as mounts. Note that the file contents must be encoded in base64.","examples":[{"foo/bar.txt":"dGhpcyBpcyBhIGZpbGUgY3JlYXRlZCBpbnNpZGUgdGhlIENWTSBhbmQgbW91bnRlZCB2aWEgZG9ja2VyIGNvbXBvc2U="}]},"dockerCredentials":{"type":"array","items":{"type":"object","properties":{"server":{"type":"string","description":"The server to authenticate against.","examples":["registry.example.com"]},"username":{"type":"string","description":"The username to use.","examples":["username"]},"password":{"type":"string","description":"The password to use.","examples":["password"]}},"required":["server","username","password"]},"description":"The optional docker credentials to use to authenticate against private registries."},"domain":{"type":"string","description":"The optional domain to use for this workload. If none is provided, a nilcc-managed domain will be generated.","examples":["example.com"]},"publicContainerName":{"type":"string","minLength":1,"description":"The container that acts as an entry point to this workload, which must be a part of the docker compose definition.","examples":["api"]},"publicContainerPort":{"type":"integer","exclusiveMinimum":0,"description":"The port that the public container uses to expose its service. This must contain the port this container is bound to, whether it is exposed or not.","examples":[80]},"memory":{"type":"integer","exclusiveMinimum":0,"description":"The amount of memory, in MBs, that the CVM should allocate for this workload.","examples":[2048]},"cpus":{"type":"integer","exclusiveMinimum":0,"description":"The number of CPUs that the CVM should allocate for this workload."},"disk":{"type":"integer","minimum":5,"maximum":100,"description":"The disk space, in GBs, that the CVM should allocate for this workload. This disk space is used towards anything that's stored in the filesystem during runtime, including docker images, docker containers, files that containers will write, etc. When using large docker images, this parameter should be high enough to accommodate for them.","examples":[10]},"gpus":{"type":"integer","description":"The number of GPUs to that the CVM should allocate for this workload."},"heartbeat":{"$ref":"#/components/schemas/WorkloadHeartbeats","description":"The optional heartbeat configuration for this workload."}},"required":["name","artifactsVersion","dockerCompose","publicContainerName","publicContainerPort","memory","cpus","disk","gpus"],"description":"A request to create a workload"},"WorkloadHeartbeats":{"type":"object","properties":{"measurementHashUrl":{"type":"string","format":"uri","description":"The URL where the measurement hashes can be pulled from."}},"required":["measurementHashUrl"]},"CreateWorkloadResponse":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"A descriptive name for the workload","examples":["my-favorite-workload"]},"artifactsVersion":{"type":"string","description":"The artifact version to use for this workload.","examples":["0.1.0"]},"dockerCompose":{"type":"string","description":"The docker compose to be ran. The docker compose can contain any number of services but it must contain a single one that will act as the public entry point to the CVM.","examples":["services:\n  api:\n    image: caddy:2\n    command: |\n      caddy respond --listen :80 --body '{\"hi\":\"foo\"}' --header \"Content-Type: application/json\""]},"envVars":{"type":"object","additionalProperties":{"type":"string"},"description":"The optional environment variables to set on this workload. Environment variables are private and are not included in the attestation measurement.","examples":[{"FOO":"42"}]},"files":{"type":"object","additionalProperties":{"type":"string","contentEncoding":"base64"},"description":"The optional set of files that are meant to be mounted in the docker compose file. These are available under a special `$FILES` prefix that must be used in the docker compose file when referencing these files as mounts. Note that the file contents must be encoded in base64.","examples":[{"foo/bar.txt":"dGhpcyBpcyBhIGZpbGUgY3JlYXRlZCBpbnNpZGUgdGhlIENWTSBhbmQgbW91bnRlZCB2aWEgZG9ja2VyIGNvbXBvc2U="}]},"dockerCredentials":{"type":"array","items":{"type":"object","properties":{"server":{"type":"string","description":"The server to authenticate against.","examples":["registry.example.com"]},"username":{"type":"string","description":"The username to use.","examples":["username"]},"password":{"type":"string","description":"The password to use.","examples":["password"]}},"required":["server","username","password"]},"description":"The optional docker credentials to use to authenticate against private registries."},"domain":{"type":"string","description":"The domain where this workload is reachable via https."},"publicContainerName":{"type":"string","minLength":1,"description":"The container that acts as an entry point to this workload, which must be a part of the docker compose definition.","examples":["api"]},"publicContainerPort":{"type":"integer","exclusiveMinimum":0,"description":"The port that the public container uses to expose its service. This must contain the port this container is bound to, whether it is exposed or not.","examples":[80]},"memory":{"type":"integer","exclusiveMinimum":0,"description":"The amount of memory, in MBs, that the CVM should allocate for this workload.","examples":[2048]},"cpus":{"type":"integer","exclusiveMinimum":0,"description":"The number of CPUs that the CVM should allocate for this workload."},"disk":{"type":"integer","minimum":5,"maximum":100,"description":"The disk space, in GBs, that the CVM should allocate for this workload. This disk space is used towards anything that's stored in the filesystem during runtime, including docker images, docker containers, files that containers will write, etc. When using large docker images, this parameter should be high enough to accommodate for them.","examples":[10]},"gpus":{"type":"integer","description":"The number of GPUs to that the CVM should allocate for this workload."},"heartbeat":{"$ref":"#/components/schemas/WorkloadHeartbeats","description":"The optional heartbeat configuration for this workload."},"workloadId":{"type":"string","description":"The identifier for this workload.","format":"uuid"},"usdCostPerMin":{"type":"number","description":"The cost of this workload in USD per minute."},"status":{"type":"string","enum":["scheduled","starting","awaitingCert","running","stopped","error"],"description":"The status of the workload."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp at which this workload was created."},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp at which this workload was last created."},"accountId":{"type":"string","description":"The account this workload belongs to."},"metalInstanceDomain":{"type":"string","description":"The domain for the metal instance host that is running this workload. This can be used when using a custom domain for a workload as the target for a CNAME record."}},"required":["name","artifactsVersion","dockerCompose","domain","publicContainerName","publicContainerPort","memory","cpus","disk","gpus","workloadId","usdCostPerMin","status","createdAt","updatedAt","accountId","metalInstanceDomain"],"description":"A request to create a workload"},"ListWorkloadsResponse":{"type":"array","items":{"$ref":"#/components/schemas/GetWorkloadResponse"}},"GetWorkloadResponse":{"$ref":"#/components/schemas/CreateWorkloadResponse","description":"A request to create a workload"},"WorkloadSystemLogsResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"},"description":"The system log lines."}},"required":["lines"]},"WorkloadContainerLogsRequest":{"type":"object","properties":{"container":{"type":"string","description":"The name of the container."},"tail":{"type":"boolean","description":"Whether to get logs from the tail of the log instead of the head."},"stream":{"type":"string","enum":["stdout","stderr"],"description":"The stream to get logs from."},"maxLines":{"type":"integer","maximum":1000,"default":1000,"description":"The maximum number of lines to get."},"workloadId":{"type":"string","description":"The identifier for the workloads to get container logs from.","format":"uuid"}},"required":["container","tail","stream","maxLines","workloadId"]},"ListContainersResponse":{"type":"array","items":{"$ref":"#/components/schemas/Container"}},"Container":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The name(s) for this container.","examples":[["cvm-api-1"]]},"image":{"type":"string","description":"The docker image this container is using.","examples":["ghcr.io/nillionnetwork/nilcc-attester:latest"]},"imageId":{"type":"string","description":"The docker image identifier being used.","examples":["sha256:a16bb0e1a3fa23179888246671ce3db9c9006030cc91b7377972d5e35a121556"]},"state":{"type":"string","description":"The state of this container.","examples":["created"]}},"required":["names","image","imageId","state"],"description":"A container running in a workload."},"ListWorkloadEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/WorkloadEvent"}}},"required":["events"]},"WorkloadEvent":{"type":"object","properties":{"eventId":{"type":"string","description":"UUID v4","format":"uuid"},"details":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"created"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"starting"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"stopped"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"vmRestarted"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"forcedRestart"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"awaitingCert"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"running"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"failedToStart"},"error":{"type":"string"}},"required":["kind","error"]},{"type":"object","properties":{"kind":{"type":"string","const":"warning"},"message":{"type":"string"}},"required":["kind","message"]}]},"timestamp":{"type":"string","format":"date-time"}},"required":["eventId","details","timestamp"]},"HeartbeatResponse":{"type":"object","properties":{"metalInstanceId":{"type":"string","description":"UUID v4","format":"uuid"},"expectedArtifactVersions":{"type":"array","items":{"type":"string"}}},"required":["metalInstanceId","expectedArtifactVersions"]},"ListMetalInstancesResponse":{"type":"array","items":{"$ref":"#/components/schemas/GetMetalInstanceResponse"}},"GetMetalInstanceResponse":{"type":"object","properties":{"metalInstanceId":{"type":"string","description":"UUID v4","format":"uuid"},"agentVersion":{"type":"string"},"hostname":{"type":"string"},"domain":{"type":"string"},"token":{"type":"string"},"publicIp":{"type":"string"},"memoryMb":{"type":"object","properties":{"reserved":{"type":"number","minimum":0},"total":{"type":"number","minimum":0}},"required":["reserved","total"]},"cpus":{"type":"object","properties":{"reserved":{"type":"number","minimum":0},"total":{"type":"number","minimum":0}},"required":["reserved","total"]},"diskSpaceGb":{"type":"object","properties":{"reserved":{"type":"number","minimum":0},"total":{"type":"number","minimum":0}},"required":["reserved","total"]},"gpus":{"type":"number"},"gpuModel":{"type":"string"},"availableArtifactVersions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["metalInstanceId","agentVersion","hostname","domain","token","publicIp","memoryMb","cpus","diskSpaceGb","gpus","availableArtifactVersions","createdAt","updatedAt","lastSeenAt"]},"PaymentListResponse":{"type":"array","items":{"$ref":"#/components/schemas/PaymentResponse"}},"PaymentResponse":{"type":"object","properties":{"paymentId":{"type":"string","description":"The payment identifier."},"txHash":{"type":"string","description":"The on-chain transaction hash."},"blockNumber":{"type":"number","description":"The block number of the transaction."},"fromAddress":{"type":"string","description":"The wallet address that burned tokens."},"amount":{"type":"string","description":"The amount of tokens burned (in wei)."},"nilAmount":{"type":"number","description":"The amount of NIL tokens deposited (decimal)."},"nilPriceAtDeposit":{"type":"number","description":"The NIL/USD exchange rate at the time of deposit."},"depositedAmountUsd":{"type":"number","description":"The USD value credited to the account."},"createdAt":{"type":"string","format":"date-time","description":"When the payment was processed."}},"required":["paymentId","txHash","blockNumber","fromAddress","amount","nilAmount","nilPriceAtDeposit","depositedAmountUsd","createdAt"]}}},"security":[{"BearerAuth":[]},{"AdminApiKeyAuth":[]}],"paths":{"/api/v1/auth/challenge":{"post":{"responses":{"200":{"description":"Challenge created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1AuthChallenge","tags":["auth"],"parameters":[],"summary":"Request a sign-in challenge","description":"Returns a message to sign with your wallet for authentication."}},"/api/v1/auth/login":{"post":{"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1AuthLogin","tags":["auth"],"parameters":[],"summary":"Authenticate with a signed challenge","description":"Verifies the wallet signature and returns a JWT token. Creates an account on first sign-in."}},"/api/v1/accounts/create":{"post":{"responses":{"200":{"description":"Account created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1AccountsCreate","tags":["account"],"parameters":[],"summary":"Create a new account","description":"This will create an account and return its details."}},"/api/v1/accounts/update":{"put":{"responses":{"200":{"description":"Account updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"putApiV1AccountsUpdate","tags":["account"],"parameters":[],"summary":"Update an account","description":"This updates an account's properties."}},"/api/v1/accounts/list":{"get":{"responses":{"200":{"description":"The accounts were listed successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1AccountsList","tags":["account"],"parameters":[],"summary":"List all accounts","description":"This endpoint lists all available accounts"}},"/api/v1/accounts/me":{"get":{"responses":{"200":{"description":"The account information was retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyAccount"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1AccountsMe","tags":["account"],"parameters":[],"summary":"Get information about the user's account.","description":"This endpoint returns information about the account."}},"/api/v1/accounts/{id}":{"get":{"responses":{"200":{"description":"The account information was retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1AccountsById","tags":["account"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"summary":"Get information about an account","description":"This endpoint fetches all information about an account by id"}},"/api/v1/accounts/add-balance":{"post":{"responses":{"200":{"description":"The balance was added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1AccountsAdd-balance","tags":["account"],"parameters":[],"summary":"Add USD balance to an account.","description":"This will add USD balance to the given account."}},"/api/v1/api-keys/create":{"post":{"responses":{"200":{"description":"API key created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Api-keysCreate","tags":["api-keys"],"parameters":[],"summary":"Create an API key"}},"/api/v1/api-keys/account/{accountId}":{"get":{"responses":{"200":{"description":"API keys listed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1Api-keysAccountByAccountId","tags":["api-keys"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"summary":"List API keys for an account"}},"/api/v1/api-keys/update":{"put":{"responses":{"200":{"description":"API key updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"putApiV1Api-keysUpdate","tags":["api-keys"],"parameters":[],"summary":"Update an API key"}},"/api/v1/api-keys/delete":{"post":{"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Api-keysDelete","tags":["api-keys"],"parameters":[],"summary":"Delete an API key"}},"/api/v1/artifacts/enable":{"post":{"responses":{"200":{"description":"Artifact enabled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifact"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1ArtifactsEnable","tags":["artifact"],"parameters":[],"summary":"Enable an artifact version","description":"This will enable an artifact so it can be used by any new workloads."}},"/api/v1/artifacts/list":{"get":{"responses":{"200":{"description":"The list of artifact versions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1ArtifactsList","tags":["artifact"],"parameters":[],"summary":"List all available artifact versions.","description":"This lists all artifact versions."}},"/api/v1/artifacts/disable":{"post":{"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1ArtifactsDisable","tags":["artifacts"],"parameters":[],"summary":"Disable a supported artifact version","description":"This will disable a supported artifact version. Any workload that is already running using the disable version will continue to do so."}},"/api/v1/workloads/create":{"post":{"responses":{"200":{"description":"Workload created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkloadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1WorkloadsCreate","tags":["workload"],"parameters":[],"summary":"Create a new workload","description":"This endpoint creates a new workload. The domain the workload is accessible at will be returned as part of the response."}},"/api/v1/workloads/list":{"get":{"responses":{"200":{"description":"The workloads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkloadsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1WorkloadsList","tags":["workload"],"parameters":[],"summary":"List all workloads"}},"/api/v1/workloads/{id}":{"get":{"responses":{"200":{"description":"The workload details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkloadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1WorkloadsById","tags":["workload"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"summary":"Get the details for a workload","description":"This endpoint allows getting the details for a workload by its id"}},"/api/v1/workloads/delete":{"post":{"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1WorkloadsDelete","tags":["workload"],"parameters":[],"summary":"Delete a workload","description":"This endpoint deletes a workload. The workload CVM will be stopped and all resources associated with it will be deleted"}},"/api/v1/workloads/restart":{"post":{"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1WorkloadsRestart","tags":["workload"],"parameters":[],"summary":"Restart a workload","description":"This endpoint restarts a workload."}},"/api/v1/workloads/logs":{"post":{"responses":{"200":{"description":"The system logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadSystemLogsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1WorkloadsLogs","tags":["workload"],"parameters":[],"summary":"Get the system logs for a workload","description":"This endpoint retrieves the system logs for a workload"}},"/api/v1/workloads/stats":{"post":{"responses":{"200":{"description":"The system stats","content":{"application/json":{"schema":{"type":"object","properties":{"memory":{"type":"object","properties":{"total":{"type":"number","description":"The total memory in bytes."},"used":{"type":"number","description":"The total used memory, in bytes."}},"required":["total","used"],"description":"Memory stats."},"cpus":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The CPU name."},"usage":{"type":"number","description":"The CPU usage, as a percentage."},"frequency":{"type":"number","description":"The CPU frequency, in MHz."}},"required":["name","usage","frequency"],"description":"CPU stats."}},"disks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of this disk."},"mountPoint":{"type":"string","description":"The mount point for this disk."},"filesystem":{"type":"string","description":"The filesystem type."},"size":{"type":"number","description":"The total size of this disk, in bytes."},"used":{"type":"number","description":"The used space in this disk, in bytes."}},"required":["name","mountPoint","filesystem","size","used"],"description":"Disk stats."}}},"required":["memory","cpus","disks"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1WorkloadsStats","tags":["workload"],"parameters":[],"summary":"Get the system stats for a workload","description":"This endpoint retrieves the system stats (CPU, memory, disk, etc) for a workload."}},"/api/v1/workload-containers/logs":{"post":{"responses":{"200":{"description":"The container logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadContainerLogsRequest"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-containersLogs","tags":["workload","container"],"parameters":[],"summary":"Get the logs for a workload's container","description":"This endpoint retrieves the logs for a container running in a workload"}},"/api/v1/workload-containers/list":{"post":{"responses":{"200":{"description":"The containers list is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListContainersResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-containersList","tags":["workload","container"],"parameters":[],"summary":"List the containers for a workload","description":"This endpoint retrieves some basic information about the container being ran by a workload."}},"/api/v1/workload-events/submit":{"post":{"responses":{"200":{"description":"The event was processed successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-eventsSubmit","tags":["metal-instance","workload"],"parameters":[],"summary":"Report an event for a workload","description":"This endpoint is used by nilcc-agent to asynchronously report events for a workload. This includes events like errors and a workload starting, stopping, etc."}},"/api/v1/workload-events/list":{"post":{"responses":{"200":{"description":"The list of events for this workload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkloadEventsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-eventsList","tags":["metal-instance","workload"],"parameters":[],"summary":"List the events for a workload"}},"/api/v1/workload-tiers/create":{"post":{"responses":{"200":{"description":"The workload tier was created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"tierId":{"type":"string","description":"The identifier for this tier.","format":"uuid"},"name":{"type":"string","description":"The name of this tier."},"cpus":{"type":"number","description":"The number of CPUs included in this tier."},"gpus":{"type":"number","description":"The number of GPUs included in this tier."},"memoryMb":{"type":"number","description":"The amount of MB of RAM included in this tier."},"diskGb":{"type":"number","description":"The amount of GB of disk included in this tier."},"cost":{"type":"number","description":"The cost per minute in USD for this tier."}},"required":["tierId","name","cpus","gpus","memoryMb","diskGb","cost"],"description":"A workload tier."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-tiersCreate","tags":["workload-tier"],"parameters":[],"summary":"Create a workload tier","description":"This creates a workload tier."}},"/api/v1/workload-tiers/list":{"get":{"responses":{"200":{"description":"The workload tiers.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"tierId":{"type":"string","description":"The identifier for this tier.","format":"uuid"},"name":{"type":"string","description":"The name of this tier."},"cpus":{"type":"number","description":"The number of CPUs included in this tier."},"gpus":{"type":"number","description":"The number of GPUs included in this tier."},"memoryMb":{"type":"number","description":"The amount of MB of RAM included in this tier."},"diskGb":{"type":"number","description":"The amount of GB of disk included in this tier."},"cost":{"type":"number","description":"The cost per minute in USD for this tier."}},"required":["tierId","name","cpus","gpus","memoryMb","diskGb","cost"],"description":"A workload tier."}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1Workload-tiersList","tags":["workload-tier"],"parameters":[],"summary":"List workload tiers.","description":"This endpoint lists all existing workload tiers."}},"/api/v1/workload-tiers/update":{"put":{"responses":{"200":{"description":"The workload tier was updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"tierId":{"type":"string","description":"The identifier for this tier.","format":"uuid"},"name":{"type":"string","description":"The name of this tier."},"cpus":{"type":"number","description":"The number of CPUs included in this tier."},"gpus":{"type":"number","description":"The number of GPUs included in this tier."},"memoryMb":{"type":"number","description":"The amount of MB of RAM included in this tier."},"diskGb":{"type":"number","description":"The amount of GB of disk included in this tier."},"cost":{"type":"number","description":"The cost per minute in USD for this tier."}},"required":["tierId","name","cpus","gpus","memoryMb","diskGb","cost"],"description":"A workload tier."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"putApiV1Workload-tiersUpdate","tags":["workload-tier"],"parameters":[],"summary":"Update a workload tier","description":"This updates a workload tier."}},"/api/v1/workload-tiers/delete":{"post":{"responses":{"200":{"description":"The tier was deleted."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Workload-tiersDelete","tags":["workload-tier"],"parameters":[],"summary":"Delete a workload tier.","description":"This endpoint deletes a tier."}},"/api/v1/metal-instances/heartbeat":{"post":{"responses":{"200":{"description":"The heartbeat was processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Metal-instancesHeartbeat","tags":["metal-instance"],"parameters":[],"summary":"Report a metal instance as being online","description":"This endpoint must be called periodically by every metal instance for them to be considered online by nilcc-api"}},"/api/v1/metal-instances/list":{"get":{"responses":{"200":{"description":"List of metal instances","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetalInstancesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1Metal-instancesList","tags":["metal-instance"],"parameters":[],"summary":"List all metal instances"}},"/api/v1/metal-instances/{id}":{"get":{"responses":{"200":{"description":"Workload found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetalInstanceResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1Metal-instancesById","tags":["metal-instance"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"summary":"Get the details for a metal instance by ID"}},"/api/v1/metal-instances/register":{"post":{"responses":{"200":{"description":"Metal instance registered successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Metal-instancesRegister","tags":["metal-instance"],"parameters":[],"summary":"Register a metal instance","description":"This will create the metal instance if it's the first time it's registering, or it will update it if it already exists"}},"/api/v1/metal-instances/delete":{"post":{"responses":{"200":{"description":"The metal instance was deleted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"postApiV1Metal-instancesDelete","tags":["metal-instance"],"parameters":[],"summary":"Delete a metal instance"}},"/api/v1/payments/list":{"get":{"responses":{"200":{"description":"Payments listed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}},"operationId":"getApiV1PaymentsList","tags":["payments"],"parameters":[],"summary":"List payments for the authenticated account","description":"Returns a list of all on-chain payments that have been credited to this account."}},"/health":{"get":{"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getHealth","tags":["System"],"parameters":[],"summary":"Health check"}}}}