consumes: - application/json info: description: Thyra HTTP server API. title: thyra-server version: 0.0.0 produces: - application/json schemes: - http - https swagger: "2.0" paths: /thyra/wallet/{resource}: get: operationId: thyraWallet produces: - application/json - text/javascript - text/html - text/css - text/webp - image/png parameters: - in: path name: resource type: string default: index.html required: true description: Website resource. responses: "200": description: Page found "404": description: Resource not found. schema: $ref: "#/definitions/Error" /thyra/websiteCreator/{resource}: get: operationId: thyraWebsiteCreator produces: - application/json - text/javascript - text/html - text/css - text/webp - image/png parameters: - in: path name: resource type: string default: index.html required: true description: Website resource. responses: "200": description: Page found "404": description: Resource not found. schema: $ref: "#/definitions/Error" /thyra/registry/{resource}: get: operationId: thyraRegistry produces: - application/json - text/javascript - text/html - text/css - text/webp - image/png parameters: - in: path name: resource type: string default: index.html required: true description: Website resource. responses: "200": description: Page found /thyra/events/{str}/{caller}: get: operationId: thyraEventsGetter produces: - application/json parameters: - in: path name: str type: string required: true description: Data content of the event. - in: path name: caller type: string required: true description: Creator of the transaction that triggered the event. responses: "200": description: Event retrieved schema: $ref: "#/definitions/Events" "400": description: Bad request. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /mgmt/wallet: get: operationId: mgmtWalletGet produces: - application/json responses: "200": description: Wallets retrieved schema: type: array items: $ref: "#/definitions/Wallet" "400": description: Bad request. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" post: operationId: mgmtWalletCreate parameters: - in: body name: body required: true x-nullable: false schema: type: object required: - nickname - password properties: nickname: description: Wallet's short name. type: string password: description: Private key password. type: string produces: - application/json responses: "200": description: New wallet created. schema: $ref: "#/definitions/Wallet" "400": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" put: operationId: mgmtWalletImport produces: - application/json responses: "200": description: New wallet created. schema: $ref: "#/definitions/Wallet" "400": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /mgmt/wallet/{nickname}: delete: operationId: mgmtWalletDelete parameters: - in: path name: nickname type: string required: true description: Wallet's short name. produces: - application/json responses: "204": description: Wallet removed. schema: $ref: "#/definitions/Wallet" "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" get: operationId: mgmtWalletGetter parameters: - in: path name: nickname type: string required: true description: Wallet's short name. produces: - application/json responses: "200": description: Wallet retrieved. schema: $ref: "#/definitions/Wallet" "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /my/domains/{nickname}: get: operationId: myDomainsGetter parameters: - in: path name: nickname type: string required: true description: Wallet's short name. produces: - application/json responses: "200": description: Domains returned. May be empty. schema: type: array items: $ref: "#/definitions/Websites" "400": description: Bad request. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /websiteCreator/prepare: put: operationId: websiteCreatorPrepare consumes: - multipart/form-data parameters: - in: formData name: url type: string pattern: "^[a-z0-9]+$" required: true x-nullable: false description: URL without dot (.), upper case and special characters - in: formData name: nickname type: string required: true x-nullable: false description: Name of the Wallet in which the website will be deployed. - in: formData name: zipfile type: file required: true x-nullable: false description: Website contents in a ZIP file. produces: - application/json responses: "200": description: New website created. schema: $ref: "#/definitions/Websites" "400": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /websiteCreator/upload: post: operationId: websiteCreatorUpload consumes: - multipart/form-data parameters: - in: formData name: address type: string required: true x-nullable: false description: Address where to deploy website. The account must have been prepare to receive a website. - in: formData name: nickname type: string required: true x-nullable: false description: Wallet's nickname to be used for receiving the website - in: formData name: zipfile type: file required: true x-nullable: false description: Website contents in a ZIP file. produces: - application/json responses: "200": description: Website's chunk deployed. schema: $ref: "#/definitions/Websites" "400": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /websiteCreator/uploadMissingChunks: post: operationId: websiteUploadMissingChunks consumes: - multipart/form-data parameters: - in: formData name: address type: string required: true x-nullable: false description: Address where to deploy website. The account must have been prepare to receive a website. - in: formData name: nickname type: string required: true x-nullable: false description: Wallet's nickname to be used for receiving the website - in: formData name: zipfile type: file required: true x-nullable: false description: Website contents in a ZIP file. - in: formData name: missedChunks type: string required: true x-nullable: false description: Website missing chunks produces: - application/json responses: "200": description: Website's chunk deployed. schema: $ref: "#/definitions/Websites" "400": description: Bad request. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /cmd/executeFunction: post: operationId: cmdExecuteFunction parameters: - in: body name: body required: true x-nullable: false schema: type: object required: - nickname - name - at default: nickname: "test" name: "test" at: "A1MrqLgWq5XXDpTBH6fzXHUg7E8M5U2fYDAF3E1xnUSzyZuKpMh" args: "" gaz: price: 0 limit: 700000000 coins: 0 expiry: 3 fee: 0 keyId: default properties: nickname: description: Wallet's short name. type: string x-nullable: false name: description: Function name to call. type: string x-nullable: false at: description: Smart contract address exporting the function to call. type: string x-nullable: false args: description: Arguments to pass to the function. type: string default: "" gaz: type: object description: Gaz attibutes. Gaz is a virtual resource consumed by node while running smart contract. properties: price: type: number description: Price of a gaz unit. default: 0 limit: type: integer description: Maximum number of gaz unit that a node will be able consume. default: 700000000 coins: description: Set the fee amount (in massa) that will be given to the block creator. type: number default: 0 expiry: description: Set the expiry duration (in number of slots) of the transaction. type: integer default: 3 fee: description: Set the fee amount (in massa) that will be given to the block creator. type: number default: 0 keyId: description: Defines the key to used to sign the transaction. type: string default: default produces: - application/json responses: "200": description: OK. schema: type: string description: Operation id. "422": description: Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /kpi: get: operationId: kpi parameters: - name: scope in: query type: array minItems: 0 uniqueItems: true collectionFormat: csv items: type: string enum: [wallet, node, stacking, blockchain] produces: - application/json responses: "200": description: kpi message. schema: type: object properties: wallet: type: array items: type: object properties: coin: type: string balance: type: number node: type: array items: type: object properties: memory: type: array items: type: number cpu: type: array items: type: number storage: type: array items: type: number network: type: array items: type: number stacking: type: array items: type: object properties: address: type: string rolls: type: integer slashing: type: integer gains: type: number /browse/{address}/{resource}: get: operationId: browse produces: - application/json - text/html - text/css - text/webp - image/png parameters: - in: path name: address type: string required: true description: Address containing the website. - in: path name: resource type: string default: index.html required: true description: Website resource. responses: "200": description: Resource retrieved. "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Resource not found. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /mgmt/plugins: get: operationId: mgmtPluginsList produces: - application/json responses: "200": description: Plugins list schema: type: array items: $ref: "#/definitions/Plugin" "400": description: Bad request. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /all/domains: get: operationId: allDomainsGetter produces: - application/json responses: "200": description: All domains returned. schema: type: array items: $ref: "#/definitions/Registry" "400": description: Bad request. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /plugin-manager: post: operationId: pluginManagerInstall parameters: - in: query name: source type: string format: url required: true x-nullable: false description: URL from which to retrieve the plug-in. produces: - application/json responses: "204": description: Plugin successfully installed "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" get: operationId: pluginManagerList responses: "200": description: List all installed plugins. schema: type: array items: type: object properties: id: description: Plugin identifier. type: integer x-nullable: false name: description: Plugin name. type: string x-nullable: false description: description: Plugin description. type: string x-nullable: false logo: description: Plugin logo. type: string format: byte x-nullable: false "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /plugin-manager/register: post: operationId: pluginManagerRegister parameters: - in: body name: body required: true x-nullable: false schema: type: object required: - id - name - description - logo - authority - api-spec properties: id: description: Plugin identifier. type: integer x-nullable: false name: description: Plugin name. type: string x-nullable: false description: description: Plugin description. type: string x-nullable: false logo: description: Plugin logo. type: string format: byte x-nullable: false authority: description: URL authority to use to connect to the plugin type: string x-nullable: false api_spec: description: Plugin API specification type: string x-nullable: false responses: "204": description: Plugin successfully installed "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /plugin-manager/{id}: get: operationId: pluginManagerGetInformation parameters: - in: path name: id type: integer required: true description: Plugin identifier. responses: "200": description: Get execution information from the plugin. schema: type: object properties: status: description: Plugin status. type: string enum: ["Starting", "Up", "Down", "ShuttingDown", "Crashed"] x-nullable: false "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" delete: operationId: pluginManagerUninstall parameters: - in: path name: id type: integer required: true description: Plugin identifier. responses: "204": description: Plugin successfuly remove from the system. "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" /plugin-manager/{id}/execute: post: operationId: pluginManagerExecuteCommand parameters: - in: path name: id type: integer required: true description: Plugin unique identifier. - in: body name: body required: true x-nullable: false schema: type: object required: - command properties: command: description: Command to execute. type: string enum: ["update", "stop", "start", "restart"] x-nullable: false responses: "204": description: Command successfuly executed. "400": description: Bad request. schema: $ref: "#/definitions/Error" "404": description: Not found. schema: $ref: "#/definitions/Error" "422": description: Unprocessable Entity - The syntax is correct, but the server was unable to process the contained instructions. schema: $ref: "#/definitions/Error" "500": description: Internal Server Error - The server has encountered a situation it does not know how to handle. schema: $ref: "#/definitions/Error" definitions: Error: type: object description: Error object. required: - code - message properties: code: description: error code. type: string x-nullable: false message: description: error message. type: string x-nullable: false Wallet: type: object description: Wallet object (V0). required: - nickname - address - keyPairs properties: nickname: description: wallet's nickname. type: string address: description: wallet's address. type: string balance: description: wallet's balance. type: number keyPairs: description: wallet's key pairs. type: array items: type: object required: - privateKey - publicKey - salt - nonce properties: privateKey: description: Key pair's private key. type: string format: base58check publicKey: description: Key pair's public key. type: string format: base58check salt: description: Salt used by the PBKDF that generates the secret key used to protect the key pair's private key. type: string format: base58check nonce: description: Nonce used by the AES-GCM algorithm used to protect the key pair's private key. type: string format: base58check Websites: type: object description: Websites object (V0). properties: name: description: Website's name. type: string address: description: Website's address. type: string brokenChunks: description: Array of empty chunks if website contains preventing the website to load. type: array items: type: string Events: type: object description: Events object (V0) properties: data: description: Event data. type: string address: description: Event caller. type: string Registry: type: object description: Registry object (V0). properties: name: description: Website's name. type: string address: description: Website's address. type: string metadata: description: byte array as string including created_at and updated_at values type: string format: byte Plugin: type: object description: Plugin object (V0). properties: name: description: Plugin's name. type: string port: description: Plugin's port. type: integer