{ "swagger": "2.0", "info": { "description": "Manage AvaCloud API", "title": "AvaCloud API", "contact": {}, "version": "1.0.0" }, "paths": { "/v1/api/subnets": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get all the L1s in my org", "produces": [ "application/json" ], "tags": [ "L1 API" ], "summary": "Get all the L1s in my org", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pubmodels.ListSubnetsResponse" } }, "401": { "description": "Unauthorized" }, "500": { "description": "Internal Server Error" } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Creates a new L1", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "L1 API" ], "summary": "Create a new L1", "parameters": [ { "type": "string", "description": "Idempotency key for creating L1", "name": "Idempotency-Key", "in": "header", "required": true }, { "description": "Subnet to create", "name": "subnet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pubapibody.CreateSubnetRequestBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/pubmodels.Subnet" } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "500": { "description": "Internal Server Error" } } } }, "/v1/api/subnets/infraplan/network/{network}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get Infra Plans by network", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Infra Plans API" ], "summary": "Get Infra Plans by network", "parameters": [ { "type": "string", "description": "network", "name": "network", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/pubmodels.PlanTemplate" } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" } } } }, "/v1/api/subnets/{subnetID}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Get L1 by subnetID", "produces": [ "application/json" ], "tags": [ "L1 API" ], "summary": "Get L1 by subnetID", "parameters": [ { "type": "string", "description": "SubnetID", "name": "subnetID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pubmodels.Subnet" } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" } } } }, "/v1/api/subnets/{subnetID}/health": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Checks the health of a L1.", "produces": [ "application/json" ], "tags": [ "L1 API" ], "summary": "Health check for L1", "parameters": [ { "type": "string", "description": "SubnetID", "name": "subnetID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/apibody.SubnetHealthCheck" } }, "401": { "description": "Unauthorized" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/v1/api/subnets/{subnetID}/teardown": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Tear down a L1", "produces": [ "application/json" ], "tags": [ "L1 API" ], "summary": "Tear down a L1", "parameters": [ { "type": "string", "description": "SubnetID", "name": "subnetID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pubmodels.Subnet" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/v1/orgs/{orgID}/token": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Resolve the Auth0 client configured for an org and create a token to call AvaCloud API", "produces": [ "application/json" ], "tags": [ "Token API" ], "summary": "Create Token for an organization", "parameters": [ { "type": "string", "description": "Org ID", "name": "orgID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CreateTokenResponseBody" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "429": { "description": "Too Many Requests" }, "500": { "description": "Internal Server Error" } } } }, "/v1/token": { "post": { "description": "Create Token to call AvaCloud API", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Token API" ], "summary": "Create Token to call AvaCloud API", "parameters": [ { "description": "Client credentials to exchange for an AvaCloud token", "name": "token", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateTokenRequestBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CreateTokenResponseBody" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.CreateTokenResponseBody" } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "429": { "description": "Too Many Requests" }, "500": { "description": "Internal Server Error" } } } } }, "definitions": { "apibody.SubnetHealthCheck": { "type": "object", "properties": { "healthy": { "type": "boolean" }, "notFound": { "type": "boolean" } } }, "models.ACP224FeeManagerConfig": { "type": "object", "properties": { "gasConfig": { "type": "string" }, "gasPrice": { "type": "integer" }, "staticFee": { "type": "boolean" } } }, "models.APINodeDetails": { "type": "object", "properties": { "cloudProvider": { "allOf": [ { "$ref": "#/definitions/models.CloudProvider" } ], "x-nullable": true }, "count": { "type": "integer" }, "region": { "type": "string" }, "resources": { "allOf": [ { "$ref": "#/definitions/models.InfraResources" } ], "x-nullable": true }, "size": { "allOf": [ { "$ref": "#/definitions/models.ResourcesSize" } ], "x-nullable": true } } }, "models.APIURL": { "type": "object", "properties": { "activeSince": { "type": "integer" }, "cluster": { "type": "string" }, "region": { "type": "string" }, "url": { "type": "string" } } }, "models.AWMRelayerStatus": { "type": "string", "enum": [ "Pending", "Deployed", "Errored" ], "x-enum-varnames": [ "AWMRelayerStatusPending", "AWMRelayerStatusDeployed", "AWMRelayerStatusErrored" ] }, "models.AdminAddress": { "type": "object", "properties": { "alias": { "type": "string" }, "evmAddress": { "type": "string", "x-nullable": true } } }, "models.Airdrop": { "type": "object", "properties": { "address": { "type": "string" }, "value": { "type": "string" } } }, "models.BinaryInfo": { "type": "object", "properties": { "customAvaGoTag": { "type": "string" }, "customGoVersion": { "type": "string" }, "customSubnetEVMTag": { "type": "string" } } }, "models.BridgeAppRegistration": { "type": "string", "enum": [ "Y", "N" ], "x-enum-varnames": [ "IsRegisteredInBridgeApp", "IsNotRegisteredInBridgeApp" ] }, "models.CloudProvider": { "type": "string", "enum": [ "aws", "gcp", "error" ], "x-enum-varnames": [ "AWS", "GCP", "Error" ] }, "models.CreateTokenRequestBody": { "type": "object", "required": [ "client_id", "client_secret" ], "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" } } }, "models.CreateTokenResponseBody": { "type": "object", "properties": { "access_token": { "type": "string" }, "expires_in": { "type": "integer" }, "token_type": { "type": "string" } } }, "models.DeploymentState": { "type": "string", "enum": [ "Development", "AwaitingApproval", "ReadyToSignSubnetCreation", "ReadyToSignBlockchainCreation", "ReadyToSignAddValidator", "WaitingForFoundation", "ReadyToSignAddSubnetValidator", "InfraPending", "Deployed", "ReadyForTeardown", "TornDown", "Cancelled", "Errored", "LocalDeploying", "LocalLive", "LocalDestroying", "LocalDestroyed" ], "x-enum-varnames": [ "Development", "AwaitingApproval", "ReadyToSignSubnetCreation", "ReadyToSignBlockchainCreation", "ReadyToSignAddValidator", "WaitingForFoundation", "ReadyToSignAddSubnetValidator", "InfraPending", "Deployed", "ReadyForTeardown", "TornDown", "Cancelled", "Errored", "LocalDeploying", "LocalLive", "LocalDestroying", "LocalDestroyed" ] }, "models.Genesis": { "type": "object", "properties": { "acp224FeeConfig": { "allOf": [ { "$ref": "#/definitions/models.ACP224FeeManagerConfig" } ], "x-nullable": true }, "airdrops": { "type": "array", "items": { "$ref": "#/definitions/models.Airdrop" }, "x-nullable": true }, "chainID": { "type": "integer" }, "gasConfig": { "type": "string" }, "precompiles": { "type": "array", "items": { "$ref": "#/definitions/models.Precompile" }, "x-nullable": true }, "selectedFeePrecompile": { "type": "string" }, "symbol": { "type": "string" }, "vmType": { "type": "string" } } }, "models.GlacierSetupDetails": { "type": "object", "properties": { "debugNodes": { "type": "array", "items": { "$ref": "#/definitions/models.APINodeDetails" }, "x-nullable": true }, "enableIndexing": { "type": "boolean" } } }, "models.InfraResources": { "type": "object", "properties": { "cpu": { "type": "string", "x-nullable": true }, "memory": { "type": "string", "x-nullable": true } } }, "models.Precompile": { "type": "object", "properties": { "addressAliases": { "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "admins": { "type": "array", "items": { "type": "string" }, "x-nullable": true }, "enabled": { "type": "array", "items": { "type": "string" }, "x-nullable": true }, "name": { "type": "string" }, "rewardManagerInitialRewardConfig": { "allOf": [ { "$ref": "#/definitions/models.RewardManagerInitialRewardConfig" } ], "x-nullable": true } } }, "models.PublicExplorer": { "type": "object", "properties": { "entryID": { "type": "string" }, "url": { "type": "string" } } }, "models.ResourcesSize": { "type": "string", "enum": [ "small", "medium", "large" ], "x-enum-varnames": [ "SmallSize", "MediumSize", "LargeSize" ] }, "models.RewardManagerInitialRewardConfig": { "type": "object", "properties": { "allowFeeRecipients": { "type": "boolean" }, "rewardAddress": { "type": "string" } } }, "models.TeleporterConfiguration": { "type": "object", "properties": { "awmRelayerID": { "type": "string" }, "awmRelayerStatus": { "$ref": "#/definitions/models.AWMRelayerStatus" }, "messengerContractVersions": { "description": "MessengerContractVersions is a map of messenger contract versions to their addresses", "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "registryContractAddress": { "type": "string" } } }, "models.ValidatorDetails": { "type": "object", "properties": { "cloudProvider": { "allOf": [ { "$ref": "#/definitions/models.CloudProvider" } ], "x-nullable": true }, "count": { "type": "integer" }, "region": { "type": "string" } } }, "models.ValidatorManager": { "type": "object", "properties": { "proxyAdminContractAddress": { "type": "string" }, "proxyContractAddress": { "type": "string" }, "validatorManagerAddress": { "type": "string" } } }, "models.ValidatorOutput": { "type": "object", "properties": { "bLSPublicKey": { "type": "string" }, "cluster": { "type": "string" }, "ipAddress": { "type": "string" }, "nodeID": { "type": "string" }, "p2pPort": { "type": "integer" }, "proofOfPossession": { "type": "string" }, "region": { "type": "string" } } }, "pubapibody.CreateSubnetRequestBody": { "type": "object", "required": [ "airdrops", "evmChainID", "infraPlan", "name", "network", "symbol", "transformedName" ], "properties": { "adminThreshold": { "type": "integer" }, "admins": { "type": "array", "items": { "$ref": "#/definitions/models.AdminAddress" } }, "airdrops": { "type": "array", "items": { "$ref": "#/definitions/models.Airdrop" } }, "companyName": { "type": "string" }, "deploymentType": { "$ref": "#/definitions/pubmodels.DeploymentType" }, "evmChainID": { "type": "integer" }, "gasConfig": { "type": "string" }, "gasPrice": { "type": "integer", "x-nullable": true }, "infraPlan": { "$ref": "#/definitions/pubmodels.InfraPlan" }, "metadata": { "type": "object", "additionalProperties": true, "x-nullable": true }, "name": { "type": "string" }, "network": { "type": "string" }, "precompiles": { "type": "array", "items": { "$ref": "#/definitions/models.Precompile" } }, "setupInteroperability": { "type": "boolean" }, "simulateInfra": { "type": "boolean" }, "staticFee": { "type": "boolean", "x-nullable": true }, "symbol": { "type": "string" }, "transformedName": { "type": "string" } } }, "pubmodels.BundlePlan": { "type": "object", "properties": { "dynamicFees": { "type": "array", "items": { "$ref": "#/definitions/pubmodels.DynamicFee" } }, "fee": { "type": "string" }, "feeAmount": { "type": "string" }, "productID": { "type": "string" } } }, "pubmodels.DeploymentInfo": { "type": "object", "properties": { "avalancheSubnetID": { "type": "string" }, "blockchainID": { "type": "string" }, "customerValidators": { "type": "array", "items": { "$ref": "#/definitions/models.ValidatorOutput" }, "x-nullable": true }, "dataDebugURLs": { "type": "array", "items": { "$ref": "#/definitions/models.APIURL" }, "x-nullable": true }, "dedicatedAPIs": { "type": "array", "items": { "$ref": "#/definitions/models.APIURL" }, "x-nullable": true }, "rpcURL": { "type": "string" }, "validatorManager": { "allOf": [ { "$ref": "#/definitions/models.ValidatorManager" } ], "x-nullable": true }, "validators": { "type": "array", "items": { "$ref": "#/definitions/models.ValidatorOutput" }, "x-nullable": true }, "vmID": { "type": "string" }, "websocketURL": { "type": "string" } } }, "pubmodels.DeploymentType": { "type": "string", "enum": [ "", "PoA" ], "x-enum-varnames": [ "DeploymentTypeUnknown", "DeploymentTypePoA" ] }, "pubmodels.DynamicFee": { "type": "object", "properties": { "fee": { "type": "string" }, "feeLabel": { "type": "string" }, "name": { "type": "string" } } }, "pubmodels.GasRelayerPlan": { "type": "object", "properties": { "dynamicPrice": { "$ref": "#/definitions/pubmodels.DynamicFee" }, "flatPrice": { "type": "string" }, "flatPriceLegend": { "type": "string" }, "productID": { "type": "string" }, "redundancy": { "type": "boolean" }, "rps": { "type": "integer" }, "signers": { "type": "integer" } } }, "pubmodels.InfraPlan": { "type": "object", "properties": { "customerValidators": { "type": "string", "x-nullable": true }, "debugNodes": { "type": "string", "x-nullable": true }, "dedicatedNodes": { "type": "string", "x-nullable": true }, "plan": { "type": "string" }, "rpcNodes": { "type": "string", "x-nullable": true }, "validators": { "type": "string", "x-nullable": true }, "wsNodes": { "type": "string", "x-nullable": true } } }, "pubmodels.ListSubnetsResponse": { "type": "object", "properties": { "lastEvaluatedKey": { "type": "string" }, "subnets": { "type": "array", "items": { "$ref": "#/definitions/pubmodels.Subnet" } } } }, "pubmodels.PlanTemplate": { "type": "object", "properties": { "bundlePlan": { "allOf": [ { "$ref": "#/definitions/pubmodels.BundlePlan" } ], "x-nullable": true }, "gasRelayerPlan": { "allOf": [ { "$ref": "#/definitions/pubmodels.GasRelayerPlan" } ], "x-nullable": true }, "mainnetDetails": { "allOf": [ { "$ref": "#/definitions/pubmodels.SubnetPlanDetails" } ], "x-nullable": true }, "planDisplayName": { "type": "string" }, "planID": { "type": "string" }, "planKey": { "type": "string" }, "testnetDetails": { "allOf": [ { "$ref": "#/definitions/pubmodels.SubnetPlanDetails" } ], "x-nullable": true } } }, "pubmodels.Subnet": { "type": "object", "properties": { "adminThreshold": { "type": "integer" }, "admins": { "type": "array", "items": { "$ref": "#/definitions/models.AdminAddress" }, "x-nullable": true }, "binaryInfo": { "allOf": [ { "$ref": "#/definitions/models.BinaryInfo" } ], "x-nullable": true }, "bundleID": { "description": "It can be nullable until we shut down the current plans flow", "type": "string", "x-nullable": true }, "createdAt": { "type": "integer" }, "deployInfo": { "allOf": [ { "$ref": "#/definitions/pubmodels.DeploymentInfo" } ], "x-nullable": true }, "deploymentError": { "type": "string" }, "deploymentStatus": { "$ref": "#/definitions/models.DeploymentState" }, "deploymentType": { "$ref": "#/definitions/pubmodels.DeploymentType" }, "devnetExpiration": { "type": "integer", "x-nullable": true }, "devnetIndexKey": { "type": "string", "x-nullable": true }, "devnetStartTime": { "type": "integer", "x-nullable": true }, "evmChainID": { "type": "string" }, "foundationSigned": { "type": "boolean" }, "genesis": { "allOf": [ { "$ref": "#/definitions/models.Genesis" } ], "x-nullable": true }, "id": { "type": "string" }, "infraPlan": { "allOf": [ { "$ref": "#/definitions/pubmodels.InfraPlan" } ], "x-nullable": true }, "isRegisteredInBridgeApp": { "allOf": [ { "$ref": "#/definitions/models.BridgeAppRegistration" } ], "x-nullable": true }, "isRejected": { "type": "boolean" }, "metadata": { "type": "object", "additionalProperties": true, "x-nullable": true }, "metricsIngestionComplete": { "type": "boolean" }, "name": { "type": "string" }, "network": { "type": "string" }, "orgID": { "type": "string" }, "planDetails": { "allOf": [ { "$ref": "#/definitions/pubmodels.SubnetPlanDetails" } ], "x-nullable": true }, "publicExplorer": { "allOf": [ { "$ref": "#/definitions/models.PublicExplorer" } ], "x-nullable": true }, "runningAvaGoVersion": { "type": "string" }, "runningSubEVMVersion": { "type": "string" }, "setupInteroperability": { "type": "boolean" }, "simulateInfra": { "type": "boolean" }, "submittedAt": { "type": "integer" }, "subscriptionID": { "description": "It can be nullable until we shut down the current plans flow", "type": "string", "x-nullable": true }, "teleporterConfiguration": { "allOf": [ { "$ref": "#/definitions/models.TeleporterConfiguration" } ], "x-nullable": true }, "transformedName": { "type": "string" }, "updatedAt": { "type": "integer" } } }, "pubmodels.SubnetPlanDetails": { "type": "object", "properties": { "customerValidators": { "type": "array", "items": { "$ref": "#/definitions/models.ValidatorDetails" }, "x-nullable": true }, "dedicatedNodes": { "type": "array", "items": { "$ref": "#/definitions/models.APINodeDetails" }, "x-nullable": true }, "glacier": { "allOf": [ { "$ref": "#/definitions/models.GlacierSetupDetails" } ], "x-nullable": true }, "metricsIndexing": { "type": "boolean", "x-nullable": true }, "rpcNodes": { "type": "array", "items": { "$ref": "#/definitions/models.APINodeDetails" }, "x-nullable": true }, "validators": { "type": "array", "items": { "$ref": "#/definitions/models.ValidatorDetails" }, "x-nullable": true }, "wsNodes": { "type": "array", "items": { "$ref": "#/definitions/models.APINodeDetails" }, "x-nullable": true } } } }, "securityDefinitions": { "BearerAuth": { "description": "Enter the Bearer token in the format: Bearer \u003ctoken\u003e", "type": "apiKey", "name": "Authorization", "in": "header" } } }