{ "openapi": "3.0.0", "servers": [ { "url": "https://console-api-sandbox.akash.network" } ], "info": { "title": "Akash Network Console API", "description": "API providing data to the Akash Network Console", "version": "v1" }, "paths": { "/v1/wallets": { "get": { "summary": "Get a list of wallets", "tags": [ "Wallet" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "description": "The ID of the user to get the wallets for", "name": "userId", "in": "query" } ], "responses": { "200": { "description": "Returns a created wallet", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "userId": { "type": "string" }, "creditAmount": { "type": "number" }, "address": { "type": "string" }, "denom": { "type": "string" }, "isTrialing": { "type": "boolean" }, "trialEndsAt": { "type": "string", "nullable": true, "description": "When the free trial expires, or null when the wallet is no longer trialing." }, "trialDurationDays": { "type": "number", "nullable": true, "description": "Total length of the free trial in days, or null when the wallet is no longer trialing." }, "topUpMinAmountUsd": { "type": "number", "description": "Minimum USD amount accepted by the next paid top-up for this wallet." }, "createdAt": { "type": "string" } }, "required": [ "id", "userId", "creditAmount", "address", "denom", "isTrialing", "trialEndsAt", "trialDurationDays", "topUpMinAmountUsd", "createdAt" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/wallet-settings": { "get": { "summary": "Get wallet settings", "operationId": "getWalletSettings", "description": "Retrieves the wallet settings for the current user's wallet", "tags": [ "WalletSetting" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Wallet settings retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "autoReloadEnabled": { "type": "boolean" }, "autoReloadMode": { "type": "string", "enum": [ "threshold", "prediction" ], "description": "Rule used to decide when and how much to top up." }, "autoReloadThreshold": { "type": "number", "description": "USD credit balance at or below which an automatic top-up is triggered." }, "autoReloadAmount": { "type": "number", "description": "USD amount charged to the default payment method on each automatic top-up." }, "autoReloadPausedAt": { "type": "string", "nullable": true, "description": "When automatic top-ups were paused because the default payment method kept being declined, or null when they are running. Changing the default payment method resumes them." } }, "required": [ "autoReloadEnabled", "autoReloadMode", "autoReloadThreshold", "autoReloadAmount", "autoReloadPausedAt" ] } }, "required": [ "data" ] } } } }, "404": { "description": "UserWallet Not Found" } } }, "post": { "summary": "Create wallet settings", "operationId": "createWalletSettings", "description": "Creates wallet settings for a user wallet", "tags": [ "WalletSetting" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "autoReloadEnabled": { "type": "boolean" }, "autoReloadMode": { "type": "string", "enum": [ "threshold", "prediction" ], "description": "Rule used to decide when and how much to top up: `threshold` charges the fixed amount as soon as the balance reaches the threshold, `prediction` covers the next 7 days of projected spend. Defaults to `prediction` on create when omitted; left unchanged on update." }, "autoReloadThreshold": { "type": "number", "minimum": 10, "maximum": 10000, "description": "USD credit balance at or below which an automatic top-up is triggered (minimum 10, maximum 10000). Defaults are applied on create when omitted." }, "autoReloadAmount": { "type": "number", "minimum": 25, "maximum": 10000, "description": "USD amount charged on each automatic top-up (minimum 25, maximum 10000). Defaults are applied on create when omitted." } }, "required": [ "autoReloadEnabled" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Wallet settings created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "autoReloadEnabled": { "type": "boolean" }, "autoReloadMode": { "type": "string", "enum": [ "threshold", "prediction" ], "description": "Rule used to decide when and how much to top up." }, "autoReloadThreshold": { "type": "number", "description": "USD credit balance at or below which an automatic top-up is triggered." }, "autoReloadAmount": { "type": "number", "description": "USD amount charged to the default payment method on each automatic top-up." }, "autoReloadPausedAt": { "type": "string", "nullable": true, "description": "When automatic top-ups were paused because the default payment method kept being declined, or null when they are running. Changing the default payment method resumes them." } }, "required": [ "autoReloadEnabled", "autoReloadMode", "autoReloadThreshold", "autoReloadAmount", "autoReloadPausedAt" ] } }, "required": [ "data" ] } } } }, "404": { "description": "UserWallet Not Found" } } }, "put": { "summary": "Update wallet settings", "operationId": "updateWalletSettings", "description": "Updates wallet settings for a user wallet", "tags": [ "WalletSetting" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "autoReloadEnabled": { "type": "boolean" }, "autoReloadMode": { "type": "string", "enum": [ "threshold", "prediction" ], "description": "Rule used to decide when and how much to top up: `threshold` charges the fixed amount as soon as the balance reaches the threshold, `prediction` covers the next 7 days of projected spend. Defaults to `prediction` on create when omitted; left unchanged on update." }, "autoReloadThreshold": { "type": "number", "minimum": 10, "maximum": 10000, "description": "USD credit balance at or below which an automatic top-up is triggered (minimum 10, maximum 10000). Defaults are applied on create when omitted." }, "autoReloadAmount": { "type": "number", "minimum": 25, "maximum": 10000, "description": "USD amount charged on each automatic top-up (minimum 25, maximum 10000). Defaults are applied on create when omitted." } }, "required": [ "autoReloadEnabled" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Wallet settings updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "autoReloadEnabled": { "type": "boolean" }, "autoReloadMode": { "type": "string", "enum": [ "threshold", "prediction" ], "description": "Rule used to decide when and how much to top up." }, "autoReloadThreshold": { "type": "number", "description": "USD credit balance at or below which an automatic top-up is triggered." }, "autoReloadAmount": { "type": "number", "description": "USD amount charged to the default payment method on each automatic top-up." }, "autoReloadPausedAt": { "type": "string", "nullable": true, "description": "When automatic top-ups were paused because the default payment method kept being declined, or null when they are running. Changing the default payment method resumes them." } }, "required": [ "autoReloadEnabled", "autoReloadMode", "autoReloadThreshold", "autoReloadAmount", "autoReloadPausedAt" ] } }, "required": [ "data" ] } } } }, "404": { "description": "UserWallet Not Found" } } }, "delete": { "summary": "Delete wallet settings", "operationId": "deleteWalletSettings", "description": "Deletes wallet settings for a user wallet", "tags": [ "WalletSetting" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "204": { "description": "Wallet settings deleted successfully" }, "404": { "description": "UserWallet Not Found" } } } }, "/v1/tx": { "post": { "summary": "Signs a transaction via a user managed wallet", "tags": [ "Wallet" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "userId": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "typeUrl": { "type": "string", "enum": [ "/akash.deployment.v1beta4.MsgCreateDeployment", "/akash.cert.v1.MsgCreateCertificate", "/akash.market.v1beta5.MsgCreateLease", "/akash.deployment.v1beta4.MsgUpdateDeployment", "/akash.deployment.v1beta4.MsgCloseDeployment", "/akash.escrow.v1.MsgAccountDeposit" ] }, "value": { "type": "string" } }, "required": [ "typeUrl", "value" ] }, "minItems": 1 } }, "required": [ "userId", "messages" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Returns a signed transaction", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "number" }, "transactionHash": { "type": "string" }, "rawLog": { "type": "string" } }, "required": [ "code", "transactionHash", "rawLog" ] } }, "required": [ "data" ] } } } } } } }, "/v1/stripe-webhook": { "post": { "summary": "Stripe Webhook Handler", "tags": [ "Payment" ], "security": [], "requestBody": { "content": { "text/plain": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "Webhook processed successfully", "content": {} }, "400": { "description": "Stripe signature is required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/v1/stripe/prices": { "get": { "operationId": "listStripePrices", "summary": "Get available Stripe pricing options", "description": "Retrieves the list of available pricing options for wallet top-ups, including custom amounts and standard pricing tiers", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Available pricing options retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string" }, "unitAmount": { "type": "number" }, "isCustom": { "type": "boolean" } }, "required": [ "currency", "unitAmount", "isCustom" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/coupons/apply": { "post": { "operationId": "applyStripeCoupon", "summary": "Apply a coupon to the current user", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "couponId": { "type": "string" }, "userId": { "type": "string" }, "awaitResolved": { "type": "boolean" } }, "required": [ "couponId", "userId" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Coupon applied successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "coupon": { "type": "object", "nullable": true, "properties": { "id": { "type": "string" }, "percent_off": { "type": "number", "nullable": true }, "amount_off": { "type": "number", "nullable": true }, "valid": { "type": "boolean", "nullable": true }, "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true } }, "required": [ "id" ] }, "amountAdded": { "type": "number" }, "transactionId": { "type": "string" }, "transactionStatus": { "type": "string", "enum": [ "created", "pending", "requires_action", "succeeded", "failed", "refunded", "canceled" ] }, "error": { "type": "object", "properties": { "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "message" ] } } } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/customers/organization": { "put": { "operationId": "updateStripeCustomerOrganization", "summary": "Update customer organization", "description": "Updates the organization/business name for the current user's Stripe customer account", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "organization": { "type": "string" } }, "required": [ "organization" ] } } } }, "responses": { "204": { "description": "Organization updated successfully" } } } }, "/v1/stripe/payment-methods/setup": { "post": { "operationId": "createSetupIntent", "summary": "Create a Stripe SetupIntent for adding a payment method", "description": "Creates a Stripe SetupIntent that allows users to securely add payment methods to their account. The SetupIntent provides a client secret that can be used with Stripe's frontend SDKs to collect payment method details.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "SetupIntent created successfully with client secret", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "clientSecret": { "type": "string", "nullable": true } }, "required": [ "clientSecret" ] } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/payment-methods/default": { "post": { "operationId": "setDefaultPaymentMethod", "summary": "Marks a payment method as the default.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Payment method is marked as the default successfully." } } }, "get": { "operationId": "getDefaultPaymentMethod", "summary": "Get the default payment method for the current user", "description": "Retrieves the default payment method associated with the current user's account, including card details, validation status, and billing information.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Default payment method retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "validated": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "card": { "type": "object", "nullable": true, "properties": { "brand": { "type": "string", "nullable": true }, "last4": { "type": "string", "nullable": true }, "exp_month": { "type": "number" }, "exp_year": { "type": "number" }, "funding": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "network": { "type": "string", "nullable": true }, "three_d_secure_usage": { "type": "object", "nullable": true, "properties": { "supported": { "type": "boolean", "nullable": true } } } }, "required": [ "brand", "last4", "exp_month", "exp_year" ] }, "link": { "type": "object", "nullable": true, "properties": { "email": { "type": "string", "nullable": true } } }, "billing_details": { "type": "object", "properties": { "address": { "type": "object", "nullable": true, "properties": { "city": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "line1": { "type": "string", "nullable": true }, "line2": { "type": "string", "nullable": true }, "postal_code": { "type": "string", "nullable": true }, "state": { "type": "string", "nullable": true } }, "required": [ "city", "country", "line1", "line2", "postal_code", "state" ] }, "email": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true } } }, "id": { "type": "string" } }, "required": [ "type", "id" ] } }, "required": [ "data" ] } } } }, "404": { "description": "Default payment method not found" } } } }, "/v1/stripe/payment-methods": { "get": { "operationId": "listPaymentMethods", "summary": "Get all payment methods for the current user", "description": "Retrieves all saved payment methods associated with the current user's account, including card details, validation status, and billing information.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Payment methods retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "validated": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "card": { "type": "object", "nullable": true, "properties": { "brand": { "type": "string", "nullable": true }, "last4": { "type": "string", "nullable": true }, "exp_month": { "type": "number" }, "exp_year": { "type": "number" }, "funding": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "network": { "type": "string", "nullable": true }, "three_d_secure_usage": { "type": "object", "nullable": true, "properties": { "supported": { "type": "boolean", "nullable": true } } } }, "required": [ "brand", "last4", "exp_month", "exp_year" ] }, "link": { "type": "object", "nullable": true, "properties": { "email": { "type": "string", "nullable": true } } }, "billing_details": { "type": "object", "properties": { "address": { "type": "object", "nullable": true, "properties": { "city": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "line1": { "type": "string", "nullable": true }, "line2": { "type": "string", "nullable": true }, "postal_code": { "type": "string", "nullable": true }, "state": { "type": "string", "nullable": true } }, "required": [ "city", "country", "line1", "line2", "postal_code", "state" ] }, "email": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true } } }, "id": { "type": "string" } }, "required": [ "type", "id" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/payment-methods/{paymentMethodId}": { "delete": { "operationId": "deletePaymentMethod", "summary": "Remove a payment method", "description": "Permanently removes a saved payment method from the user's account. This action cannot be undone.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "description": "The unique identifier of the payment method to remove", "example": "pm_1234567890" }, "required": true, "name": "paymentMethodId", "in": "path" } ], "responses": { "204": { "description": "Payment method removed successfully" } } } }, "/v1/stripe/payment-methods/validate": { "post": { "operationId": "validatePaymentMethod", "summary": "Validates a payment method after 3D Secure authentication", "description": "Completes the validation process for a payment method that required 3D Secure authentication. This endpoint should be called after the user completes the 3D Secure challenge.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "paymentMethodId": { "type": "string" }, "paymentIntentId": { "type": "string" } }, "required": [ "paymentMethodId", "paymentIntentId" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Payment method validated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": [ "success" ] } } } } } } }, "/v1/stripe/transactions/confirm": { "post": { "operationId": "confirmStripeTransaction", "summary": "Confirm a payment using a saved payment method", "description": "Processes a payment using a previously saved payment method. This endpoint handles wallet top-ups and may require 3D Secure authentication for certain payment methods or amounts.", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "userId": { "type": "string" }, "paymentMethodId": { "type": "string" }, "amount": { "type": "number", "minimum": 20 }, "awaitResolved": { "type": "boolean" }, "idempotencyKey": { "type": "string", "format": "uuid" } }, "required": [ "userId", "paymentMethodId", "amount" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Payment processed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "success": { "type": "boolean" }, "requiresAction": { "type": "boolean" }, "clientSecret": { "type": "string" }, "paymentIntentId": { "type": "string" }, "transactionId": { "type": "string" }, "transactionStatus": { "type": "string", "enum": [ "created", "pending", "requires_action", "succeeded", "failed", "refunded", "canceled" ] } }, "required": [ "success", "transactionId" ] } }, "required": [ "data" ] } } } }, "202": { "description": "3D Secure authentication required to complete payment", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "success": { "type": "boolean" }, "requiresAction": { "type": "boolean" }, "clientSecret": { "type": "string" }, "paymentIntentId": { "type": "string" }, "transactionId": { "type": "string" }, "transactionStatus": { "type": "string", "enum": [ "created", "pending", "requires_action", "succeeded", "failed", "refunded", "canceled" ] } }, "required": [ "success", "transactionId" ] } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/transactions": { "get": { "operationId": "listStripeTransactions", "summary": "Get transaction history for the current customer", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "number", "description": "Number of transactions to return", "minimum": 1, "maximum": 100, "example": 100, "default": 100 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "number", "description": "Number of transactions to skip for pagination", "minimum": 0, "example": 0, "default": 0 }, "required": false, "name": "offset", "in": "query" }, { "schema": { "type": "string", "format": "date-time", "description": "Start date for filtering transactions (inclusive)", "example": "2025-01-01T00:00:00Z" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "date-time", "description": "End date for filtering transactions (inclusive)", "example": "2025-01-02T00:00:00Z" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Customer transactions retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "payment_intent", "coupon_claim", "manual_credit" ] }, "amount": { "type": "number" }, "amountRefunded": { "type": "number" }, "bonusAmount": { "type": "number" }, "currency": { "type": "string" }, "status": { "type": "string" }, "created": { "type": "number" }, "cardBrand": { "type": "string", "nullable": true }, "cardLast4": { "type": "string", "nullable": true }, "stripeInvoiceId": { "type": "string", "nullable": true }, "receiptUrl": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true } }, "required": [ "id", "type", "amount", "amountRefunded", "currency", "status", "created" ] } }, "totalCount": { "type": "number" }, "hasMore": { "type": "boolean" } }, "required": [ "transactions", "totalCount", "hasMore" ] } }, "required": [ "data" ] } } } } } } }, "/v1/stripe/transactions/export": { "get": { "operationId": "exportStripeTransactions", "summary": "Export transaction history as CSV for the current customer", "tags": [ "Payment" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "description": "Timezone for date formatting in the CSV", "example": "America/New_York" }, "required": true, "name": "timezone", "in": "query" }, { "schema": { "type": "string", "format": "date-time", "description": "Start date for filtering transactions (inclusive)", "example": "2025-01-01T00:00:00Z" }, "required": true, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "date-time", "description": "End date for filtering transactions (inclusive)", "example": "2025-01-02T00:00:00Z" }, "required": true, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "CSV file with transaction data", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } } } } }, "/v1/usage/history": { "get": { "summary": "Get historical data of billing and usage for a wallet address.", "tags": [ "Billing" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "The wallet address to get billing and usage data for", "example": "akash18andxgtd6r08zzfpcdqg9pdr6smks7gv76tyt6" }, "required": true, "name": "address", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "Start date (YYYY-MM-DD), inclusive. Defaults to a 30-day window ending at endDate", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "End date (YYYY-MM-DD), inclusive. Defaults to today (UTC)", "example": "2024-01-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Returns billing and usage data", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "description": "Date in YYYY-MM-DD format", "example": "2024-01-15" }, "activeDeployments": { "type": "number", "description": "Number of active deployments on this date", "example": 3 }, "dailyAktSpent": { "type": "number", "description": "AKT tokens spent on this date", "example": 12.5 }, "totalAktSpent": { "type": "number", "description": "Cumulative AKT tokens spent up to this date", "example": 125.75 }, "dailyUsdcSpent": { "type": "number", "description": "USDC spent on this date", "example": 5.25 }, "totalUsdcSpent": { "type": "number", "description": "Cumulative USDC spent up to this date", "example": 52.5 }, "dailyActSpent": { "type": "number", "description": "ACT spent on this date (includes legacy USDC)", "example": 5.25 }, "totalActSpent": { "type": "number", "description": "Cumulative ACT spent up to this date (includes legacy USDC)", "example": 52.5 }, "dailyUsdSpent": { "type": "number", "description": "Total USD value spent on this date (AKT + USDC)", "example": 17.75 }, "totalUsdSpent": { "type": "number", "description": "Cumulative USD value spent up to this date", "example": 178.25 } }, "required": [ "date", "activeDeployments", "dailyAktSpent", "totalAktSpent", "dailyUsdcSpent", "totalUsdcSpent", "dailyActSpent", "totalActSpent", "dailyUsdSpent", "totalUsdSpent" ] } } } } }, "400": { "description": "Invalid address format or invalid date range: dates must be YYYY-MM-DD, startDate must not be after endDate and the range cannot exceed 366 days" } } } }, "/v1/usage/history/stats": { "get": { "summary": "Get historical usage stats for a wallet address.", "tags": [ "Billing" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "The wallet address to get billing and usage data for", "example": "akash18andxgtd6r08zzfpcdqg9pdr6smks7gv76tyt6" }, "required": true, "name": "address", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "Start date (YYYY-MM-DD), inclusive. Defaults to a 30-day window ending at endDate", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "End date (YYYY-MM-DD), inclusive. Defaults to today (UTC)", "example": "2024-01-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Returns usage stats data", "content": { "application/json": { "schema": { "type": "object", "properties": { "totalSpent": { "type": "number", "description": "Total amount spent in USD", "example": 1234.56 }, "averageSpentPerDay": { "type": "number", "description": "Average spending per day in USD", "example": 12.34 }, "totalDeployments": { "type": "number", "description": "Total number of deployments deployed", "example": 15 }, "averageDeploymentsPerDay": { "type": "number", "description": "Average number of deployments deployed per day", "example": 1.5 } }, "required": [ "totalSpent", "averageSpentPerDay", "totalDeployments", "averageDeploymentsPerDay" ] } } } }, "400": { "description": "Invalid address format or invalid date range: dates must be YYYY-MM-DD, startDate must not be after endDate and the range cannot exceed 366 days" } } } }, "/v1/register-user": { "post": { "summary": "Registers a new user", "tags": [ "Users" ], "security": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "wantedUsername": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "subscribedToNewsletter": { "type": "boolean" } }, "required": [ "wantedUsername", "email", "emailVerified" ] } } } }, "responses": { "200": { "description": "Returns the registered user", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "username": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "stripeCustomerId": { "type": "string", "nullable": true }, "bio": { "type": "string", "nullable": true }, "subscribedToNewsletter": { "type": "boolean" }, "youtubeUsername": { "type": "string", "nullable": true }, "twitterUsername": { "type": "string", "nullable": true }, "githubUsername": { "type": "string", "nullable": true }, "onboardingSkippedAt": { "type": "string", "nullable": true, "format": "date-time" }, "fairUsePolicyAcceptedAt": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "id", "userId", "username", "email", "emailVerified", "subscribedToNewsletter" ] }, "isNewUser": { "type": "boolean" } }, "required": [ "data", "isNewUser" ] } } } } } } }, "/v1/user/me": { "get": { "summary": "Retrieves the logged in user", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Returns the logged in user", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "username": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "stripeCustomerId": { "type": "string", "nullable": true }, "bio": { "type": "string", "nullable": true }, "subscribedToNewsletter": { "type": "boolean" }, "youtubeUsername": { "type": "string", "nullable": true }, "twitterUsername": { "type": "string", "nullable": true }, "githubUsername": { "type": "string", "nullable": true }, "onboardingSkippedAt": { "type": "string", "nullable": true, "format": "date-time" }, "fairUsePolicyAcceptedAt": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "id", "userId", "username", "email", "emailVerified", "subscribedToNewsletter" ] } }, "required": [ "data" ] } } } } } } }, "/v1/user/byUsername/{username}": { "get": { "summary": "Get user by username", "tags": [ "Users" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": true, "name": "username", "in": "path" } ], "responses": { "200": { "description": "Returns user profile", "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string" }, "bio": { "type": "string", "nullable": true } }, "required": [ "username", "bio" ] } } } }, "404": { "description": "User not found" } } } }, "/v1/user/updateSettings": { "put": { "summary": "Update user settings", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string", "pattern": "^[a-zA-Z0-9_-]+$" }, "subscribedToNewsletter": { "type": "boolean" }, "bio": { "type": "string", "nullable": true, "maxLength": 5000 }, "youtubeUsername": { "type": "string", "nullable": true, "maxLength": 200 }, "twitterUsername": { "type": "string", "nullable": true, "maxLength": 200 }, "githubUsername": { "type": "string", "nullable": true, "maxLength": 200 } }, "required": [ "username" ] } } } }, "responses": { "200": { "description": "Settings updated successfully" }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/checkUsernameAvailability/{username}": { "get": { "summary": "Check if username is available", "tags": [ "Users" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": true, "name": "username", "in": "path" } ], "responses": { "200": { "description": "Returns username availability", "content": { "application/json": { "schema": { "type": "object", "properties": { "isAvailable": { "type": "boolean" } }, "required": [ "isAvailable" ] } } } } } } }, "/v1/user/subscribeToNewsletter": { "post": { "summary": "Subscribe to newsletter", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Subscribed successfully" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/skipOnboarding": { "post": { "summary": "Skip onboarding", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "204": { "description": "Onboarding skipped" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/acceptFairUsePolicy": { "post": { "operationId": "acceptFairUsePolicy", "summary": "Accept the Fair Use Policy", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "204": { "description": "Fair Use Policy accepted" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/template/{id}": { "get": { "summary": "Get template by ID", "tags": [ "Users" ], "security": [], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Returns template" }, "400": { "description": "Invalid template ID" }, "404": { "description": "Template not found" } } } }, "/v1/user/saveTemplate": { "post": { "summary": "Save template", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "sdl": { "type": "string" }, "title": { "type": "string" }, "cpu": { "type": "number" }, "ram": { "type": "number" }, "storage": { "type": "number" }, "isPublic": { "type": "boolean" }, "description": { "type": "string", "maxLength": 2000 } }, "required": [ "sdl", "title", "cpu", "ram", "storage", "isPublic" ] } } } }, "responses": { "200": { "description": "Template saved successfully" }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/saveTemplateDesc": { "post": { "summary": "Save template description", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "description": { "type": "string" } }, "required": [ "id", "description" ] } } } }, "responses": { "200": { "description": "Template description saved successfully" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/templates/{username}": { "get": { "summary": "Get templates by username", "tags": [ "Users" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": true, "name": "username", "in": "path" } ], "responses": { "200": { "description": "Returns templates" }, "404": { "description": "User not found" } } } }, "/v1/user/deleteTemplate/{id}": { "delete": { "summary": "Delete template", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Template deleted successfully" }, "400": { "description": "Invalid template ID" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/favoriteTemplates": { "get": { "summary": "Get favorite templates", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Returns favorite templates" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/addFavoriteTemplate/{templateId}": { "post": { "summary": "Add favorite template", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "templateId", "in": "path" } ], "responses": { "200": { "description": "Template added to favorites" }, "400": { "description": "Invalid template ID" }, "401": { "description": "Unauthorized" } } } }, "/v1/user/removeFavoriteTemplate/{templateId}": { "delete": { "summary": "Remove favorite template", "tags": [ "Users" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "templateId", "in": "path" } ], "responses": { "200": { "description": "Template removed from favorites" }, "400": { "description": "Invalid template ID" }, "401": { "description": "Unauthorized" } } } }, "/v1/send-verification-email": { "post": { "summary": "Resends a verification email", "tags": [ "Users" ], "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Returns a created wallet", "content": {} } } } }, "/v1/send-verification-code": { "post": { "summary": "Sends a verification code to the authenticated user's email", "tags": [ "Users" ], "security": [ { "BearerAuth": [] } ], "responses": { "200": { "description": "Returns the timestamp when the code was sent", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "codeSentAt": { "type": "string" } }, "required": [ "codeSentAt" ] } }, "required": [ "data" ] } } } }, "429": { "description": "Too many requests" } } } }, "/v1/auth/signup": { "post": { "summary": "Creates a new user without sending a verification email", "tags": [ "Auth" ], "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 8 } }, "required": [ "email", "password" ] } } } }, "responses": { "204": { "description": "User created successfully" }, "400": { "description": "The email or password was rejected" }, "422": { "description": "Account could not be created" }, "429": { "description": "Too many attempts" }, "502": { "description": "Account creation is temporarily unavailable" } } } }, "/v1/verify-email-code": { "post": { "summary": "Verifies the email using a 6-digit code", "tags": [ "Users" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string", "pattern": "^\\d{6}$" } }, "required": [ "code" ] } }, "required": [ "data" ] } } } }, "responses": { "204": { "description": "Email verified successfully" }, "400": { "description": "Invalid or expired code" }, "429": { "description": "Too many attempts" } } } }, "/v1/verify-email": { "post": { "summary": "Checks if the email is verified", "tags": [ "Users" ], "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "email": { "type": "string", "format": "email" } }, "required": [ "email" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Returns email verification status", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "emailVerified": { "type": "boolean" } }, "required": [ "emailVerified" ] } }, "required": [ "data" ] } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } } } }, "/v1/deployment-funding-config": { "get": { "summary": "Get deployment funding config", "operationId": "getDeploymentFundingConfig", "tags": [ "Deployments" ], "security": [], "responses": { "200": { "description": "Returns the platform constants automatic deployment funding runs on", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "targetRunwayHours": { "type": "number", "description": "Hours of runtime automatic funding reserves for a deployment once its lease starts" }, "balanceHeadroomUsd": { "type": "number", "description": "USD amount automatic funding leaves untouched in the available balance so new deployments can still be created" }, "defaultDepositUsd": { "type": "number", "description": "USD amount every deployment is bootstrapped with at creation, before funding tops it up toward the target runway" } }, "required": [ "targetRunwayHours", "balanceHeadroomUsd", "defaultDepositUsd" ] } }, "required": [ "data" ] } } } } } } }, "/v1/deployment-settings/{userId}/{dseq}": { "get": { "summary": "Get deployment settings by user ID and dseq", "tags": [ "Deployment Settings" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "description": "User ID" }, "required": true, "name": "userId", "in": "path" }, { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "name": "dseq", "in": "path" } ], "responses": { "200": { "description": "Returns deployment settings", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } }, "404": { "description": "Deployment settings not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } }, "patch": { "summary": "Update deployment settings", "tags": [ "Deployment Settings" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "description": "User ID" }, "required": true, "name": "userId", "in": "path" }, { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "name": "dseq", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "runtimeLimitHours": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 8760, "description": "Runtime limit in hours, counted from lease start. On a deployment with no limit yet it may be at most 48. Extending an existing limit must raise it by at most 48 hours per request; send the new total rather than the increment. Lowering a limit is not supported. Send null to remove the limit and return the deployment to always-on funding." } } } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Deployment settings updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } }, "400": { "description": "Invalid runtime limit change", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } }, "404": { "description": "Deployment settings not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } }, "409": { "description": "Runtime limit changed concurrently", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/v1/deployment-settings": { "post": { "summary": "Create deployment settings", "tags": [ "Deployment Settings" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" } }, "required": [ "userId", "dseq" ] } }, "required": [ "data" ] } } } }, "responses": { "201": { "description": "Deployment settings created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } } } } }, "/v2/deployment-settings/{dseq}": { "get": { "summary": "Get deployment settings by dseq", "tags": [ "Deployment Settings" ], "operationId": "getDeploymentSetting", "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "name": "dseq", "in": "path" }, { "schema": { "type": "string", "format": "uuid", "description": "User ID. Defaults to the current authenticated user if not provided" }, "required": false, "name": "userId", "in": "query" } ], "responses": { "200": { "description": "Returns deployment settings", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } }, "404": { "description": "Deployment settings not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } }, "patch": { "summary": "Update deployment settings", "tags": [ "Deployment Settings" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "name": "dseq", "in": "path" }, { "schema": { "type": "string", "format": "uuid", "description": "User ID. Defaults to the current authenticated user if not provided" }, "required": false, "name": "userId", "in": "query" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "runtimeLimitHours": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 8760, "description": "Runtime limit in hours, counted from lease start. On a deployment with no limit yet it may be at most 48. Extending an existing limit must raise it by at most 48 hours per request; send the new total rather than the increment. Lowering a limit is not supported. Send null to remove the limit and return the deployment to always-on funding." } } } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Deployment settings updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } }, "400": { "description": "Invalid runtime limit change", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } }, "404": { "description": "Deployment settings not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } }, "409": { "description": "Runtime limit changed concurrently", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/v2/deployment-settings": { "post": { "summary": "Create deployment settings", "tags": [ "Deployment Settings" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "userId": { "type": "string", "format": "uuid", "description": "User ID. Defaults to the current authenticated user if not provided" } }, "required": [ "dseq" ] } }, "required": [ "data" ] } } } }, "responses": { "201": { "description": "Deployment settings created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "sdl": { "type": "string", "nullable": true }, "autoTopUpEnabled": { "type": "boolean" }, "estimatedTopUpAmount": { "type": "number" }, "topUpFrequencyMs": { "type": "number" }, "runtimeLimitHours": { "type": "integer", "nullable": true, "description": "Runtime limit in hours chosen at deployment creation, or null for always-on funding" }, "runtimeEndsAt": { "type": "string", "nullable": true, "format": "date-time", "description": "When the runtime limit is reached, anchored at lease start; null until the lease starts or when no limit is set" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "userId", "dseq", "sdl", "autoTopUpEnabled", "estimatedTopUpAmount", "topUpFrequencyMs", "runtimeLimitHours", "runtimeEndsAt", "createdAt", "updatedAt" ] } }, "required": [ "data" ] } } } } } } }, "/v1/deployments/{dseq}": { "get": { "summary": "Get a deployment", "operationId": "getDeployment", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "description": "Deployment sequence number", "name": "dseq", "in": "path" } ], "responses": { "200": { "description": "Returns deployment info", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "object", "nullable": true, "properties": { "forwarded_ports": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "port": { "type": "number" }, "externalPort": { "type": "number" }, "host": { "type": "string" }, "available": { "type": "number" } }, "required": [ "port", "externalPort" ] } } }, "ips": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "IP": { "type": "string" }, "Port": { "type": "number" }, "ExternalPort": { "type": "number" }, "Protocol": { "type": "string" } }, "required": [ "IP", "Port", "ExternalPort", "Protocol" ] } } }, "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "number" }, "total": { "type": "number" }, "uris": { "type": "array", "items": { "type": "string" } }, "observed_generation": { "type": "number" }, "replicas": { "type": "number" }, "updated_replicas": { "type": "number" }, "ready_replicas": { "type": "number" }, "available_replicas": { "type": "number" } }, "required": [ "name", "available", "total", "uris", "observed_generation", "replicas", "updated_replicas", "ready_replicas", "available_replicas" ] } } }, "required": [ "forwarded_ports", "ips", "services" ] } }, "required": [ "id", "state", "price", "created_at", "closed_on", "status" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] }, "name": { "type": "string", "nullable": true, "description": "The name this deployment carries, or null for one created before the console recorded names." }, "consoleSettings": { "type": "object", "nullable": true, "properties": { "sdl": { "type": "string", "description": "The SDL the console stored for this deployment. Re-serialized YAML, so not byte-identical to the submitted document." }, "manifestVersion": { "type": "string", "description": "Base64 of the manifest version this deployment commits on chain. Deliberately not a hash of the `sdl` above." } }, "required": [ "sdl", "manifestVersion" ], "description": "What the console recorded for this deployment, or null when it recorded nothing." } }, "required": [ "deployment", "leases", "escrow_account", "name", "consoleSettings" ] } }, "required": [ "data" ] } } } } } }, "delete": { "summary": "Close a deployment", "operationId": "closeDeployment", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "description": "Deployment sequence number", "name": "dseq", "in": "path" } ], "responses": { "200": { "description": "Deployment closed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": [ "success" ] } }, "required": [ "data" ] } } } } } }, "put": { "summary": "Update a deployment (deprecated)", "description": "Deprecated. Resubmits the whole SDL, so rotating one secret means re-supplying every other value the document carries, and the console cannot return a stored value for you to resupply. Use PATCH /v1/deployments/{dseq} instead. This endpoint will be removed in a future release.", "operationId": "updateDeployment", "deprecated": true, "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "description": "Deployment sequence number", "name": "dseq", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "sdl": { "type": "string" }, "name": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Renames the deployment. Omitting it keeps the name the deployment already carries, unlike the rest of the definition this endpoint replaces wholesale." } }, "required": [ "sdl" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Deployment updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "object", "nullable": true, "properties": { "forwarded_ports": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "port": { "type": "number" }, "externalPort": { "type": "number" }, "host": { "type": "string" }, "available": { "type": "number" } }, "required": [ "port", "externalPort" ] } } }, "ips": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "IP": { "type": "string" }, "Port": { "type": "number" }, "ExternalPort": { "type": "number" }, "Protocol": { "type": "string" } }, "required": [ "IP", "Port", "ExternalPort", "Protocol" ] } } }, "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "number" }, "total": { "type": "number" }, "uris": { "type": "array", "items": { "type": "string" } }, "observed_generation": { "type": "number" }, "replicas": { "type": "number" }, "updated_replicas": { "type": "number" }, "ready_replicas": { "type": "number" }, "available_replicas": { "type": "number" } }, "required": [ "name", "available", "total", "uris", "observed_generation", "replicas", "updated_replicas", "ready_replicas", "available_replicas" ] } } }, "required": [ "forwarded_ports", "ips", "services" ] } }, "required": [ "id", "state", "price", "created_at", "closed_on", "status" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "leases", "escrow_account" ] } }, "required": [ "data" ] } } } } } }, "patch": { "summary": "Patch a deployment", "description": "Patches the SDL the console stored for this deployment, or renames the deployment, or both; the SDL is never accepted from the request. Only the services named are touched. A `name` on its own touches no definition, so it renames a deployment the console holds no SDL for and neither broadcasts nor pushes a manifest. A patched environment variable is re-appended to its service's env list, so the order shown by GET may differ afterwards. A replaced secret takes effect when the deployment is next updated on chain, not in the workload already running. The definition is recorded before the chain transaction is broadcast, so a broadcast that fails leaves the console describing a manifest version the chain never saw. Re-sending the identical request repairs that: it recomputes the same manifest version, is accepted rather than refused, and goes on to broadcast and push the manifest.", "operationId": "patchDeployment", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "description": "Deployment sequence number", "name": "dseq", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "image": { "type": "string" }, "command": { "type": "array", "nullable": true, "items": { "type": "string" } }, "args": { "type": "array", "nullable": true, "items": { "type": "string" } }, "env": { "type": "object", "additionalProperties": { "type": "string", "nullable": true }, "description": "Merged into the service's env, keyed by environment variable name. A null value removes the variable. A patched variable is re-appended, so the order of the stored env list may change." }, "credentials": { "type": "object", "nullable": true, "properties": { "host": { "type": "string" }, "username": { "type": "string" }, "password": { "type": "string" } }, "required": [ "host", "username", "password" ], "description": "Private registry pull credentials. Null clears them." }, "expose": { "type": "object", "additionalProperties": { "type": "object", "properties": { "accept": { "type": "array", "items": { "type": "string" }, "description": "Custom domains. Replaces the existing list. Emptying it is rejected by providers that do not generate a hostname of their own, which leaves the patch recorded but undeployed." }, "httpOptions": { "type": "object", "properties": { "maxBodySize": { "type": "integer", "minimum": 1, "maximum": 104857600 }, "readTimeout": { "type": "integer", "minimum": 1, "maximum": 4294967295 }, "sendTimeout": { "type": "integer", "minimum": 1, "maximum": 4294967295 }, "nextTries": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "nextTimeout": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "nextCases": { "type": "array", "items": { "type": "string", "enum": [ "error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off" ] }, "minItems": 1, "description": "Conditions the proxy retries on. Replaces the existing list; \"off\" disables retrying and stands alone." } } } } }, "description": "Keyed by container port. Only hosts and http options are patchable; endpoint kind and count are fixed at create." }, "storage": { "type": "object", "additionalProperties": { "type": "object", "properties": { "mount": { "type": "string" }, "readOnly": { "type": "boolean" } } }, "description": "Keyed by volume name. Mount point and read-only flag only — sizes are fixed at create." } } }, "description": "Keyed by service name. Only the named services are touched; omitted services keep their current definition. Omit it entirely to patch nothing about the definition, which is how a deployment is renamed on its own." }, "name": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Renames the deployment. Supplied on its own it is the only patch that touches no definition, so it works on a deployment the console holds no SDL for and neither broadcasts nor pushes a manifest." }, "sealedSecrets": { "type": "string", "minLength": 1, "description": "Compact JWE sealing a flat name-to-value map, as on create, but holding only the names this patch replaces. Omitted names keep the values the deployment already stores." }, "ifManifestVersion": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Base64 manifest version this patch expects to be current. Rejected with 409 if the deployment has moved on, unless it moved on to the version this very patch produces, which makes a retry of it succeed. Omitting this does not turn the guard off: the patch is then guarded on the version it read for itself, so a concurrent patch still answers 409 rather than overwriting it." } } } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Deployment patched successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "object", "nullable": true, "properties": { "forwarded_ports": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "port": { "type": "number" }, "externalPort": { "type": "number" }, "host": { "type": "string" }, "available": { "type": "number" } }, "required": [ "port", "externalPort" ] } } }, "ips": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "IP": { "type": "string" }, "Port": { "type": "number" }, "ExternalPort": { "type": "number" }, "Protocol": { "type": "string" } }, "required": [ "IP", "Port", "ExternalPort", "Protocol" ] } } }, "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "number" }, "total": { "type": "number" }, "uris": { "type": "array", "items": { "type": "string" } }, "observed_generation": { "type": "number" }, "replicas": { "type": "number" }, "updated_replicas": { "type": "number" }, "ready_replicas": { "type": "number" }, "available_replicas": { "type": "number" } }, "required": [ "name", "available", "total", "uris", "observed_generation", "replicas", "updated_replicas", "ready_replicas", "available_replicas" ] } } }, "required": [ "forwarded_ports", "ips", "services" ] } }, "required": [ "id", "state", "price", "created_at", "closed_on", "status" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] }, "manifestVersion": { "type": "string", "description": "Base64 manifest version this patch recorded and committed on chain. Absent for a rename, which records none." } }, "required": [ "deployment", "leases", "escrow_account" ] } }, "required": [ "data" ] } } } }, "400": { "description": "The patch names a service, port or volume the stored SDL does not declare, supplies a secret name it does not reference, or leaves a reference with no value", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "404": { "description": "No SDL is recorded for this deployment, so there is nothing to patch. A rename answers this only when the chain holds no such deployment for the caller, since it needs no recorded SDL", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "409": { "description": "The deployment definition changed between this patch reading it and writing it. A patch naming no `ifManifestVersion` is guarded on the version it read, so a concurrent patch produces this too. Re-sending the identical patch is not a conflict, because the version it recomputes is the one the row already holds", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "500": { "description": "The deployment's stored state could not be read: `code` is `stored_secrets_unreadable` when the sealed secrets would not open and `stored_sdl_unreadable` when the recorded SDL would not parse. Both are permanent rather than transient, so a retry cannot help, and both leave the stored token untouched. A 500 carrying any other `code` is an unexpected failure and promises neither of those things", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "503": { "description": "The key management service is temporarily unreachable. Transient and worth retrying, unlike the 500 above", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } } } } }, "/v1/deployments": { "post": { "summary": "Create new deployment", "operationId": "createDeployment", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "sdl": { "type": "string", "maxLength": 524288 }, "name": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Name for this deployment, shown wherever it is listed. Omit it and the console names the deployment after the services the SDL declares, joined with `+`." }, "sealedSecrets": { "type": "string", "minLength": 1, "description": "Compact JWE sealing a flat name-to-value map of the secrets this SDL references, encrypted to the console's public sealing key. Fetch that key and the claims to sign from GET /v1/sdl-secrets-context. Values are never returned by any endpoint once sealed." }, "inheritSecretsFrom": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Dseq of one of your own deployments whose stored secrets this deployment starts from, for redeploying an SDL without re-entering its values. The source may be closed. A name also present in `sealedSecrets` takes precedence over the inherited one." }, "deposit": { "type": "number", "description": "Deprecated and ignored. The platform funds every deployment automatically from your account credits.", "deprecated": true }, "runtimeLimitHours": { "type": "integer", "minimum": 1, "maximum": 48, "description": "Optional runtime limit in hours (1 to 48), counted from lease start. Automatic funding keeps the deployment running until the limit, then the deployment is closed automatically and unused funds are returned. Extend a limit with PATCH /v2/deployment-settings/{dseq}. Omit for always-on funding." } }, "required": [ "sdl" ] } }, "required": [ "data" ] } } } }, "responses": { "201": { "description": "Create deployment successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "manifest": { "type": "string" }, "signTx": { "type": "object", "properties": { "code": { "type": "number" }, "transactionHash": { "type": "string" }, "rawLog": { "type": "string" } }, "required": [ "code", "transactionHash", "rawLog" ] } }, "required": [ "dseq", "manifest", "signTx" ] } }, "required": [ "data" ] } } } }, "400": { "description": "The SDL leaves a secret reference with no value from either `sealedSecrets` or the deployment named by `inheritSecretsFrom`, supplies a name no service references, would carry more secrets than one deployment may hold, or carries a `sealedSecrets` value that is malformed, tampered with, expired or not a flat object of string values", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "403": { "description": "The `sealedSecrets` value was sealed for a different user, or bound to a different SDL than the one submitted", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "404": { "description": "No deployment of yours matches `inheritSecretsFrom`. Deliberately says nothing about whether that deployment exists", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "409": { "description": "Either the `sealedSecrets` value was sealed to a key the console no longer holds — refetch `GET /v1/sdl-secrets-context` and seal again — or, with `code` `inherited_secrets_unreadable`, the secrets recorded for the deployment named by `inheritSecretsFrom` can no longer be decrypted. The second is permanent rather than transient, so a retry cannot help; supply the values in `sealedSecrets` instead", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } }, "503": { "description": "The key management service is temporarily unreachable. Transient and worth retrying, unlike the 409 above", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" }, "type": { "type": "string" } }, "required": [ "error", "message", "code", "type" ] } } } } } }, "get": { "summary": "List deployments with pagination and filtering", "operationId": "listDeployments", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "number", "nullable": true, "minimum": 0 }, "required": false, "name": "skip", "in": "query" }, { "schema": { "type": "number", "minimum": 1, "default": 1000 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Returns paginated list of deployments", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployments": { "type": "array", "items": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "id", "state", "price", "created_at", "closed_on" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] }, "name": { "type": "string", "nullable": true, "description": "The name this deployment carries, or null for one created before the console recorded names." } }, "required": [ "deployment", "leases", "escrow_account", "name" ] } }, "pagination": { "type": "object", "properties": { "total": { "type": "number" }, "skip": { "type": "number" }, "limit": { "type": "number" }, "hasMore": { "type": "boolean" } }, "required": [ "total", "skip", "limit", "hasMore" ] } }, "required": [ "deployments", "pagination" ] } }, "required": [ "data" ] } } } } } } }, "/v1/deposit-deployment": { "post": { "summary": "Deposit into a deployment (deprecated)", "description": "Deprecated. Managed deployments are funded automatically; this endpoint will be removed in a future release.", "operationId": "depositDeployment", "deprecated": true, "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "deposit": { "type": "number", "description": "Amount to deposit in dollars (e.g. 5.5). Accepted for backwards compatibility; automatic funding makes it unnecessary." } }, "required": [ "dseq", "deposit" ] } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Deposit successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "object", "nullable": true, "properties": { "forwarded_ports": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "port": { "type": "number" }, "externalPort": { "type": "number" }, "host": { "type": "string" }, "available": { "type": "number" } }, "required": [ "port", "externalPort" ] } } }, "ips": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "IP": { "type": "string" }, "Port": { "type": "number" }, "ExternalPort": { "type": "number" }, "Protocol": { "type": "string" } }, "required": [ "IP", "Port", "ExternalPort", "Protocol" ] } } }, "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "number" }, "total": { "type": "number" }, "uris": { "type": "array", "items": { "type": "string" } }, "observed_generation": { "type": "number" }, "replicas": { "type": "number" }, "updated_replicas": { "type": "number" }, "ready_replicas": { "type": "number" }, "available_replicas": { "type": "number" } }, "required": [ "name", "available", "total", "uris", "observed_generation", "replicas", "updated_replicas", "ready_replicas", "available_replicas" ] } } }, "required": [ "forwarded_ports", "ips", "services" ] } }, "required": [ "id", "state", "price", "created_at", "closed_on", "status" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "leases", "escrow_account" ] } }, "required": [ "data" ] } } } } } } }, "/v1/addresses/{address}/deployments/{skip}/{limit}": { "get": { "summary": "Get a list of deployments by owner address.", "tags": [ "Addresses", "Deployments" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Wallet Address", "example": "akash13265twfqejnma6cc93rw5dxk4cldyz2zyy8cdm" }, "required": true, "name": "address", "in": "path" }, { "schema": { "type": "number", "nullable": true, "minimum": 0, "description": "Deployments to skip", "example": 10 }, "required": false, "name": "skip", "in": "path" }, { "schema": { "type": "number", "minimum": 1, "maximum": 100, "description": "Deployments to return", "example": 10 }, "required": true, "name": "limit", "in": "path" }, { "schema": { "type": "string", "enum": [ "active", "closed" ], "description": "Filter by status", "example": "closed" }, "required": true, "name": "status", "in": "query" }, { "schema": { "type": "string", "description": "Reverse sorting", "example": "true" }, "required": false, "name": "reverseSorting", "in": "query" } ], "responses": { "200": { "description": "Returns deployment list", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number" }, "results": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "status": { "type": "string" }, "createdHeight": { "type": "number" }, "cpuUnits": { "type": "number" }, "gpuUnits": { "type": "number" }, "memoryQuantity": { "type": "number" }, "storageQuantity": { "type": "number" }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "owner": { "type": "string" }, "provider": { "type": "object", "properties": { "address": { "type": "string" }, "hostUri": { "type": "string" } }, "required": [ "address", "hostUri" ] }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "id", "owner", "dseq", "gseq", "oseq", "state", "price" ] } } }, "required": [ "owner", "dseq", "status", "createdHeight", "cpuUnits", "gpuUnits", "memoryQuantity", "storageQuantity", "leases" ] } } }, "required": [ "count", "results" ] } } } }, "400": { "description": "Invalid address" } } } }, "/v1/deployment/{owner}/{dseq}": { "get": { "summary": "Get deployment details", "tags": [ "Deployments" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Owner's Address", "example": "akash13265twfqejnma6cc93rw5dxk4cldyz2zyy8cdm" }, "required": true, "name": "owner", "in": "path" }, { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$", "description": "Deployment sequence number" }, "required": true, "name": "dseq", "in": "path" } ], "responses": { "200": { "description": "Returns deployment details", "content": { "application/json": { "schema": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "balance": { "type": "number" }, "denom": { "type": "string" }, "status": { "type": "string" }, "totalMonthlyCostUDenom": { "type": "number" }, "leases": { "type": "array", "items": { "type": "object", "properties": { "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "object", "nullable": true, "properties": { "address": { "type": "string" }, "hostUri": { "type": "string" }, "isDeleted": { "type": "boolean" }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "address", "hostUri", "isDeleted", "attributes" ] }, "status": { "type": "string" }, "monthlyCostUDenom": { "type": "number" }, "cpuUnits": { "type": "number" }, "gpuUnits": { "type": "number" }, "memoryQuantity": { "type": "number" }, "storageQuantity": { "type": "number" } }, "required": [ "gseq", "oseq", "provider", "status", "monthlyCostUDenom", "cpuUnits", "gpuUnits", "memoryQuantity", "storageQuantity" ] } }, "events": { "type": "array", "items": { "type": "object", "properties": { "txHash": { "type": "string" }, "date": { "type": "string" }, "type": { "type": "string" } }, "required": [ "txHash", "date", "type" ] } }, "other": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string" }, "gseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq" ] }, "state": { "type": "string" }, "group_spec": { "type": "object", "properties": { "name": { "type": "string" }, "requirements": { "type": "object", "properties": { "signed_by": { "type": "object", "properties": { "all_of": { "type": "array", "items": { "type": "string" } }, "any_of": { "type": "array", "items": { "type": "string" } } }, "required": [ "all_of", "any_of" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "signed_by", "attributes" ] }, "resources": { "type": "array", "items": { "type": "object", "properties": { "resource": { "type": "object", "properties": { "id": { "type": "number" }, "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity", "attributes" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity", "attributes" ] } }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "sequence_number": { "type": "number" } }, "required": [ "kind", "sequence_number" ] } } }, "required": [ "id", "cpu", "memory", "storage", "gpu", "endpoints" ] }, "count": { "type": "number" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "resource", "count", "price" ] } } }, "required": [ "name", "requirements", "resources" ] }, "created_at": { "type": "string" } }, "required": [ "id", "state", "group_spec", "created_at" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "groups", "escrow_account" ] } }, "required": [ "owner", "dseq", "balance", "denom", "status", "totalMonthlyCostUDenom", "leases", "events", "other" ] } } } }, "400": { "description": "Invalid address or dseq" }, "404": { "description": "Deployment not found" } } } }, "/akash/deployment/{version}/deployments/list": { "get": { "summary": "List deployments (database fallback)", "tags": [ "Deployments" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": false, "name": "filters.owner", "in": "query" }, { "schema": { "type": "string", "enum": [ "active", "closed" ] }, "required": false, "name": "filters.state", "in": "query" }, { "schema": { "type": "number", "nullable": true, "minimum": 0 }, "required": false, "name": "pagination.offset", "in": "query" }, { "schema": { "type": "number", "nullable": true, "minimum": 0 }, "required": false, "name": "pagination.limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "pagination.key", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "pagination.count_total", "in": "query" }, { "schema": { "type": "boolean", "nullable": true }, "required": false, "name": "pagination.reverse", "in": "query" } ], "responses": { "200": { "description": "Returns paginated list of deployments from database", "content": { "application/json": { "schema": { "type": "object", "properties": { "deployments": { "type": "array", "items": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq" ] }, "state": { "type": "string" }, "group_spec": { "type": "object", "properties": { "name": { "type": "string" }, "requirements": { "type": "object", "properties": { "signed_by": { "type": "object", "properties": { "all_of": { "type": "array", "items": { "type": "string" } }, "any_of": { "type": "array", "items": { "type": "string" } } }, "required": [ "all_of", "any_of" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "signed_by", "attributes" ] }, "resources": { "type": "array", "items": { "type": "object", "properties": { "resource": { "type": "object", "properties": { "id": { "type": "number" }, "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity", "attributes" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity", "attributes" ] } }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "sequence_number": { "type": "number" } }, "required": [ "kind", "sequence_number" ] } } }, "required": [ "id", "cpu", "memory", "storage", "gpu", "endpoints" ] }, "count": { "type": "number" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "resource", "count", "price" ] } } }, "required": [ "name", "requirements", "resources" ] }, "created_at": { "type": "string" } }, "required": [ "id", "state", "group_spec", "created_at" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "groups", "escrow_account" ] } }, "pagination": { "type": "object", "properties": { "next_key": { "type": "string", "nullable": true }, "total": { "type": "string" } }, "required": [ "next_key", "total" ] } }, "required": [ "deployments", "pagination" ] } } } } } } }, "/akash/deployment/{version}/deployments/info": { "get": { "summary": "Get deployment info (database fallback)", "tags": [ "Deployments" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": true, "name": "id.owner", "in": "query" }, { "schema": { "type": "string" }, "required": true, "name": "id.dseq", "in": "query" } ], "responses": { "200": { "description": "Returns deployment info from database", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "code": { "type": "number" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "type": "string" } } }, "required": [ "code", "message", "details" ] }, { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq" ] }, "state": { "type": "string" }, "group_spec": { "type": "object", "properties": { "name": { "type": "string" }, "requirements": { "type": "object", "properties": { "signed_by": { "type": "object", "properties": { "all_of": { "type": "array", "items": { "type": "string" } }, "any_of": { "type": "array", "items": { "type": "string" } } }, "required": [ "all_of", "any_of" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "signed_by", "attributes" ] }, "resources": { "type": "array", "items": { "type": "object", "properties": { "resource": { "type": "object", "properties": { "id": { "type": "number" }, "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity", "attributes" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity", "attributes" ] } }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "sequence_number": { "type": "number" } }, "required": [ "kind", "sequence_number" ] } } }, "required": [ "id", "cpu", "memory", "storage", "gpu", "endpoints" ] }, "count": { "type": "number" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "resource", "count", "price" ] } } }, "required": [ "name", "requirements", "resources" ] }, "created_at": { "type": "string" } }, "required": [ "id", "state", "group_spec", "created_at" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "groups", "escrow_account" ] } ] } } } }, "404": { "description": "Deployment not found" } } } }, "/v1/weekly-cost": { "get": { "summary": "Get weekly deployment cost", "tags": [ "Deployments" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Returns weekly cost for all deployments with auto top-up enabled", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "weeklyCost": { "type": "number", "description": "Total weekly cost in USD for all deployments with auto top-up enabled" } }, "required": [ "weeklyCost" ] } }, "required": [ "data" ] } } } } } } }, "/v1/sdl-secrets-context": { "get": { "summary": "Get SDL secrets encryption context", "tags": [ "SDL Secrets" ], "operationId": "getSDLSecretsContext", "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Returns SDL secrets context", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "sub": { "type": "string", "description": "The subject of the SDL secrets context" }, "kid": { "type": "string", "description": "The key ID of the SDL secrets context" }, "jwk": { "type": "object", "properties": { "kty": { "type": "string" }, "n": { "type": "string" }, "e": { "type": "string" }, "use": { "type": "string" }, "alg": { "type": "string" } }, "required": [ "kty", "n", "e", "use", "alg" ], "description": "The JSON Web Key used to encrypt the SDL secrets" }, "requiredClaims": { "type": "array", "items": { "type": "string", "enum": [ "kid", "sub", "exp" ] }, "description": "The required claims for the SDL secrets context" } }, "required": [ "sub", "kid", "jwk", "requiredClaims" ] } }, "required": [ "data" ] } } } }, "503": { "description": "SDL secrets encryption is unavailable", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/v1/leases": { "post": { "summary": "Create leases and send manifest", "operationId": "createLease", "tags": [ "Leases" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "manifest": { "type": "string", "description": "The manifest to send to the provider, in YAML format (deprecated)", "deprecated": true }, "leases": { "type": "array", "items": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" } }, "required": [ "dseq", "gseq", "oseq", "provider" ] } } }, "required": [ "leases" ] } } } }, "responses": { "200": { "description": "Leases created and manifest sent", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deployment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" } }, "required": [ "owner", "dseq" ] }, "state": { "type": "string" }, "hash": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "state", "hash", "created_at" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "object", "nullable": true, "properties": { "forwarded_ports": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "port": { "type": "number" }, "externalPort": { "type": "number" }, "host": { "type": "string" }, "available": { "type": "number" } }, "required": [ "port", "externalPort" ] } } }, "ips": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "IP": { "type": "string" }, "Port": { "type": "number" }, "ExternalPort": { "type": "number" }, "Protocol": { "type": "string" } }, "required": [ "IP", "Port", "ExternalPort", "Protocol" ] } } }, "services": { "type": "object", "additionalProperties": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "number" }, "total": { "type": "number" }, "uris": { "type": "array", "items": { "type": "string" } }, "observed_generation": { "type": "number" }, "replicas": { "type": "number" }, "updated_replicas": { "type": "number" }, "ready_replicas": { "type": "number" }, "available_replicas": { "type": "number" } }, "required": [ "name", "available", "total", "uris", "observed_generation", "replicas", "updated_replicas", "ready_replicas", "available_replicas" ] } } }, "required": [ "forwarded_ports", "ips", "services" ] } }, "required": [ "id", "state", "price", "created_at", "closed_on", "status" ] } }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "deployment", "leases", "escrow_account" ] } }, "required": [ "data" ] } } } } } } }, "/akash/market/{version}/leases/list": { "get": { "summary": "List leases (database fallback)", "tags": [ "Leases" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": false, "name": "filters.owner", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "filters.dseq", "in": "query" }, { "schema": { "type": "number", "nullable": true }, "required": false, "name": "filters.gseq", "in": "query" }, { "schema": { "type": "number", "nullable": true }, "required": false, "name": "filters.oseq", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "filters.provider", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "filters.state", "in": "query" }, { "schema": { "type": "number", "nullable": true }, "required": false, "name": "pagination.offset", "in": "query" }, { "schema": { "type": "number", "nullable": true }, "required": false, "name": "pagination.limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "pagination.key", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "pagination.count_total", "in": "query" }, { "schema": { "type": "boolean", "nullable": true }, "required": false, "name": "pagination.reverse", "in": "query" } ], "responses": { "200": { "description": "Returns paginated list of leases from database", "content": { "application/json": { "schema": { "type": "object", "properties": { "leases": { "type": "array", "items": { "type": "object", "properties": { "lease": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "closed_on": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "id", "state", "price", "created_at", "closed_on" ] }, "escrow_payment": { "type": "object", "properties": { "id": { "type": "object", "properties": { "aid": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "xid": { "type": "string" } }, "required": [ "aid", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "rate": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "unsettled": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "withdrawn": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "state", "rate", "balance", "unsettled", "withdrawn" ] } }, "required": [ "id", "state" ] } }, "required": [ "lease", "escrow_payment" ] } }, "pagination": { "type": "object", "properties": { "next_key": { "type": "string", "nullable": true }, "total": { "type": "string" } }, "required": [ "next_key", "total" ] } }, "required": [ "leases", "pagination" ] } } } } } } }, "/v1/api-keys": { "get": { "summary": "List all API keys", "operationId": "listApiKeys", "tags": [ "API Keys" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Returns list of API keys", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "expiresAt": { "type": "string", "nullable": true, "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastUsedAt": { "type": "string", "nullable": true, "format": "date-time" }, "keyFormat": { "type": "string" } }, "required": [ "id", "name", "expiresAt", "createdAt", "updatedAt", "lastUsedAt", "keyFormat" ] } } }, "required": [ "data" ] } } } } } }, "post": { "summary": "Create new API key", "tags": [ "API Keys" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "name" ] } }, "required": [ "data" ] } } } }, "responses": { "201": { "description": "API key created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "expiresAt": { "type": "string", "nullable": true, "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastUsedAt": { "type": "string", "nullable": true, "format": "date-time" }, "keyFormat": { "type": "string" }, "apiKey": { "type": "string" } }, "required": [ "id", "name", "expiresAt", "createdAt", "updatedAt", "lastUsedAt", "keyFormat", "apiKey" ] } }, "required": [ "data" ] } } } } } } }, "/v1/api-keys/{id}": { "get": { "summary": "Get API key by ID", "tags": [ "API Keys" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Returns API key details", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "expiresAt": { "type": "string", "nullable": true, "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastUsedAt": { "type": "string", "nullable": true, "format": "date-time" }, "keyFormat": { "type": "string" } }, "required": [ "id", "name", "expiresAt", "createdAt", "updatedAt", "lastUsedAt", "keyFormat" ] } }, "required": [ "data" ] } } } }, "404": { "description": "API key not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } }, "patch": { "summary": "Update API key", "tags": [ "API Keys" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" } } } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "API key updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "expiresAt": { "type": "string", "nullable": true, "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastUsedAt": { "type": "string", "nullable": true, "format": "date-time" }, "keyFormat": { "type": "string" } }, "required": [ "id", "name", "expiresAt", "createdAt", "updatedAt", "lastUsedAt", "keyFormat" ] } }, "required": [ "data" ] } } } }, "404": { "description": "API key not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } }, "delete": { "summary": "Delete API key", "tags": [ "API Keys" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "204": { "description": "API key deleted successfully" }, "404": { "description": "API key not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/v1/bids": { "get": { "summary": "List bids", "operationId": "listBids", "tags": [ "Bids" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "required": true, "name": "dseq", "in": "query" } ], "responses": { "200": { "description": "List of bids", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "bid": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "resources_offer": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "object", "properties": { "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity", "attributes" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity", "attributes" ] } }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "sequence_number": { "type": "number" } }, "required": [ "kind", "sequence_number" ] } } }, "required": [ "cpu", "gpu", "memory", "storage", "endpoints" ] }, "count": { "type": "number" } }, "required": [ "resources", "count" ] } }, "reclamation_window": { "type": "string" } }, "required": [ "id", "state", "price", "created_at", "resources_offer" ] }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "bid", "escrow_account" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/bids/{dseq}": { "get": { "summary": "List bids by dseq", "tags": [ "Bids" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "parameters": [ { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "required": true, "name": "dseq", "in": "path" } ], "responses": { "200": { "description": "List of bids", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "bid": { "type": "object", "properties": { "id": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "provider": { "type": "string" }, "bseq": { "type": "number" } }, "required": [ "owner", "dseq", "gseq", "oseq", "provider", "bseq" ] }, "state": { "type": "string" }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] }, "created_at": { "type": "string" }, "resources_offer": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "object", "properties": { "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "units", "attributes" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity", "attributes" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "quantity": { "type": "object", "properties": { "val": { "type": "string" } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity", "attributes" ] } }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "sequence_number": { "type": "number" } }, "required": [ "kind", "sequence_number" ] } } }, "required": [ "cpu", "gpu", "memory", "storage", "endpoints" ] }, "count": { "type": "number" } }, "required": [ "resources", "count" ] } }, "reclamation_window": { "type": "string" } }, "required": [ "id", "state", "price", "created_at", "resources_offer" ] }, "escrow_account": { "type": "object", "properties": { "id": { "type": "object", "properties": { "scope": { "type": "string" }, "xid": { "type": "string" } }, "required": [ "scope", "xid" ] }, "state": { "type": "object", "properties": { "owner": { "type": "string" }, "state": { "type": "string" }, "transferred": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "settled_at": { "type": "string" }, "funds": { "type": "array", "items": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "deposits": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "height": { "type": "string" }, "source": { "type": "string" }, "balance": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string" } }, "required": [ "denom", "amount" ] } }, "required": [ "owner", "height", "source", "balance" ] } } }, "required": [ "owner", "state", "transferred", "settled_at", "funds", "deposits" ] } }, "required": [ "id", "state" ] } }, "required": [ "bid", "escrow_account" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/certificates": { "post": { "summary": "Create certificate", "tags": [ "Certificate" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "responses": { "400": { "description": "This endpoint has been removed. mTLS certificates are no longer required as identity is now verified via API key.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/v1/balances": { "get": { "summary": "Get user balances", "tags": [ "Wallet" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Optional wallet address to fetch balances for instead of the current user" }, "required": false, "description": "Optional wallet address to fetch balances for instead of the current user", "name": "address", "in": "query" } ], "responses": { "200": { "description": "Returns user balances", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "balance": { "type": "number" }, "deployments": { "type": "number" }, "total": { "type": "number" } }, "required": [ "balance", "deployments", "total" ] } }, "required": [ "data" ] } } } } } } }, "/v1/providers": { "get": { "summary": "Get a list of providers.", "tags": [ "Providers" ], "security": [], "parameters": [ { "schema": { "type": "string", "enum": [ "all", "trial" ], "default": "all" }, "required": false, "name": "scope", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "addresses", "in": "query" } ], "responses": { "200": { "description": "Returns a list of providers", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "name": { "type": "string", "nullable": true }, "hostUri": { "type": "string" }, "createdHeight": { "type": "number" }, "email": { "type": "string", "nullable": true }, "website": { "type": "string", "nullable": true }, "lastCheckDate": { "type": "string", "nullable": true }, "deploymentCount": { "type": "number", "nullable": true }, "leaseCount": { "type": "number", "nullable": true }, "cosmosSdkVersion": { "type": "string" }, "akashVersion": { "type": "string" }, "ipRegion": { "type": "string", "nullable": true }, "ipRegionCode": { "type": "string", "nullable": true }, "ipCountry": { "type": "string", "nullable": true }, "ipCountryCode": { "type": "string", "nullable": true }, "ipLat": { "type": "string", "nullable": true }, "ipLon": { "type": "string", "nullable": true }, "uptime1d": { "type": "number", "nullable": true }, "uptime7d": { "type": "number", "nullable": true }, "uptime30d": { "type": "number", "nullable": true }, "isValidVersion": { "type": "boolean" }, "isOnline": { "type": "boolean" }, "lastOnlineDate": { "type": "string", "nullable": true }, "isAudited": { "type": "boolean" }, "gpuModels": { "type": "array", "items": { "type": "object", "properties": { "vendor": { "type": "string" }, "model": { "type": "string" }, "ram": { "type": "string" }, "interface": { "type": "string" } }, "required": [ "vendor", "model", "ram", "interface" ] } }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "auditedBy": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "value", "auditedBy" ] } }, "host": { "type": "string", "nullable": true }, "organization": { "type": "string", "nullable": true }, "statusPage": { "type": "string", "nullable": true }, "locationRegion": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "timezone": { "type": "string", "nullable": true }, "locationType": { "type": "string", "nullable": true }, "hostingProvider": { "type": "string", "nullable": true }, "hardwareCpu": { "type": "string", "nullable": true }, "hardwareCpuArch": { "type": "string", "nullable": true }, "hardwareGpuVendor": { "type": "string", "nullable": true }, "hardwareGpuModels": { "type": "array", "nullable": true, "items": { "type": "string" } }, "hardwareDisk": { "type": "array", "nullable": true, "items": { "type": "string" } }, "featPersistentStorage": { "type": "boolean" }, "featPersistentStorageType": { "type": "array", "nullable": true, "items": { "type": "string" } }, "hardwareMemory": { "type": "string", "nullable": true }, "networkProvider": { "type": "string", "nullable": true }, "networkSpeedDown": { "type": "number" }, "networkSpeedUp": { "type": "number" }, "tier": { "type": "string", "nullable": true }, "featEndpointCustomDomain": { "type": "boolean" }, "workloadSupportChia": { "type": "boolean" }, "workloadSupportChiaCapabilities": { "type": "array", "nullable": true, "items": { "type": "string" } }, "featEndpointIp": { "type": "boolean" } }, "required": [ "owner", "name", "hostUri", "createdHeight", "cosmosSdkVersion", "akashVersion", "ipRegion", "ipRegionCode", "ipCountry", "ipCountryCode", "ipLat", "ipLon", "uptime1d", "uptime7d", "uptime30d", "isValidVersion", "isOnline", "lastOnlineDate", "isAudited", "gpuModels", "attributes", "host", "organization", "statusPage", "locationRegion", "country", "city", "timezone", "locationType", "hostingProvider", "hardwareCpu", "hardwareCpuArch", "hardwareGpuVendor", "hardwareGpuModels", "hardwareDisk", "featPersistentStorage", "featPersistentStorageType", "hardwareMemory", "networkProvider", "networkSpeedDown", "networkSpeedUp", "tier", "featEndpointCustomDomain", "workloadSupportChia", "workloadSupportChiaCapabilities", "featEndpointIp" ] } } } } } } } }, "/v1/providers/{address}": { "get": { "summary": "Get a provider details.", "tags": [ "Providers" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Provider Address", "example": "akash18ga02jzaq8cw52anyhzkwta5wygufgu6zsz6xc" }, "required": true, "name": "address", "in": "path" } ], "responses": { "200": { "description": "Return a provider details", "content": { "application/json": { "schema": { "type": "object", "properties": { "owner": { "type": "string" }, "name": { "type": "string", "nullable": true }, "hostUri": { "type": "string" }, "createdHeight": { "type": "number" }, "email": { "type": "string", "nullable": true }, "website": { "type": "string", "nullable": true }, "lastCheckDate": { "type": "string", "nullable": true }, "deploymentCount": { "type": "number" }, "leaseCount": { "type": "number" }, "cosmosSdkVersion": { "type": "string" }, "akashVersion": { "type": "string" }, "ipRegion": { "type": "string", "nullable": true }, "ipRegionCode": { "type": "string", "nullable": true }, "ipCountry": { "type": "string", "nullable": true }, "ipCountryCode": { "type": "string", "nullable": true }, "ipLat": { "type": "string", "nullable": true }, "ipLon": { "type": "string", "nullable": true }, "uptime1d": { "type": "number" }, "uptime7d": { "type": "number" }, "uptime30d": { "type": "number" }, "isValidVersion": { "type": "boolean" }, "isOnline": { "type": "boolean" }, "lastOnlineDate": { "type": "string", "nullable": true }, "isAudited": { "type": "boolean" }, "stats": { "type": "object", "properties": { "cpu": { "type": "object", "properties": { "active": { "type": "number" }, "available": { "type": "number" }, "pending": { "type": "number" } }, "required": [ "active", "available", "pending" ] }, "gpu": { "type": "object", "properties": { "active": { "type": "number" }, "available": { "type": "number" }, "pending": { "type": "number" } }, "required": [ "active", "available", "pending" ] }, "memory": { "type": "object", "properties": { "active": { "type": "number" }, "available": { "type": "number" }, "pending": { "type": "number" } }, "required": [ "active", "available", "pending" ] }, "storage": { "type": "object", "properties": { "ephemeral": { "type": "object", "properties": { "active": { "type": "number" }, "available": { "type": "number" }, "pending": { "type": "number" } }, "required": [ "active", "available", "pending" ] }, "persistent": { "type": "object", "properties": { "active": { "type": "number" }, "available": { "type": "number" }, "pending": { "type": "number" } }, "required": [ "active", "available", "pending" ] } }, "required": [ "ephemeral", "persistent" ] } }, "required": [ "cpu", "gpu", "memory", "storage" ] }, "gpuModels": { "type": "array", "items": { "type": "object", "properties": { "vendor": { "type": "string" }, "model": { "type": "string" }, "ram": { "type": "string" }, "interface": { "type": "string" } }, "required": [ "vendor", "model", "ram", "interface" ] } }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "auditedBy": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "value", "auditedBy" ] } }, "host": { "type": "string", "nullable": true }, "organization": { "type": "string", "nullable": true }, "statusPage": { "type": "string", "nullable": true }, "locationRegion": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "timezone": { "type": "string", "nullable": true }, "locationType": { "type": "string", "nullable": true }, "hostingProvider": { "type": "string", "nullable": true }, "hardwareCpu": { "type": "string", "nullable": true }, "hardwareCpuArch": { "type": "string", "nullable": true }, "reportedCpuArchs": { "type": "array", "items": { "type": "string" }, "description": "Distinct CPU architectures the provider's nodes reported in its last successful snapshot. Known spellings such as x86_64 or aarch64 are folded onto amd64 or arm64; any other reported value is kept as reported. Empty when no node reports one.", "example": [ "arm64" ] }, "cpuArchAgreement": { "type": "string", "enum": [ "match", "mismatch", "unknown" ], "description": "Whether the self-declared capabilities/cpu/arch attribute agrees with the architecture the nodes report. Unknown when either side is missing or the declared value is not a recognised architecture." }, "hardwareGpuVendor": { "type": "string", "nullable": true }, "hardwareGpuModels": { "type": "array", "items": { "type": "string" } }, "hardwareDisk": { "type": "array", "items": { "type": "string" } }, "featPersistentStorage": { "type": "boolean" }, "featPersistentStorageType": { "type": "array", "items": { "type": "string" } }, "hardwareMemory": { "type": "string", "nullable": true }, "networkProvider": { "type": "string", "nullable": true }, "networkSpeedDown": { "type": "number" }, "networkSpeedUp": { "type": "number" }, "tier": { "type": "string", "nullable": true }, "featEndpointCustomDomain": { "type": "boolean" }, "workloadSupportChia": { "type": "boolean" }, "workloadSupportChiaCapabilities": { "type": "array", "items": { "type": "string" } }, "featEndpointIp": { "type": "boolean" }, "uptime": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "isOnline": { "type": "boolean" }, "checkDate": { "type": "string" } }, "required": [ "id", "isOnline", "checkDate" ] } } }, "required": [ "owner", "name", "hostUri", "createdHeight", "email", "website", "lastCheckDate", "deploymentCount", "leaseCount", "cosmosSdkVersion", "akashVersion", "ipRegion", "ipRegionCode", "ipCountry", "ipCountryCode", "ipLat", "ipLon", "uptime1d", "uptime7d", "uptime30d", "isValidVersion", "isOnline", "lastOnlineDate", "isAudited", "stats", "gpuModels", "attributes", "host", "organization", "statusPage", "locationRegion", "country", "city", "timezone", "locationType", "hostingProvider", "hardwareCpu", "hardwareCpuArch", "reportedCpuArchs", "cpuArchAgreement", "hardwareGpuVendor", "hardwareGpuModels", "hardwareDisk", "featPersistentStorage", "featPersistentStorageType", "hardwareMemory", "networkProvider", "networkSpeedDown", "networkSpeedUp", "tier", "featEndpointCustomDomain", "workloadSupportChia", "workloadSupportChiaCapabilities", "featEndpointIp", "uptime" ] } } } }, "400": { "description": "Invalid address" }, "404": { "description": "Provider not found" } } } }, "/v1/providers/{providerAddress}/active-leases-graph-data": { "get": { "tags": [ "Analytics", "Providers" ], "security": [], "parameters": [ { "schema": { "type": "string", "example": "akash18ga02jzaq8cw52anyhzkwta5wygufgu6zsz6xc" }, "required": true, "name": "providerAddress", "in": "path" } ], "responses": { "200": { "description": "Returns a provider's active leases graph data", "content": { "application/json": { "schema": { "type": "object", "properties": { "currentValue": { "type": "number" }, "compareValue": { "type": "number" }, "snapshots": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2021-07-01T00:00:00.000Z" }, "value": { "type": "number", "example": 100 } }, "required": [ "date", "value" ] } }, "now": { "type": "object", "properties": { "count": { "type": "number", "example": 100 } }, "required": [ "count" ] }, "compare": { "type": "object", "properties": { "count": { "type": "number", "example": 100 } }, "required": [ "count" ] } }, "required": [ "currentValue", "compareValue", "snapshots", "now", "compare" ] } } } }, "400": { "description": "Invalid address" } } } }, "/v1/auditors": { "get": { "tags": [ "Providers" ], "security": [], "summary": "Get a list of auditors.", "responses": { "200": { "description": "List of auditors", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "address": { "type": "string" }, "website": { "type": "string" } }, "required": [ "id", "name", "address", "website" ] } } } } } } } }, "/v1/provider-attributes-schema": { "get": { "summary": "Get the provider attributes schema", "tags": [ "Providers" ], "security": [], "responses": { "200": { "description": "Return the provider attributes schema", "content": { "application/json": { "schema": { "type": "object", "properties": { "host": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "email": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "organization": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "website": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "tier": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "status-page": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "location-region": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "country": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "city": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "timezone": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "location-type": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hosting-provider": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-cpu": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-cpu-arch": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-gpu": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-gpu-model": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-disk": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "hardware-memory": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "network-provider": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "network-speed-up": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "network-speed-down": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "feat-persistent-storage": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "feat-persistent-storage-type": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "workload-support-chia": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "workload-support-chia-capabilities": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "feat-endpoint-ip": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] }, "feat-endpoint-custom-domain": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "number", "boolean", "option", "multiple-option" ] }, "required": { "type": "boolean" }, "description": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "key": { "type": "string" }, "description": { "type": "string" }, "value": { "nullable": true } }, "required": [ "key", "description" ] } } }, "required": [ "key", "type", "required", "description" ] } }, "required": [ "host", "email", "organization", "website", "tier", "status-page", "location-region", "country", "city", "timezone", "location-type", "hosting-provider", "hardware-cpu", "hardware-cpu-arch", "hardware-gpu", "hardware-gpu-model", "hardware-disk", "hardware-memory", "network-provider", "network-speed-up", "network-speed-down", "feat-persistent-storage", "feat-persistent-storage-type", "workload-support-chia", "workload-support-chia-capabilities", "feat-endpoint-ip", "feat-endpoint-custom-domain" ] } } } } } } }, "/v1/provider-regions": { "get": { "summary": "Get a list of provider regions", "tags": [ "Providers" ], "security": [], "responses": { "200": { "description": "Return a list of provider regions", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "providers": { "type": "array", "items": { "type": "string" } }, "key": { "type": "string" }, "description": { "type": "string" }, "value": { "type": "string" } }, "required": [ "providers", "key", "description" ] } } } } } } } }, "/v1/provider-dashboard/{owner}": { "get": { "summary": "Get dashboard data for provider console.", "tags": [ "Providers" ], "security": [], "parameters": [ { "schema": { "type": "string", "example": "akash18ga02jzaq8cw52anyhzkwta5wygufgu6zsz6xc" }, "required": true, "name": "owner", "in": "path" } ], "responses": { "200": { "description": "Dashboard data", "content": { "application/json": { "schema": { "type": "object", "properties": { "current": { "type": "object", "properties": { "date": { "type": "string" }, "height": { "type": "number" }, "activeLeaseCount": { "type": "number" }, "totalLeaseCount": { "type": "number" }, "dailyLeaseCount": { "type": "number" }, "totalUAktEarned": { "type": "number" }, "dailyUAktEarned": { "type": "number" }, "totalUUsdcEarned": { "type": "number" }, "dailyUUsdcEarned": { "type": "number" }, "totalUActEarned": { "type": "number" }, "dailyUActEarned": { "type": "number" }, "totalUUsdEarned": { "type": "number" }, "dailyUUsdEarned": { "type": "number" }, "activeCPU": { "type": "number" }, "activeGPU": { "type": "number" }, "activeMemory": { "type": "number" }, "activeEphemeralStorage": { "type": "number" }, "activePersistentStorage": { "type": "number" }, "activeStorage": { "type": "number" } }, "required": [ "date", "height", "activeLeaseCount", "totalLeaseCount", "dailyLeaseCount", "totalUAktEarned", "dailyUAktEarned", "totalUUsdcEarned", "dailyUUsdcEarned", "totalUActEarned", "dailyUActEarned", "totalUUsdEarned", "dailyUUsdEarned", "activeCPU", "activeGPU", "activeMemory", "activeEphemeralStorage", "activePersistentStorage", "activeStorage" ] }, "previous": { "type": "object", "properties": { "date": { "type": "string" }, "height": { "type": "number" }, "activeLeaseCount": { "type": "number" }, "totalLeaseCount": { "type": "number" }, "dailyLeaseCount": { "type": "number" }, "totalUAktEarned": { "type": "number" }, "dailyUAktEarned": { "type": "number" }, "totalUUsdcEarned": { "type": "number" }, "dailyUUsdcEarned": { "type": "number" }, "totalUActEarned": { "type": "number" }, "dailyUActEarned": { "type": "number" }, "totalUUsdEarned": { "type": "number" }, "dailyUUsdEarned": { "type": "number" }, "activeCPU": { "type": "number" }, "activeGPU": { "type": "number" }, "activeMemory": { "type": "number" }, "activeEphemeralStorage": { "type": "number" }, "activePersistentStorage": { "type": "number" }, "activeStorage": { "type": "number" } }, "required": [ "date", "height", "activeLeaseCount", "totalLeaseCount", "dailyLeaseCount", "totalUAktEarned", "dailyUAktEarned", "totalUUsdcEarned", "dailyUUsdcEarned", "totalUActEarned", "dailyUActEarned", "totalUUsdEarned", "dailyUUsdEarned", "activeCPU", "activeGPU", "activeMemory", "activeEphemeralStorage", "activePersistentStorage", "activeStorage" ] } }, "required": [ "current", "previous" ] } } } }, "404": { "description": "Provider not found" } } } }, "/v1/provider-earnings/{owner}": { "get": { "summary": "Get earnings data for provider console.", "tags": [ "Providers" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Provider Address", "example": "akash18ga02jzaq8cw52anyhzkwta5wygufgu6zsz6xc" }, "required": true, "name": "owner", "in": "path" }, { "schema": { "type": "string", "format": "YYYY-MM-DD", "description": "Start date in YYYY-MM-DD format", "example": "2023-01-01" }, "required": true, "name": "from", "in": "query" }, { "schema": { "type": "string", "format": "YYYY-MM-DD", "description": "End date in YYYY-MM-DD format", "example": "2023-02-01" }, "required": true, "name": "to", "in": "query" } ], "responses": { "200": { "description": "Earnings data", "content": { "application/json": { "schema": { "type": "object", "properties": { "earnings": { "type": "object", "properties": { "totalUAktEarned": { "type": "number" }, "totalUUsdcEarned": { "type": "number" }, "totalUActEarned": { "type": "number" }, "totalUUsdEarned": { "type": "number" } }, "required": [ "totalUAktEarned", "totalUUsdcEarned", "totalUActEarned", "totalUUsdEarned" ] } }, "required": [ "earnings" ] } } } }, "404": { "description": "Provider not found" } } } }, "/v1/provider-versions": { "get": { "summary": "Get providers grouped by version.", "tags": [ "Providers" ], "security": [], "responses": { "200": { "description": "List of providers grouped by version.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "object", "properties": { "version": { "type": "string" }, "count": { "type": "number" }, "ratio": { "type": "number" }, "providers": { "type": "array", "items": { "type": "string" } } }, "required": [ "version", "count", "ratio", "providers" ] } } } } } } } }, "/v1/provider-graph-data/{dataName}": { "get": { "tags": [ "Analytics" ], "security": [], "parameters": [ { "schema": { "type": "string", "example": "cpu", "enum": [ "count", "cpu", "gpu", "memory", "storage" ] }, "required": true, "name": "dataName", "in": "path" } ], "responses": { "200": { "description": "Returns provider graph data", "content": { "application/json": { "schema": { "type": "object", "properties": { "currentValue": { "type": "number" }, "compareValue": { "type": "number" }, "snapshots": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2021-07-01T00:00:00.000Z" }, "value": { "type": "number", "example": 100 } }, "required": [ "date", "value" ] } }, "now": { "type": "object", "properties": { "count": { "type": "number", "example": 100 }, "cpu": { "type": "number", "example": 100 }, "gpu": { "type": "number", "example": 100 }, "memory": { "type": "number", "example": 100 }, "storage": { "type": "number", "example": 100 } }, "required": [ "count", "cpu", "gpu", "memory", "storage" ] }, "compare": { "type": "object", "properties": { "count": { "type": "number", "example": 100 }, "cpu": { "type": "number", "example": 100 }, "gpu": { "type": "number", "example": 100 }, "memory": { "type": "number", "example": 100 }, "storage": { "type": "number", "example": 100 } }, "required": [ "count", "cpu", "gpu", "memory", "storage" ] } }, "required": [ "currentValue", "compareValue", "snapshots" ] } } } }, "404": { "description": "Graph data not found" } } } }, "/v1/providers/{provider}/deployments/{skip}/{limit}": { "get": { "summary": "Get a list of deployments for a provider.", "tags": [ "Providers", "Deployments" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Provider Address", "example": "akash18ga02jzaq8cw52anyhzkwta5wygufgu6zsz6xc" }, "required": true, "name": "provider", "in": "path" }, { "schema": { "type": "number", "nullable": true, "minimum": 0, "description": "Deployments to skip", "example": 10 }, "required": false, "name": "skip", "in": "path" }, { "schema": { "type": "number", "minimum": 1, "maximum": 100, "description": "Deployments to return", "example": 10 }, "required": true, "name": "limit", "in": "path" }, { "schema": { "type": "string", "enum": [ "active", "closed" ], "description": "Filter by status", "example": "closed" }, "required": false, "name": "status", "in": "query" } ], "responses": { "200": { "description": "Returns deployment list", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "type": "number" }, "deployments": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "denom": { "type": "string" }, "createdHeight": { "type": "number" }, "createdDate": { "type": "string", "nullable": true }, "status": { "type": "string" }, "balance": { "type": "number" }, "transferred": { "type": "number" }, "settledAt": { "type": "number", "nullable": true }, "resources": { "type": "object", "properties": { "cpu": { "type": "number" }, "memory": { "type": "number" }, "gpu": { "type": "number" }, "ephemeralStorage": { "type": "number" }, "persistentStorage": { "type": "number" } }, "required": [ "cpu", "memory", "gpu", "ephemeralStorage", "persistentStorage" ] }, "leases": { "type": "array", "items": { "type": "object", "properties": { "provider": { "type": "string" }, "gseq": { "type": "number" }, "oseq": { "type": "number" }, "price": { "type": "number" }, "createdHeight": { "type": "number" }, "createdDate": { "type": "string", "nullable": true }, "closedHeight": { "type": "number", "nullable": true }, "closedDate": { "type": "string", "nullable": true }, "status": { "type": "string" }, "resources": { "type": "object", "properties": { "cpu": { "type": "number" }, "memory": { "type": "number" }, "gpu": { "type": "number" }, "ephemeralStorage": { "type": "number" }, "persistentStorage": { "type": "number" } }, "required": [ "cpu", "memory", "gpu", "ephemeralStorage", "persistentStorage" ] } }, "required": [ "provider", "gseq", "oseq", "price", "createdHeight", "createdDate", "closedHeight", "closedDate", "status", "resources" ] } } }, "required": [ "owner", "dseq", "denom", "createdHeight", "createdDate", "status", "balance", "transferred", "settledAt", "resources", "leases" ] } } }, "required": [ "total", "deployments" ] } } } }, "400": { "description": "Invalid status filter" } } } }, "/v1/create-jwt-token": { "post": { "summary": "Create new JWT token for managed wallet", "tags": [ "JWT Token" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "ttl": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "leases": { "type": "object", "additionalProperties": { "nullable": true } } }, "required": [ "ttl", "leases" ] } }, "required": [ "data" ] } } } }, "responses": { "201": { "description": "JWT token created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] } }, "required": [ "data" ] } } } } } } }, "/v1/graph-data/{dataName}": { "get": { "tags": [ "Analytics" ], "security": [], "parameters": [ { "schema": { "type": "string", "example": "dailyUAktSpent", "enum": [ "dailyUAktSpent", "dailyUActSpent", "dailyUUsdcSpent", "dailyUUsdSpent", "dailyLeaseCount", "totalUAktSpent", "totalUActSpent", "totalUUsdcSpent", "totalUUsdSpent", "activeLeaseCount", "totalLeaseCount", "activeCPU", "activeGPU", "activeMemory", "activeStorage", "gpuUtilization", "totalAktBurnedForAct", "dailyAktBurnedForAct", "totalActMinted", "dailyActMinted", "totalActBurnedForAkt", "dailyActBurnedForAkt", "totalAktReminted", "dailyAktReminted", "netAktBurned", "dailyNetAktBurned", "outstandingAct", "vaultAkt", "collateralRatio" ] }, "required": true, "name": "dataName", "in": "path" } ], "responses": { "200": { "description": "Returns graph data", "content": { "application/json": { "schema": { "type": "object", "properties": { "currentValue": { "type": "number" }, "compareValue": { "type": "number" }, "snapshots": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2021-07-01T00:00:00.000Z" }, "value": { "type": "number", "example": 100 } }, "required": [ "date", "value" ] } } }, "required": [ "currentValue", "compareValue", "snapshots" ] } } } }, "404": { "description": "Graph data not found" } } } }, "/v1/bme/dashboard-data": { "get": { "tags": [ "Analytics" ], "security": [], "responses": { "200": { "description": "Returns BME dashboard data", "content": { "application/json": { "schema": { "type": "object", "properties": { "now": { "type": "object", "properties": { "date": { "type": "string" }, "outstandingAct": { "type": "number" }, "vaultAkt": { "type": "number" }, "collateralRatio": { "type": "number" }, "dailyAktBurnedForAct": { "type": "number" }, "totalAktBurnedForAct": { "type": "number" }, "dailyActMinted": { "type": "number" }, "totalActMinted": { "type": "number" }, "dailyActBurnedForAkt": { "type": "number" }, "totalActBurnedForAkt": { "type": "number" }, "dailyAktReminted": { "type": "number" }, "totalAktReminted": { "type": "number" }, "dailyNetAktBurned": { "type": "number" }, "netAktBurned": { "type": "number" } }, "required": [ "date", "outstandingAct", "vaultAkt", "collateralRatio", "dailyAktBurnedForAct", "totalAktBurnedForAct", "dailyActMinted", "totalActMinted", "dailyActBurnedForAkt", "totalActBurnedForAkt", "dailyAktReminted", "totalAktReminted", "dailyNetAktBurned", "netAktBurned" ] }, "compare": { "type": "object", "properties": { "date": { "type": "string" }, "outstandingAct": { "type": "number" }, "vaultAkt": { "type": "number" }, "collateralRatio": { "type": "number" }, "dailyAktBurnedForAct": { "type": "number" }, "totalAktBurnedForAct": { "type": "number" }, "dailyActMinted": { "type": "number" }, "totalActMinted": { "type": "number" }, "dailyActBurnedForAkt": { "type": "number" }, "totalActBurnedForAkt": { "type": "number" }, "dailyAktReminted": { "type": "number" }, "totalAktReminted": { "type": "number" }, "dailyNetAktBurned": { "type": "number" }, "netAktBurned": { "type": "number" } }, "required": [ "date", "outstandingAct", "vaultAkt", "collateralRatio", "dailyAktBurnedForAct", "totalAktBurnedForAct", "dailyActMinted", "totalActMinted", "dailyActBurnedForAkt", "totalActBurnedForAkt", "dailyAktReminted", "totalAktReminted", "dailyNetAktBurned", "netAktBurned" ] } }, "required": [ "now", "compare" ] } } } } } } }, "/v1/bme/status-history": { "get": { "tags": [ "Analytics" ], "security": [], "responses": { "200": { "description": "Returns BME circuit breaker status change history", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "integer", "example": 12345678 }, "date": { "type": "string", "example": "2024-01-01T00:00:00.000Z" }, "previousStatus": { "type": "string", "example": "healthy" }, "newStatus": { "type": "string", "example": "warning" }, "collateralRatio": { "type": "number", "example": 1.5 } }, "required": [ "height", "date", "previousStatus", "newStatus", "collateralRatio" ] } } } } } } } }, "/v1/dashboard-data": { "get": { "tags": [ "Analytics" ], "security": [], "responses": { "200": { "description": "Returns dashboard data", "content": { "application/json": { "schema": { "type": "object", "properties": { "chainStats": { "type": "object", "properties": { "height": { "type": "number" }, "transactionCount": { "type": "number" }, "bondedTokens": { "type": "number" }, "totalSupply": { "type": "number" }, "communityPool": { "type": "number" }, "inflation": { "type": "number" }, "stakingAPR": { "type": "number" } }, "required": [ "height", "transactionCount", "bondedTokens", "totalSupply", "communityPool", "inflation" ] }, "now": { "type": "object", "properties": { "date": { "type": "string" }, "height": { "type": "number" }, "activeLeaseCount": { "type": "number" }, "totalLeaseCount": { "type": "number" }, "dailyLeaseCount": { "type": "number" }, "totalUAktSpent": { "type": "number" }, "dailyUAktSpent": { "type": "number" }, "totalUActSpent": { "type": "number" }, "dailyUActSpent": { "type": "number" }, "totalUUsdcSpent": { "type": "number" }, "dailyUUsdcSpent": { "type": "number" }, "totalUUsdSpent": { "type": "number" }, "dailyUUsdSpent": { "type": "number" }, "activeCPU": { "type": "number" }, "activeGPU": { "type": "number" }, "activeMemory": { "type": "number" }, "activeStorage": { "type": "number" } }, "required": [ "date", "height", "activeLeaseCount", "totalLeaseCount", "dailyLeaseCount", "totalUAktSpent", "dailyUAktSpent", "totalUActSpent", "dailyUActSpent", "totalUUsdcSpent", "dailyUUsdcSpent", "totalUUsdSpent", "dailyUUsdSpent", "activeCPU", "activeGPU", "activeMemory", "activeStorage" ] }, "compare": { "type": "object", "properties": { "date": { "type": "string" }, "height": { "type": "number" }, "activeLeaseCount": { "type": "number" }, "totalLeaseCount": { "type": "number" }, "dailyLeaseCount": { "type": "number" }, "totalUAktSpent": { "type": "number" }, "dailyUAktSpent": { "type": "number" }, "totalUActSpent": { "type": "number" }, "dailyUActSpent": { "type": "number" }, "totalUUsdcSpent": { "type": "number" }, "dailyUUsdcSpent": { "type": "number" }, "totalUUsdSpent": { "type": "number" }, "dailyUUsdSpent": { "type": "number" }, "activeCPU": { "type": "number" }, "activeGPU": { "type": "number" }, "activeMemory": { "type": "number" }, "activeStorage": { "type": "number" } }, "required": [ "date", "height", "activeLeaseCount", "totalLeaseCount", "dailyLeaseCount", "totalUAktSpent", "dailyUAktSpent", "totalUActSpent", "dailyUActSpent", "totalUUsdcSpent", "dailyUUsdcSpent", "totalUUsdSpent", "dailyUUsdSpent", "activeCPU", "activeGPU", "activeMemory", "activeStorage" ] }, "networkCapacity": { "type": "object", "properties": { "activeProviderCount": { "type": "number" }, "activeCPU": { "type": "number" }, "activeGPU": { "type": "number" }, "activeMemory": { "type": "number" }, "activeStorage": { "type": "number" }, "pendingCPU": { "type": "number" }, "pendingGPU": { "type": "number" }, "pendingMemory": { "type": "number" }, "pendingStorage": { "type": "number" }, "availableCPU": { "type": "number" }, "availableGPU": { "type": "number" }, "availableMemory": { "type": "number" }, "availableStorage": { "type": "number" }, "totalCPU": { "type": "number" }, "totalGPU": { "type": "number" }, "totalMemory": { "type": "number" }, "totalStorage": { "type": "number" }, "activeEphemeralStorage": { "type": "number" }, "pendingEphemeralStorage": { "type": "number" }, "availableEphemeralStorage": { "type": "number" }, "activePersistentStorage": { "type": "number" }, "pendingPersistentStorage": { "type": "number" }, "availablePersistentStorage": { "type": "number" }, "totalEphemeralStorage": { "type": "number" }, "totalPersistentStorage": { "type": "number" } }, "required": [ "activeProviderCount", "activeCPU", "activeGPU", "activeMemory", "activeStorage", "pendingCPU", "pendingGPU", "pendingMemory", "pendingStorage", "availableCPU", "availableGPU", "availableMemory", "availableStorage", "totalCPU", "totalGPU", "totalMemory", "totalStorage", "activeEphemeralStorage", "pendingEphemeralStorage", "availableEphemeralStorage", "activePersistentStorage", "pendingPersistentStorage", "availablePersistentStorage", "totalEphemeralStorage", "totalPersistentStorage" ] }, "networkCapacityStats": { "type": "object", "properties": { "currentValue": { "type": "number" }, "compareValue": { "type": "number" }, "snapshots": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string" }, "value": { "type": "number" } }, "required": [ "date", "value" ] } }, "now": { "type": "object", "properties": { "count": { "type": "number" }, "cpu": { "type": "number" }, "gpu": { "type": "number" }, "memory": { "type": "number" }, "storage": { "type": "number" } }, "required": [ "count", "cpu", "gpu", "memory", "storage" ] }, "compare": { "type": "object", "properties": { "count": { "type": "number" }, "cpu": { "type": "number" }, "gpu": { "type": "number" }, "memory": { "type": "number" }, "storage": { "type": "number" } }, "required": [ "count", "cpu", "gpu", "memory", "storage" ] } }, "required": [ "currentValue", "compareValue", "snapshots", "now", "compare" ] }, "latestBlocks": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "proposer": { "type": "object", "properties": { "address": { "type": "string" }, "operatorAddress": { "type": "string" }, "moniker": { "type": "string", "nullable": true }, "avatarUrl": { "type": "string", "nullable": true } }, "required": [ "address", "operatorAddress", "moniker", "avatarUrl" ] }, "transactionCount": { "type": "number" }, "totalTransactionCount": { "type": "number" }, "datetime": { "type": "string" } }, "required": [ "height", "proposer", "transactionCount", "totalTransactionCount", "datetime" ] } }, "latestTransactions": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "error": { "type": "string", "nullable": true }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "fee": { "type": "number" }, "memo": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "amount": { "type": "number" } }, "required": [ "id", "type", "amount" ] } } }, "required": [ "height", "datetime", "hash", "isSuccess", "error", "gasUsed", "gasWanted", "fee", "memo", "messages" ] } } }, "required": [ "chainStats", "now", "compare", "networkCapacity", "networkCapacityStats", "latestBlocks", "latestTransactions" ] } } } } } } }, "/v1/network-capacity": { "get": { "tags": [ "Analytics" ], "security": [], "responses": { "200": { "description": "Returns network capacity stats", "content": { "application/json": { "schema": { "type": "object", "properties": { "activeProviderCount": { "type": "number" }, "resources": { "type": "object", "properties": { "cpu": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] }, "gpu": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] }, "memory": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] }, "storage": { "type": "object", "properties": { "ephemeral": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] }, "persistent": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] }, "total": { "type": "object", "properties": { "active": { "type": "number" }, "pending": { "type": "number" }, "available": { "type": "number" }, "total": { "type": "number" } }, "required": [ "active", "pending", "available", "total" ] } }, "required": [ "ephemeral", "persistent", "total" ] } }, "required": [ "cpu", "gpu", "memory", "storage" ] } }, "required": [ "activeProviderCount", "resources" ] } } } } } } }, "/v1/blocks": { "get": { "summary": "Get a list of recent blocks.", "tags": [ "Blocks" ], "security": [], "parameters": [ { "schema": { "type": "number", "description": "Number of blocks to return", "minimum": 1, "maximum": 100, "example": 20, "default": 20 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Returns block list", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "proposer": { "type": "object", "properties": { "address": { "type": "string" }, "operatorAddress": { "type": "string" }, "moniker": { "type": "string" }, "avatarUrl": { "type": "string", "nullable": true } }, "required": [ "address", "operatorAddress", "moniker", "avatarUrl" ] }, "transactionCount": { "type": "number" }, "totalTransactionCount": { "type": "number" }, "datetime": { "type": "string" } }, "required": [ "height", "proposer", "transactionCount", "totalTransactionCount", "datetime" ] } } } } } } } }, "/v1/blocks/{height}": { "get": { "summary": "Get a block by height.", "tags": [ "Blocks" ], "security": [], "parameters": [ { "schema": { "type": "number", "nullable": true, "description": "Block Height", "example": 12121212 }, "required": false, "name": "height", "in": "path" } ], "responses": { "200": { "description": "Returns predicted block date", "content": { "application/json": { "schema": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "proposer": { "type": "object", "properties": { "operatorAddress": { "type": "string" }, "moniker": { "type": "string" }, "avatarUrl": { "type": "string" }, "address": { "type": "string" } }, "required": [ "operatorAddress", "moniker", "address" ] }, "hash": { "type": "string" }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "transactions": { "type": "array", "items": { "type": "object", "properties": { "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "error": { "type": "string", "nullable": true }, "fee": { "type": "number" }, "datetime": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "amount": { "type": "number" } }, "required": [ "id", "type", "amount" ] } } }, "required": [ "hash", "isSuccess", "fee", "datetime", "messages" ] } } }, "required": [ "height", "datetime", "proposer", "hash", "gasUsed", "gasWanted", "transactions" ] } } } }, "400": { "description": "Invalid height" }, "404": { "description": "Block not found" } } } }, "/v1/predicted-block-date/{height}": { "get": { "summary": "Get the estimated date of a future block.", "tags": [ "Blocks" ], "security": [], "parameters": [ { "schema": { "type": "number", "description": "Block height", "example": 20000000 }, "required": false, "name": "height", "in": "path" }, { "schema": { "type": "number", "default": 10000, "description": "Block window", "example": 10000 }, "required": false, "name": "blockWindow", "in": "query" } ], "responses": { "200": { "description": "Returns predicted block date", "content": { "application/json": { "schema": { "type": "object", "properties": { "predictedDate": { "type": "string" }, "height": { "type": "number", "example": 10000000 }, "blockWindow": { "type": "number", "example": 10000 } }, "required": [ "predictedDate", "height", "blockWindow" ] } } } }, "400": { "description": "Invalid height or block window" } } } }, "/v1/predicted-date-height/{timestamp}": { "get": { "summary": "Get the estimated height of a future date and time.", "tags": [ "Blocks" ], "security": [], "parameters": [ { "schema": { "type": "number", "description": "Unix Timestamp", "example": 1704392968 }, "required": false, "name": "timestamp", "in": "path" }, { "schema": { "type": "number", "default": 10000, "description": "Block window", "example": 10000 }, "required": false, "name": "blockWindow", "in": "query" } ], "responses": { "200": { "description": "Returns predicted block height", "content": { "application/json": { "schema": { "type": "object", "properties": { "predictedHeight": { "type": "number", "example": 10000000 }, "date": { "type": "string", "example": "2024-01-04T18:29:28.000Z" }, "blockWindow": { "type": "number", "example": 10000 } }, "required": [ "predictedHeight", "date", "blockWindow" ] } } } }, "400": { "description": "Invalid timestamp or block window" } } } }, "/v1/transactions": { "get": { "summary": "Get a list of transactions.", "tags": [ "Transactions" ], "security": [], "parameters": [ { "schema": { "type": "number", "description": "Number of transactions to return", "minimum": 1, "maximum": 100, "example": 20, "default": 20 }, "required": false, "name": "limit", "in": "query" } ], "responses": { "200": { "description": "Returns transaction list", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "error": { "type": "string", "nullable": true }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "fee": { "type": "number" }, "memo": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "amount": { "type": "number" } }, "required": [ "id", "type", "amount" ] } } }, "required": [ "height", "datetime", "hash", "isSuccess", "error", "gasUsed", "gasWanted", "fee", "memo", "messages" ] } } } } } } } }, "/v1/transactions/{hash}": { "get": { "summary": "Get a transaction by hash.", "tags": [ "Transactions" ], "security": [], "parameters": [ { "schema": { "type": "string", "minLength": 1, "description": "Transaction hash", "example": "A19F1950D97E576F0D7B591D71A8D0366AA8BA0A7F3DA76F44769188644BE9EB" }, "required": true, "name": "hash", "in": "path" } ], "responses": { "200": { "description": "Returns predicted block date", "content": { "application/json": { "schema": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "multisigThreshold": { "type": "number" }, "signers": { "type": "array", "items": { "type": "string" } }, "error": { "type": "string", "nullable": true }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "fee": { "type": "number" }, "memo": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "data": { "type": "object", "additionalProperties": { "type": "string" } }, "relatedDeploymentId": { "type": "string", "nullable": true } }, "required": [ "id", "type", "data" ] } } }, "required": [ "height", "datetime", "hash", "isSuccess", "signers", "error", "gasUsed", "gasWanted", "fee", "memo", "messages" ] } } } }, "404": { "description": "Transaction not found" } } } }, "/v1/market-data/{coin?}": { "get": { "tags": [ "Analytics" ], "security": [], "parameters": [ { "schema": { "type": "string", "enum": [ "akash-network", "akt" ], "default": "akt", "example": "akt" }, "required": false, "name": "coin", "in": "path" } ], "responses": { "200": { "description": "Returns market stats", "content": { "application/json": { "schema": { "type": "object", "properties": { "price": { "type": "number" }, "volume": { "type": "number" }, "marketCap": { "type": "number" }, "marketCapRank": { "type": "number" }, "priceChange24h": { "type": "number" }, "priceChangePercentage24": { "type": "number" } }, "required": [ "price", "volume", "marketCap", "marketCapRank", "priceChange24h", "priceChangePercentage24" ] } } } } } } }, "/v1/validators": { "get": { "tags": [ "Validators" ], "security": [], "responses": { "200": { "description": "Returns validators", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "operatorAddress": { "type": "string" }, "moniker": { "type": "string" }, "votingPower": { "type": "number" }, "commission": { "type": "number" }, "identity": { "type": "string" }, "votingPowerRatio": { "type": "number" }, "rank": { "type": "number" }, "keybaseAvatarUrl": { "type": "string", "nullable": true } }, "required": [ "operatorAddress", "moniker", "votingPower", "commission", "identity", "votingPowerRatio", "rank", "keybaseAvatarUrl" ] } } } } } } } }, "/v1/validators/{address}": { "get": { "tags": [ "Validators" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Validator Address", "example": "akashvaloper14mt78hz73d9tdwpdvkd59ne9509kxw8yj7qy8f" }, "required": true, "name": "address", "in": "path" } ], "responses": { "200": { "description": "Return a validator information", "content": { "application/json": { "schema": { "type": "object", "properties": { "operatorAddress": { "type": "string" }, "address": { "type": "string", "nullable": true }, "moniker": { "type": "string" }, "keybaseUsername": { "type": "string", "nullable": true }, "keybaseAvatarUrl": { "type": "string", "nullable": true }, "votingPower": { "type": "number" }, "commission": { "type": "number" }, "maxCommission": { "type": "number" }, "maxCommissionChange": { "type": "number" }, "identity": { "type": "string" }, "description": { "type": "string" }, "website": { "type": "string" }, "rank": { "type": "number" } }, "required": [ "operatorAddress", "address", "moniker", "keybaseUsername", "keybaseAvatarUrl", "votingPower", "commission", "maxCommission", "maxCommissionChange", "identity", "description", "website", "rank" ] } } } }, "400": { "description": "Invalid address" }, "404": { "description": "Validator not found" } } } }, "/v1/pricing": { "post": { "tags": [ "Other" ], "security": [], "summary": "Estimate the price of a deployment on akash and other cloud providers.", "requestBody": { "description": "Deployment specs to use for the price estimation. **An array of specs can also be sent, in that case an array of estimations will be returned in the same order.**", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "cpu": { "type": "number", "minimum": 0, "description": "CPU in thousandths of a core. 1000 = 1 core", "example": 1000 }, "memory": { "type": "number", "description": "Memory in bytes", "example": 1000000000 }, "storage": { "type": "number", "description": "Storage in bytes", "example": 1000000000 } }, "required": [ "cpu", "memory", "storage" ] }, { "type": "array", "items": { "type": "object", "properties": { "cpu": { "type": "number", "minimum": 0, "description": "CPU in thousandths of a core. 1000 = 1 core", "example": 1000 }, "memory": { "type": "number", "description": "Memory in bytes", "example": 1000000000 }, "storage": { "type": "number", "description": "Storage in bytes", "example": 1000000000 } }, "required": [ "cpu", "memory", "storage" ] }, "minItems": 1, "maxItems": 10 } ] } } } }, "responses": { "200": { "description": "Returns a list of deployment templates grouped by categories", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "spec": { "type": "object", "properties": { "cpu": { "type": "number", "minimum": 0, "description": "CPU in thousandths of a core. 1000 = 1 core", "example": 1000 }, "memory": { "type": "number", "description": "Memory in bytes", "example": 1000000000 }, "storage": { "type": "number", "description": "Storage in bytes", "example": 1000000000 } }, "required": [ "cpu", "memory", "storage" ] }, "akash": { "type": "number", "description": "Akash price estimation (USD/month)" }, "aws": { "type": "number", "description": "AWS price estimation (USD/month)" }, "gcp": { "type": "number", "description": "GCP price estimation (USD/month)" }, "azure": { "type": "number", "description": "Azure price estimation (USD/month)" } }, "required": [ "spec", "akash", "aws", "gcp", "azure" ] }, { "type": "array", "items": { "type": "object", "properties": { "spec": { "type": "object", "properties": { "cpu": { "type": "number", "minimum": 0, "description": "CPU in thousandths of a core. 1000 = 1 core", "example": 1000 }, "memory": { "type": "number", "description": "Memory in bytes", "example": 1000000000 }, "storage": { "type": "number", "description": "Storage in bytes", "example": 1000000000 } }, "required": [ "cpu", "memory", "storage" ] }, "akash": { "type": "number", "description": "Akash price estimation (USD/month)" }, "aws": { "type": "number", "description": "AWS price estimation (USD/month)" }, "gcp": { "type": "number", "description": "GCP price estimation (USD/month)" }, "azure": { "type": "number", "description": "Azure price estimation (USD/month)" } }, "required": [ "spec", "akash", "aws", "gcp", "azure" ] } } ] } } } }, "400": { "description": "Invalid parameters" } } } }, "/v1/gpu": { "get": { "summary": "Get a list of gpu models and their availability.", "tags": [ "Gpu" ], "security": [], "parameters": [ { "schema": { "type": "string" }, "required": false, "name": "provider", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "vendor", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "model", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "memory_size", "in": "query" } ], "responses": { "200": { "description": "List of gpu models and their availability.", "content": { "application/json": { "schema": { "type": "object", "properties": { "gpus": { "type": "object", "properties": { "total": { "type": "object", "properties": { "allocatable": { "type": "number" }, "allocated": { "type": "number" } }, "required": [ "allocatable", "allocated" ] }, "details": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "model": { "type": "string" }, "ram": { "type": "string" }, "interface": { "type": "string" }, "allocatable": { "type": "number" }, "allocated": { "type": "number" } }, "required": [ "model", "ram", "interface", "allocatable", "allocated" ] } } } }, "required": [ "total", "details" ] } }, "required": [ "gpus" ] } } } }, "400": { "description": "Invalid provider parameter, should be a valid akash address or host uri" } } } }, "/v1/gpu-models": { "get": { "summary": "Get a list of gpu models per vendor. Based on the content from https://raw.githubusercontent.com/akash-network/provider-configs/main/devices/pcie/gpus.json.", "tags": [ "Gpu" ], "security": [], "responses": { "200": { "description": "List of gpu models per.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "displayName": { "type": "string", "example": "NVIDIA" }, "models": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "displayName": { "type": "string", "example": "RTX 4090" }, "memory": { "type": "array", "items": { "type": "string" } }, "interface": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "displayName", "memory", "interface" ] } } }, "required": [ "name", "displayName", "models" ] } } } } } } } }, "/v1/gpu-breakdown": { "get": { "tags": [ "Gpu" ], "security": [], "summary": "Gets the daily gpu analytics breakdown by vendor and model over a date range (default: last 30 days, max 366 days). If no vendor or model is provided, all GPUs are returned.", "parameters": [ { "schema": { "type": "string" }, "required": false, "name": "vendor", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "model", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "Start date (YYYY-MM-DD), inclusive. Defaults to a 30-day window ending at endDate", "example": "2024-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "date", "description": "End date (YYYY-MM-DD), inclusive. Defaults to today (UTC)", "example": "2024-01-31" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "Daily gpu breakdown rows for the requested date range, one per date, vendor and model.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string" }, "vendor": { "type": "string" }, "model": { "type": "string" }, "providerCount": { "type": "number" }, "nodeCount": { "type": "number" }, "totalGpus": { "type": "number" }, "leasedGpus": { "type": "number" }, "gpuUtilization": { "type": "number" } }, "required": [ "date", "vendor", "model", "providerCount", "nodeCount", "totalGpus", "leasedGpus", "gpuUtilization" ] } } } } }, "400": { "description": "Invalid date range: dates must be YYYY-MM-DD, startDate must not be after endDate and the range cannot exceed 366 days" } } } }, "/v1/gpu-prices": { "get": { "summary": "Get a list of gpu models with their availability and pricing.", "operationId": "listGpuPrices", "tags": [ "Gpu" ], "security": [], "responses": { "200": { "description": "List of gpu models with their availability and pricing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "availability": { "type": "object", "properties": { "total": { "type": "number" }, "available": { "type": "number" } }, "required": [ "total", "available" ] }, "models": { "type": "array", "items": { "type": "object", "properties": { "vendor": { "type": "string" }, "model": { "type": "string" }, "ram": { "type": "string" }, "interface": { "type": "string" }, "availability": { "type": "object", "properties": { "total": { "type": "number" }, "available": { "type": "number" } }, "required": [ "total", "available" ] }, "providerAvailability": { "type": "object", "properties": { "total": { "type": "number" }, "available": { "type": "number" } }, "required": [ "total", "available" ] }, "price": { "type": "object", "nullable": true, "properties": { "currency": { "type": "string", "example": "USD" }, "min": { "type": "number" }, "max": { "type": "number" }, "avg": { "type": "number" }, "weightedAverage": { "type": "number" }, "med": { "type": "number" } }, "required": [ "currency", "min", "max", "avg", "weightedAverage", "med" ] } }, "required": [ "vendor", "model", "ram", "interface", "availability", "providerAvailability", "price" ] } } }, "required": [ "availability", "models" ] } } } } } } }, "/v1/proposals": { "get": { "tags": [ "Proposals" ], "security": [], "responses": { "200": { "description": "Returns a list of proposals", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "title": { "type": "string" }, "status": { "type": "string" }, "submitTime": { "type": "string" }, "votingStartTime": { "type": "string" }, "votingEndTime": { "type": "string" }, "totalDeposit": { "type": "number" } }, "required": [ "id", "title", "status", "submitTime", "votingStartTime", "votingEndTime", "totalDeposit" ] } } } } } } } }, "/v1/proposals/{id}": { "get": { "tags": [ "Proposals" ], "security": [], "parameters": [ { "schema": { "type": "number", "nullable": true, "description": "Proposal ID", "example": 1 }, "required": false, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Return a proposal by id", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "number" }, "title": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string" }, "submitTime": { "type": "string" }, "votingStartTime": { "type": "string" }, "votingEndTime": { "type": "string" }, "totalDeposit": { "type": "number" }, "tally": { "type": "object", "properties": { "yes": { "type": "number" }, "abstain": { "type": "number" }, "no": { "type": "number" }, "noWithVeto": { "type": "number" }, "total": { "type": "number" } }, "required": [ "yes", "abstain", "no", "noWithVeto", "total" ] }, "paramChanges": { "type": "array", "items": { "type": "object", "properties": { "subspace": { "type": "string" }, "key": { "type": "string" }, "value": { "nullable": true } }, "required": [ "subspace", "key" ] } } }, "required": [ "id", "title", "description", "status", "submitTime", "votingStartTime", "votingEndTime", "totalDeposit", "tally", "paramChanges" ] } } } }, "400": { "description": "Invalid proposal id" }, "404": { "description": "Proposal not found" } } } }, "/v1/templates-list": { "get": { "tags": [ "Other" ], "security": [], "responses": { "200": { "description": "Returns a list of deployment templates grouped by categories", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "templates": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "logoUrl": { "type": "string", "nullable": true }, "summary": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "name", "logoUrl", "summary" ] } } }, "required": [ "title", "templates" ] } } }, "required": [ "data" ] } } } } } } }, "/v1/templates/{id}": { "get": { "tags": [ "Other" ], "security": [], "parameters": [ { "schema": { "type": "string", "pattern": "^[^/\\\\]+$", "description": "Template ID", "example": "akash-network-cosmos-omnibus-agoric" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Return a template by id", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "logoUrl": { "type": "string", "nullable": true }, "summary": { "type": "string" }, "readme": { "type": "string" }, "deploy": { "type": "string" }, "persistentStorageEnabled": { "type": "boolean" }, "guide": { "type": "string" }, "githubUrl": { "type": "string" }, "config": { "type": "object", "properties": { "ssh": { "type": "boolean" } } } }, "required": [ "id", "name", "path", "logoUrl", "summary", "readme", "deploy", "persistentStorageEnabled", "githubUrl", "config" ] } }, "required": [ "data" ] } } } }, "400": { "description": "Invalid template ID" }, "404": { "description": "Template not found" } } } }, "/v1/leases-duration/{owner}": { "get": { "summary": "Get leases durations.", "tags": [ "Analytics" ], "security": [], "parameters": [ { "schema": { "type": "string", "example": "akash13265twfqejnma6cc93rw5dxk4cldyz2zyy8cdm" }, "required": true, "name": "owner", "in": "path" }, { "schema": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "required": false, "name": "dseq", "in": "query" }, { "schema": { "type": "string", "format": "YYYY-MM-DD", "default": "2000-01-01" }, "required": false, "name": "startDate", "in": "query" }, { "schema": { "type": "string", "format": "YYYY-MM-DD", "default": "2100-01-01" }, "required": false, "name": "endDate", "in": "query" } ], "responses": { "200": { "description": "List of leases durations and total duration.", "content": { "application/json": { "schema": { "type": "object", "properties": { "leaseCount": { "type": "number" }, "totalDurationInSeconds": { "type": "number" }, "totalDurationInHours": { "type": "number" }, "leases": { "type": "array", "items": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^0*[1-9]\\d*$" }, "oseq": { "type": "number" }, "gseq": { "type": "number" }, "provider": { "type": "string" }, "startHeight": { "type": "number" }, "startDate": { "type": "string" }, "closedHeight": { "type": "number" }, "closedDate": { "type": "string" }, "durationInBlocks": { "type": "number" }, "durationInSeconds": { "type": "number" }, "durationInHours": { "type": "number" } }, "required": [ "dseq", "oseq", "gseq", "provider", "startHeight", "startDate", "closedHeight", "closedDate", "durationInBlocks", "durationInSeconds", "durationInHours" ] } } }, "required": [ "leaseCount", "totalDurationInSeconds", "totalDurationInHours", "leases" ] } } } }, "400": { "description": "Invalid start date, must be in the following format: YYYY-MM-DD" } } } }, "/v1/addresses/{address}": { "get": { "summary": "Get address details", "tags": [ "Addresses" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Account Address", "example": "akash13265twfqejnma6cc93rw5dxk4cldyz2zyy8cdm" }, "required": true, "name": "address", "in": "path" } ], "responses": { "200": { "description": "Returns address details", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "type": "number" }, "delegations": { "type": "array", "items": { "type": "object", "properties": { "validator": { "type": "object", "properties": { "address": { "type": "string" }, "moniker": { "type": "string" }, "operatorAddress": { "type": "string" }, "avatarUrl": { "type": "string" } } }, "amount": { "type": "number" }, "reward": { "type": "number", "nullable": true } }, "required": [ "validator", "amount", "reward" ] } }, "available": { "type": "number" }, "delegated": { "type": "number" }, "rewards": { "type": "number" }, "assets": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string" }, "ibcToken": { "type": "string" }, "logoUrl": { "type": "string" }, "description": { "type": "string" }, "amount": { "type": "number" } }, "required": [ "amount" ] } }, "redelegations": { "type": "array", "items": { "type": "object", "properties": { "srcAddress": { "type": "object", "properties": { "address": { "type": "string" }, "moniker": { "type": "string" }, "operatorAddress": { "type": "string" }, "avatarUrl": { "type": "string" } } }, "dstAddress": { "type": "object", "properties": { "address": { "type": "string" }, "moniker": { "type": "string" }, "operatorAddress": { "type": "string" }, "avatarUrl": { "type": "string" } } }, "creationHeight": { "type": "number" }, "completionTime": { "type": "string" }, "amount": { "type": "number" } }, "required": [ "srcAddress", "dstAddress", "creationHeight", "completionTime", "amount" ] } }, "commission": { "type": "number" }, "latestTransactions": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "error": { "type": "string", "nullable": true }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "fee": { "type": "number" }, "memo": { "type": "string", "nullable": true }, "isSigner": { "type": "boolean" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "amount": { "type": "number" }, "isReceiver": { "type": "boolean" } }, "required": [ "id", "type", "amount", "isReceiver" ] } } }, "required": [ "height", "datetime", "hash", "isSuccess", "error", "gasUsed", "gasWanted", "fee", "memo", "isSigner", "messages" ] } } }, "required": [ "total", "delegations", "available", "delegated", "rewards", "assets", "redelegations", "commission", "latestTransactions" ] } } } }, "400": { "description": "Invalid address" } } } }, "/v1/addresses/{address}/transactions/{skip}/{limit}": { "get": { "summary": "Get a list of transactions for a given address.", "tags": [ "Addresses", "Transactions" ], "security": [], "parameters": [ { "schema": { "type": "string", "description": "Wallet Address", "example": "akash13265twfqejnma6cc93rw5dxk4cldyz2zyy8cdm" }, "required": true, "name": "address", "in": "path" }, { "schema": { "type": "number", "nullable": true, "minimum": 0, "description": "Transactions to skip", "example": 10 }, "required": false, "name": "skip", "in": "path" }, { "schema": { "type": "number", "minimum": 1, "maximum": 100, "description": "Transactions to return", "example": 10 }, "required": true, "name": "limit", "in": "path" } ], "responses": { "200": { "description": "Returns transaction list", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number" }, "results": { "type": "array", "items": { "type": "object", "properties": { "height": { "type": "number" }, "datetime": { "type": "string" }, "hash": { "type": "string" }, "isSuccess": { "type": "boolean" }, "error": { "type": "string", "nullable": true }, "gasUsed": { "type": "number" }, "gasWanted": { "type": "number" }, "fee": { "type": "number" }, "memo": { "type": "string", "nullable": true }, "isSigner": { "type": "boolean" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "amount": { "type": "number" }, "isReceiver": { "type": "boolean" } }, "required": [ "id", "type", "amount", "isReceiver" ] } } }, "required": [ "height", "datetime", "hash", "isSuccess", "error", "gasUsed", "gasWanted", "fee", "memo", "isSigner", "messages" ] } } }, "required": [ "count", "results" ] } } } }, "400": { "description": "Invalid address or parameters" } } } }, "/v1/blockchain-status": { "get": { "summary": "Get blockchain reachability status", "tags": [ "Chain" ], "security": [], "responses": { "200": { "description": "Returns blockchain reachability status", "content": { "application/json": { "schema": { "type": "object", "properties": { "isBlockchainReachable": { "type": "boolean" } }, "required": [ "isBlockchainReachable" ] } } } } } } }, "/v1/bid-screening": { "post": { "operationId": "screenProviders", "summary": "Screen providers by deployment resource requirements", "tags": [ "Bid Screening" ], "security": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "requirements": { "type": "object", "properties": { "signedBy": { "type": "object", "properties": { "allOf": { "type": "array", "items": { "type": "string" }, "default": [] }, "anyOf": { "type": "array", "items": { "type": "string" }, "default": [] } }, "default": {} }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^([a-zA-Z][\\w/.-]{1,126}[\\w*]?)$", "description": "Attribute key", "example": "persistent" }, "value": { "type": "string", "description": "Attribute value", "example": "false" } }, "required": [ "key", "value" ] }, "default": [] } }, "default": {} }, "resources": { "type": "array", "items": { "type": "object", "properties": { "resource": { "type": "object", "properties": { "id": { "type": "integer", "description": "Resource unit ID", "example": 1 }, "cpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string", "maxLength": 80 } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^([a-zA-Z][\\w/.-]{1,126}[\\w*]?)$", "description": "Attribute key", "example": "persistent" }, "value": { "type": "string", "description": "Attribute value", "example": "false" } }, "required": [ "key", "value" ] } } }, "required": [ "units" ] }, "memory": { "type": "object", "properties": { "quantity": { "type": "object", "properties": { "val": { "type": "string", "maxLength": 80 } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^([a-zA-Z][\\w/.-]{1,126}[\\w*]?)$", "description": "Attribute key", "example": "persistent" }, "value": { "type": "string", "description": "Attribute value", "example": "false" } }, "required": [ "key", "value" ] } } }, "required": [ "quantity" ] }, "gpu": { "type": "object", "properties": { "units": { "type": "object", "properties": { "val": { "type": "string", "maxLength": 80 } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^([a-zA-Z][\\w/.-]{1,126}[\\w*]?)$", "description": "Attribute key", "example": "persistent" }, "value": { "type": "string", "description": "Attribute value", "example": "false" } }, "required": [ "key", "value" ] } } }, "required": [ "units" ] }, "storage": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Storage volume name", "example": "default" }, "quantity": { "type": "object", "properties": { "val": { "type": "string", "maxLength": 80 } }, "required": [ "val" ] }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^([a-zA-Z][\\w/.-]{1,126}[\\w*]?)$", "description": "Attribute key", "example": "persistent" }, "value": { "type": "string", "description": "Attribute value", "example": "false" } }, "required": [ "key", "value" ] } } }, "required": [ "name", "quantity" ] } }, "endpoints": { "type": "array", "items": { "nullable": true } } }, "required": [ "id", "cpu", "memory", "gpu", "storage" ] }, "count": { "type": "integer", "minimum": 1, "description": "Replica count", "example": 1 }, "price": { "type": "object", "properties": { "denom": { "type": "string" }, "amount": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "denom", "amount" ] } }, "required": [ "resource", "count", "price" ] }, "description": "Resource units with replica counts" }, "timezone": { "type": "string", "description": "Client IANA timezone, validated against zones the runtime recognizes", "example": "America/Chicago" }, "reclamationWindow": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "Optional reclamation window in seconds; if provided, only providers with a reclamationWindow greater than or equal to this value will be considered", "example": 3600 } }, "required": [ "resources", "timezone" ] } } } }, "responses": { "200": { "description": "Returns matching providers", "content": { "application/json": { "schema": { "type": "object", "properties": { "providers": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string", "description": "Provider address", "example": "akash1q7spv2cw06yszgfp4f9ed59lkka6ytn8g4tkjf" }, "hostUri": { "type": "string", "description": "Provider HTTPS endpoint", "example": "https://provider.europlots.com:8443" }, "isAudited": { "type": "boolean", "description": "True if signed by a known auditor" }, "createdAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp marking when the provider was first enrolled in the inventory", "example": "2026-01-01T00:00:00.000Z" }, "location": { "type": "string", "nullable": true, "description": "Provider region from the location-region attribute (signed preferred, else self-declared); null if unset", "example": "us-west" }, "organization": { "type": "string", "nullable": true, "description": "Provider organization from the organization attribute (signed preferred, else self-declared); null if unset", "example": "Akash" }, "incidents": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "description": "Local calendar day, YYYY-MM-DD", "example": "2026-06-01" }, "hasOpenIncident": { "type": "boolean", "description": "True if the provider currently has any open incident" }, "incidentCount": { "type": "integer", "description": "Number of incident intervals overlapping that day" }, "downtimeSeconds": { "type": "integer", "description": "Downtime clipped to that day, in seconds (max 86400)" } }, "required": [ "date", "hasOpenIncident", "incidentCount", "downtimeSeconds" ] }, "description": "Per-day downtime over a rolling 7-day window" } }, "required": [ "owner", "hostUri", "isAudited", "createdAt", "location", "organization", "incidents" ] } } }, "required": [ "providers" ] } } } }, "400": { "description": "Invalid request body" } } } }, "/v1/confidential-compute/attestation/validate": { "post": { "operationId": "validateConfidentialComputeAttestation", "summary": "Validate confidential compute attestation evidence against the hardware vendors (AMD SEV-SNP, Intel TDX, NVIDIA)", "tags": [ "Confidential Compute" ], "security": [ { "BearerAuth": [] }, { "ApiKeyAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "nonce": { "type": "string", "description": "Per-request freshness challenge sent to the hardware, base64 (64 bytes, AEP-83 §5)" }, "report": { "type": "string", "description": "CPU attestation report (AMD SEV-SNP or Intel TDX quote), base64", "example": "BQAAAAAA..." }, "tee_platform": { "type": "string", "enum": [ "snp", "tdx", "snp-gpu", "tdx-gpu" ], "description": "TEE platform that produced the evidence" }, "cert_chain": { "type": "string", "default": "", "description": "CPU vendor cert chain, base64; may be empty (e.g. AMD VCEK fetched from KDS)", "example": "BQAAAAAA..." }, "auxblob": { "type": "string", "default": "", "description": "Platform auxiliary blob (e.g. TDX collateral), base64; may be empty", "example": "BQAAAAAA..." }, "gpu_reports": { "type": "array", "items": { "type": "object", "properties": { "device_index": { "type": "integer", "minimum": 0, "description": "GPU device index this report attests", "example": 0 }, "report": { "type": "string", "description": "Hardware-signed GPU attestation report (embeds the device cert chain), base64", "example": "BQAAAAAA..." } }, "required": [ "device_index", "report" ] }, "default": [], "description": "Per-GPU attestation reports; empty for CPU-only platforms" } }, "required": [ "nonce", "report", "tee_platform" ] } } } }, "responses": { "200": { "description": "Per-report attestation verdicts", "content": { "application/json": { "schema": { "type": "object", "properties": { "overall": { "type": "string", "enum": [ "valid", "invalid", "unverifiable" ], "description": "Rollup: valid only if every report is valid; invalid if any report is invalid; otherwise unverifiable" }, "nonce": { "type": "string", "description": "Echo of the request nonce, for client correlation" }, "reports": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "cpu" ] }, "vendor": { "type": "string", "enum": [ "amd-sev-snp", "intel-tdx" ] }, "status": { "type": "string", "enum": [ "valid", "invalid", "unverifiable" ], "description": "valid = chained to the vendor root, signature/EAT verified, and bound to the request nonce; invalid = a check ran and failed (bad signature, untrusted chain, nonce mismatch); unverifiable = the check could not be completed (vendor service unreachable, not configured, missing material)" }, "detail": { "type": "string", "description": "Human-readable explanation of the verdict" }, "checks": { "type": "object", "properties": { "certChainValid": { "type": "boolean", "description": "Evidence chains to the vendor root certificate" }, "signatureValid": { "type": "boolean", "description": "The report/EAT signature verified" }, "nonceMatch": { "type": "boolean", "description": "The evidence is bound to the request nonce" }, "notRevoked": { "type": "boolean", "description": "Revocation status; omitted when revocation was not checked" } }, "description": "Granular sub-results behind the verdict; fields are omitted when not evaluated" } }, "required": [ "kind", "vendor", "status", "detail" ] }, { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "gpu" ] }, "device_index": { "type": "integer", "minimum": 0 }, "vendor": { "type": "string", "enum": [ "nvidia" ] }, "status": { "type": "string", "enum": [ "valid", "invalid", "unverifiable" ], "description": "valid = chained to the vendor root, signature/EAT verified, and bound to the request nonce; invalid = a check ran and failed (bad signature, untrusted chain, nonce mismatch); unverifiable = the check could not be completed (vendor service unreachable, not configured, missing material)" }, "detail": { "type": "string", "description": "Human-readable explanation of the verdict" }, "checks": { "type": "object", "properties": { "certChainValid": { "type": "boolean", "description": "Evidence chains to the vendor root certificate" }, "signatureValid": { "type": "boolean", "description": "The report/EAT signature verified" }, "nonceMatch": { "type": "boolean", "description": "The evidence is bound to the request nonce" }, "notRevoked": { "type": "boolean", "description": "Revocation status; omitted when revocation was not checked" } }, "description": "Granular sub-results behind the verdict; fields are omitted when not evaluated" } }, "required": [ "kind", "device_index", "vendor", "status", "detail" ] } ] } } }, "required": [ "overall", "nonce", "reports" ] } } } }, "400": { "description": "Invalid request body" } } } }, "/v1/alerts": { "post": { "operationId": "createAlert", "parameters": [ { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertCreateInput" } } } }, "responses": { "201": { "description": "Returns the created alert", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertOutputResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "Alert" ] }, "get": { "operationId": "listAlerts", "parameters": [ { "name": "limit", "required": false, "in": "query", "description": "Number of items per page", "schema": { "type": "number" } }, { "name": "page", "required": false, "in": "query", "description": "Page number", "schema": { "type": "number" } }, { "name": "type", "required": false, "in": "query", "description": "Chain message type, used in conjunction with dseq to filter alerts liked to a specific deployment", "schema": { "type": "string" } }, { "name": "dseq", "required": false, "in": "query", "description": "Linked deployment's dseq", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the list of alerts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertListOutputResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "Alert" ] } }, "/v1/alerts/{id}": { "get": { "operationId": "getAlert", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the requested alert by id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertOutputResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "Alert" ] }, "patch": { "operationId": "updateAlert", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertPatchInput" } } } }, "responses": { "200": { "description": "Returns the updated alert", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertOutputResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "Alert" ] }, "delete": { "operationId": "deleteAlert", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the deleted alert", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AlertOutputResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "Alert" ] } }, "/v1/notification-channels": { "post": { "operationId": "createNotificationChannel", "parameters": [ { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelCreateInput" } } } }, "responses": { "201": { "description": "Returns the created notification channel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelOutput" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "NotificationChannel" ] }, "get": { "operationId": "listNotificationChannels", "parameters": [ { "name": "limit", "required": false, "in": "query", "description": "Number of items per page", "schema": { "type": "number" } }, { "name": "page", "required": false, "in": "query", "description": "Page number", "schema": { "type": "number" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns a paginated list of notification channels", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelListOutput" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "NotificationChannel" ] } }, "/v1/notification-channels/default": { "post": { "operationId": "createDefaultNotificationChannel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelCreateDefaultInput" } } } }, "responses": { "204": { "description": "Creates the default notification channel only if it doesn't exist." } }, "tags": [ "NotificationChannel" ] } }, "/v1/notification-channels/{id}": { "get": { "operationId": "getNotificationChannel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the requested notification channel by id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelOutput" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "404": { "description": "Returns 404 if the notification channel is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "NotificationChannel" ] }, "patch": { "operationId": "updateNotificationChannel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelPatchInput" } } } }, "responses": { "200": { "description": "Returns the updated notification channel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelOutput" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "404": { "description": "Returns 404 if the notification channel is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "NotificationChannel" ] }, "delete": { "operationId": "deleteNotificationChannel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the deleted notification channel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationChannelOutput" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "404": { "description": "Returns 404 if the notification channel is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "NotificationChannel" ] } }, "/v1/deployment-alerts/{dseq}": { "post": { "operationId": "upsertDeploymentAlert", "parameters": [ { "name": "dseq", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "x-owner-address", "required": false, "in": "header", "description": "The address of the user who owns the deployment", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentAlertCreateInput" } } } }, "responses": { "201": { "description": "Returns the created alert", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentAlertsResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "DeploymentAlert" ] }, "get": { "operationId": "listDeploymentAlerts", "parameters": [ { "name": "dseq", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns alerts for the specified deployment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentAlertsResponse" } } } }, "400": { "description": "Validation error responded when some request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationErrorResponse" } } } }, "401": { "description": "Unauthorized error responded when the user is not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorResponse" } } } }, "403": { "description": "Forbidden error responded when the user is not authorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorResponse" } } } }, "500": { "description": "Internal server error, should probably be reported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalServerErrorResponse" } } } } }, "tags": [ "DeploymentAlert" ] } } }, "components": { "schemas": { "AlertCreateInput": { "type": "object", "properties": { "data": { "oneOf": [ { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean", "default": true }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_MESSAGE" ] } }, "required": [ "notificationChannelId", "name", "summary", "description", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean", "default": true }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_EVENT" ] } }, "required": [ "notificationChannelId", "name", "summary", "description", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean", "default": true }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "type": { "type": "string", "enum": [ "DEPLOYMENT_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "owner": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "dseq", "owner" ] } }, "required": [ "notificationChannelId", "name", "summary", "description", "type", "conditions", "params" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean", "default": true }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "type": { "type": "string", "enum": [ "WALLET_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "owner": { "type": "string" }, "denom": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "owner", "denom" ] } }, "required": [ "notificationChannelId", "name", "summary", "description", "type", "conditions", "params" ] } ] } }, "required": [ "data" ] }, "AlertOutputResponse": { "type": "object", "properties": { "data": { "oneOf": [ { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_MESSAGE" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_EVENT" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "type": { "type": "string", "enum": [ "DEPLOYMENT_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "owner": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "dseq", "owner" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "type", "conditions", "params" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "type": { "type": "string", "enum": [ "WALLET_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "owner": { "type": "string" }, "denom": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "owner", "denom" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "type", "conditions", "params" ] } ] } }, "required": [ "data" ] }, "ValidationErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "number", "minimum": 400, "maximum": 400 }, "message": { "type": "string" }, "errors": { "type": "object", "properties": { "issues": { "type": "array", "items": { "type": "object", "properties": {} } } }, "required": [ "issues" ] } }, "required": [ "statusCode", "message", "errors" ] }, "UnauthorizedErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "number", "minimum": 401, "maximum": 401 }, "message": { "type": "string" } }, "required": [ "statusCode", "message" ] }, "ForbiddenErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "number", "minimum": 403, "maximum": 403 }, "message": { "type": "string" } }, "required": [ "statusCode", "message" ] }, "InternalServerErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "number", "minimum": 500, "maximum": 500 }, "message": { "type": "string" } }, "required": [ "statusCode", "message" ] }, "AlertListOutputResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_MESSAGE" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "type": { "type": "string" }, "suppressedBySystem": { "type": "boolean" }, "reclaimNotifiedAt": { "type": "string" } }, "required": [ "dseq", "type" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, "type": { "type": "string", "enum": [ "CHAIN_EVENT" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "conditions", "type" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "type": { "type": "string", "enum": [ "DEPLOYMENT_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "dseq": { "type": "string", "pattern": "^\\d+$" }, "owner": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "dseq", "owner" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "type", "conditions", "params" ] }, { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean" }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "notificationChannelName": { "type": "string" }, "status": { "type": "string" }, "createdAt": {}, "updatedAt": {}, "type": { "type": "string", "enum": [ "WALLET_BALANCE" ] }, "conditions": { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] }, "params": { "type": "object", "properties": { "owner": { "type": "string" }, "denom": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "owner", "denom" ] } }, "required": [ "notificationChannelId", "name", "enabled", "summary", "description", "id", "userId", "status", "createdAt", "updatedAt", "type", "conditions", "params" ] } ] } }, "pagination": { "type": "object", "properties": { "page": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "limit": { "type": "number", "minimum": 0, "exclusiveMinimum": false, "maximum": 1000, "exclusiveMaximum": false }, "total": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "totalPages": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "hasNextPage": { "type": "boolean" }, "hasPreviousPage": { "type": "boolean" } }, "required": [ "page", "limit", "total", "totalPages", "hasNextPage", "hasPreviousPage" ] } }, "required": [ "data", "pagination" ] }, "AlertPatchInput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 3 }, "enabled": { "type": "boolean", "default": true }, "summary": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 3 }, "conditions": { "oneOf": [ { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "operator", "field", "value" ] } ] }, { "oneOf": [ { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "and" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "type": "string", "enum": [ "or" ] }, "value": { "type": "array", "minItems": 2, "items": { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } } }, "required": [ "operator", "value" ] }, { "type": "object", "properties": { "operator": { "oneOf": [ { "type": "string", "enum": [ "eq" ] }, { "type": "string", "enum": [ "lt" ] }, { "type": "string", "enum": [ "gt" ] }, { "type": "string", "enum": [ "lte" ] }, { "type": "string", "enum": [ "gte" ] } ] }, "field": { "type": "string", "enum": [ "balance" ] }, "value": { "type": "number" } }, "required": [ "operator", "field", "value" ] } ] } ] } } } }, "required": [ "data" ] }, "NotificationChannelCreateInput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "email" ] }, "config": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string", "format": "email" } } }, "required": [ "addresses" ] }, "isDefault": { "type": "boolean" } }, "required": [ "name", "type", "config" ] } }, "required": [ "data" ] }, "NotificationChannelOutput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "email" ] }, "config": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string", "format": "email" } } }, "required": [ "addresses" ] }, "isDefault": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "createdAt": {}, "updatedAt": {} }, "required": [ "name", "type", "config", "isDefault", "id", "userId", "createdAt", "updatedAt" ] } }, "required": [ "data" ] }, "NotificationChannelCreateDefaultInput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "email" ] }, "config": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string", "format": "email" } } }, "required": [ "addresses" ] } }, "required": [ "name", "type", "config" ] } }, "required": [ "data" ] }, "NotFoundErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "number", "minimum": 404, "maximum": 404 }, "message": { "type": "string" } }, "required": [ "statusCode", "message" ] }, "NotificationChannelListOutput": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "email" ] }, "config": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string", "format": "email" } } }, "required": [ "addresses" ] }, "isDefault": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "createdAt": {}, "updatedAt": {} }, "required": [ "name", "type", "config", "isDefault", "id", "userId", "createdAt", "updatedAt" ] } }, "pagination": { "type": "object", "properties": { "page": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "limit": { "type": "number", "minimum": 0, "exclusiveMinimum": false, "maximum": 1000, "exclusiveMaximum": false }, "total": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "totalPages": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "hasNextPage": { "type": "boolean" }, "hasPreviousPage": { "type": "boolean" } }, "required": [ "page", "limit", "total", "totalPages", "hasNextPage", "hasPreviousPage" ] } }, "required": [ "data", "pagination" ] }, "NotificationChannelPatchInput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "email" ] }, "config": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string", "format": "email" } } }, "required": [ "addresses" ] } } } }, "required": [ "data" ] }, "DeploymentAlertCreateInput": { "type": "object", "properties": { "data": { "type": "object", "properties": { "alerts": { "type": "object", "properties": { "deploymentBalance": { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "enabled": { "type": "boolean", "default": true }, "threshold": { "type": "number", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "notificationChannelId", "threshold" ] }, "deploymentClosed": { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "enabled": { "type": "boolean", "default": true } }, "required": [ "notificationChannelId" ] } } } }, "required": [ "alerts" ] } }, "required": [ "data" ] }, "DeploymentAlertsResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "dseq": { "type": "string" }, "owner": { "type": "string" }, "alerts": { "type": "object", "properties": { "deploymentBalance": { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "enabled": { "type": "boolean", "default": true }, "threshold": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "id": { "type": "string", "format": "uuid" }, "status": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "notificationChannelId", "threshold", "id", "status" ] }, "deploymentClosed": { "type": "object", "properties": { "notificationChannelId": { "type": "string", "format": "uuid" }, "enabled": { "type": "boolean", "default": true }, "id": { "type": "string", "format": "uuid" }, "status": { "type": "string" }, "suppressedBySystem": { "type": "boolean" } }, "required": [ "notificationChannelId", "id", "status" ] } } } }, "required": [ "dseq", "alerts" ] } }, "required": [ "data" ] } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "JWT token for authenticated users, sent in \"Authorization: Bearer %token\" header." }, "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "x-api-key", "description": "API key for programmatic access." }, "x-user-id": { "type": "apiKey", "in": "header", "name": "x-user-id" }, "x-owner-address": { "type": "apiKey", "in": "header", "name": "x-owner-address" } } } }