openapi: 3.0.1 info: title: PaaS description: |- Manage your apps using our API [wss://api.iran.liara.ir?token=&cmd=/bin/bash&project_id=]( wss://api.iran.liara.ir?token=&cmd=/bin/bash&project_id=) Parameters: - `token`: Your api token in liara - `cmd`: By default /bin/bash - `project_id`: The id of your project in liara This `WebSocket` endpoint allows `real-time` communication with the projects service hosted at `Liara` You can use `WebSocket protocols` to send and receive data, enabling efficient and low-latency interactions with the projects termsOfService: '#' contact: email: info@liara.ir version: 1.0.0 externalDocs: description: Find out more about PaaS url: http://liara.ir servers: - url: https://api.iran.liara.ir/ security: - jwt: [] paths: /v1/projects: get: tags: - Apps summary: Get details of all projects description: get all details of all projects that user owns operationId: getApps responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Projects' 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} post: tags: - Apps summary: Create a app description: create app that user owns operationId: createApp requestBody: content: application/json: schema: $ref: '#/components/schemas/Create-app' required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 409: description: Conflict content: {} x-codegen-request-body-name: create app /v1/projects/{name}: get: tags: - Apps summary: Get details of a project description: get all details of all project that user owns operationId: getAppByName parameters: - name: name in: path description: The name of your app required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/ProjectAllDetails' 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} delete: tags: - Apps summary: Delete a app description: delete app that user owns operationId: deleteAppByName parameters: - name: name in: path description: The name of the app to delete required: true schema: type: string responses: 200: description: Your request has been submitted. content: {} 204: description: App deleted. content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/actions/scale: post: tags: - Apps summary: Turn on or off a app description: turn on or off a app that user owns operationId: turnApp parameters: - name: name in: path description: The name of the app to turn on or off required: true schema: type: string requestBody: description: Return 1 to turn on or 0 to turn off content: application/json: schema: required: - scale type: object properties: scale: type: number required: true responses: 200: description: Your request has been submitted. content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: scale /v1/projects/{name}/actions/restart: post: tags: - Apps summary: To restart a app description: to restart app that user owns operationId: restartApp parameters: - name: name in: path description: The name of the app to restart required: true schema: type: string responses: 200: description: Your request has been submitted. content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v2/projects/{name}/sources: post: tags: - Deploy summary: Deploy sources code description: deploy sources code that user owns operationId: sourcesDeploy parameters: - name: name in: path description: The name of your app for deploy required: true schema: type: string requestBody: content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary description: The .gz file to deploy required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v2/projects/{name}/releases: post: tags: - Deploy summary: Deploy releases description: deploy releases that user owns operationId: releasesDeploy parameters: - name: name in: path description: The name of your app for deploy required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/Deploy-releases' required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: deploy releases /v1/projects/{id}/zero-downtime/{status}: post: tags: - Settings summary: Zero downtime description: zero downtime that user owns operationId: zeroDowntime parameters: - name: id in: path required: true schema: type: string - name: status in: path description: disable or enable required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} /v1/projects/{id}/default-subdomain/{status}: post: tags: - Settings summary: Default subdomain description: default subdomain that user owns operationId: defaultSubdomain parameters: - name: id in: path required: true schema: type: string - name: status in: path description: disable or enable required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} /v1/projects/{id}/fixed-ip/{status}: post: tags: - Settings summary: IP static description: ip static that user owns operationId: ipStatic parameters: - name: id in: path required: true schema: type: string - name: status in: path description: disable or enable required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: type: object 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} /v1/projects/update-envs: post: tags: - Settings summary: Update envs description: update envs that user owns operationId: updateEnvs requestBody: content: application/json: schema: $ref: '#/components/schemas/Update-envs' required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: update envs /v1/projects/{name}/resize: post: tags: - Apps summary: Change plan description: create app that user owns operationId: changePlan parameters: - name: name in: path description: The name of your app required: true schema: type: string requestBody: description: The plan of your app content: application/json: schema: required: - planID type: object properties: planID: type: string required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: plan /v1/projects/{id}/disks: get: tags: - Disks summary: Get disks description: get disks that user owns operationId: getDisks parameters: - name: id in: path description: The id of your app required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{id}/disks/{name}/backups: get: tags: - Disks summary: Get backups disk description: get backups disk that user owns operationId: getBackups parameters: - name: id in: path description: The id of your app required: true schema: type: string - name: name in: path description: The name of your disk required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} post: tags: - Disks summary: Create backup disk description: create backup disk that user owns operationId: createBackup parameters: - name: id in: path description: The id of your app required: true schema: type: string - name: name in: path description: The name of your disk required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{id}/disks/{dname}/backups/manual/{bname}/download: post: tags: - Disks summary: Download backup disk description: download backup disk that user owns operationId: downloadBackup parameters: - name: id in: path description: The id of your app required: true schema: type: string - name: dname in: path description: The name of your disk required: true schema: type: string - name: bname in: path description: The name of your backup required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/disks: post: tags: - Disks summary: Create a disk description: create a disk that user owns operationId: createDisk parameters: - name: name in: path description: The name of your app required: true schema: type: string requestBody: description: The disk of your app content: application/json: schema: required: - name - size type: object properties: name: type: string size: type: string required: true responses: 201: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: disk /v1/projects/{id}/disks/{name}: delete: tags: - Disks summary: Delete a disk description: delete a disk that user owns operationId: deleteDisk parameters: - name: id in: path description: The id of your app required: true schema: type: string - name: name in: path description: The name of your disk of app required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} /v1/domains?project={name}: get: tags: - Domains summary: Get all domains description: get all domains that user owns operationId: getAppDomains parameters: - name: name in: path description: The name of your app required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Domains' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/domains/{id}/check: get: tags: - Domains summary: Check a domain description: check a domain that user owns operationId: checkDomain parameters: - name: id in: path description: The id of your domain required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/CheckDomain' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: Domain does not exists. content: {} /v1/projects/{name}/logs?since={since}: get: tags: - Apps summary: Get logs of app description: get logs of app that user owns operationId: getAppLogs parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: since in: path description: Show logs since timestamp required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/applets: get: tags: - Apps summary: Get applets of app description: get applets of app that user owns operationId: getAppApplets parameters: - name: name in: path description: The name of your app required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Applets' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/releases?page={page}&count={count}: get: tags: - Apps summary: Get releases of app description: get releases of app that user owns operationId: getAppReleases parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: page in: path description: The page of your releases required: true schema: type: number default: 1.0 - name: count in: path description: The count of your releases required: true schema: type: number default: 10.0 responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Releases' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/metrics/summary: get: tags: - Reports summary: Get summary reports of app description: get summary reports of app that user owns operationId: getAppSummaryReports parameters: - name: name in: path description: The name of your app required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/metrics/cpu?since={since}: get: tags: - Reports summary: Get cpu reports of app description: get cpu reports of app that user owns operationId: getAppCpuReports parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: since in: path description: The since of your cpu reports required: true schema: type: number responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/metrics/memory?since={since}: get: tags: - Reports summary: Get memory reports of app description: get memory reports of app that user owns operationId: getAppMemoryReports parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: since in: path description: The since of your memory reports required: true schema: type: number responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/metrics/network-receive?since={since}: get: tags: - Reports summary: Get network-receive reports of app description: get network-receive reports of app that user owns operationId: getAppNetworkReceiveReports parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: since in: path description: The since of your network-receive reports required: true schema: type: number responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/projects/{name}/metrics/network-transmit?since={since}: get: tags: - Reports summary: Get network-transmit reports of app description: get network-transmit reports of app that user owns operationId: getNetworkTransmitReports parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: since in: path description: The since of your network-transmit reports required: true schema: type: number responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/domains: post: tags: - Domains summary: Create a domain description: create a domain that user owns operationId: createAppDomain requestBody: description: The domain of your app content: application/json: schema: required: - name - project - type type: object properties: name: type: string project: type: string type: type: string default: PROJECT required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} x-codegen-request-body-name: domain /v1/domains/set-project: post: tags: - Domains summary: Set a domain for project description: set a domain for project that user owns operationId: setAppDomain requestBody: description: The domain of your app content: application/json: schema: required: - domainID - projectID type: object properties: domainID: type: string projectID: type: string required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App or domain does not exists. content: {} x-codegen-request-body-name: domain /v1/domains/{id}/set-redirect: post: tags: - Domains summary: Redirect a domain description: redirect a domain that user owns operationId: redirectDomain parameters: - name: id in: path description: The id of your domain required: true schema: type: string requestBody: description: The domain of your app content: application/json: schema: required: - redirectStatus - redirectTo type: object properties: redirectStatus: type: number description: 302 or 301 redirectTo: type: string required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: Domain does not exists. content: {} x-codegen-request-body-name: domain /v1/domains/{id}/ssl/disable: post: tags: - Domains summary: Disable ssl description: disable ssl that user owns operationId: disableSsl parameters: - name: id in: path description: The id of your domain required: true schema: type: string responses: 204: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: Domain does not exists. content: {} /v1/domains/provision-ssl-certs: post: tags: - Domains summary: Enable ssl description: enable ssl that user owns operationId: enableSsl requestBody: description: The domain of your app content: application/json: schema: required: - domain type: object properties: domain: type: string required: true responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: Domain does not exists. content: {} x-codegen-request-body-name: domain /v1/domains/{id}: delete: tags: - Domains summary: Delete a domain description: delete a domain that user owns operationId: deleteDomain parameters: - name: id in: path description: The id of your domain required: true schema: type: string responses: 200: description: Successful operation content: {} 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: Domain does not exists. content: {} components: schemas: Create-app: type: object properties: name: type: string description: The name of app that you want to create planID: type: string description: The plan of app that you want to create platform: type: string description: The platform of app that you want to create ProjectAllDetails: type: object properties: project: type: object properties: _id: type: string description: The id of project project_id: type: string description: The name of project type: type: string description: The platform of project status: type: string description: The status of project defaultSubdomain: type: boolean description: The defaultSubdomain status of project zeroDowntime: type: boolean description: The zeroDowntime status of project scale: type: string description: The being on of project envs: type: array description: The envs of project items: type: object properties: key: type: string value: type: string encrypted: type: boolean _id: type: string planID: type: string description: The plan of project fixedIPStatus: type: string description: The fixedIPStatus of project created_at: type: string description: The time to create of project node: type: object properties: _id: type: string IP: type: string description: The node of project hourlyPrice: type: number description: The hourlyPrice of project isDeployed: type: string description: The deployment status of project reservedDiskSpace: type: number description: The count reservedDiskSpace of project Projects: type: object properties: projects: type: array items: type: object properties: _id: type: string description: The id of project project_id: type: string description: The name of project type: type: string description: The platform of project status: type: string description: The status of project scale: type: string description: The being on of project planID: type: string description: The plan of project created_at: type: string description: The time to create the project isDeployed: type: string description: The project deployment status Deploy-releases: type: object properties: sourceID: type: string description: The id of Deployed sources port: type: number description: The port of your app type: type: string description: The platform of your app Update-envs: type: object properties: project: type: string description: The name of your app for update envs variables: type: array description: The envs for update items: type: object properties: key: type: string description: The name of your env value: type: string description: The value of your env Domains: type: object properties: domains: type: array items: type: object properties: _id: type: string description: The id of domain name: type: string description: The name of domain type: type: string description: The type of domain project: type: object properties: _id: type: string description: The id of project project_id: type: string description: The name of project description: The type of domain status: type: string description: The status of domain certificatesStatus: type: string description: The certificatesStatus of domain redirectTo: type: string description: The redirectTo of domain redirectStatus: type: number description: The redirectStatus of domain created_at: type: string description: The created_at of domain CNameRecord: type: string description: The CNameRecord of domain Applets: type: object properties: applets: type: array items: type: object properties: id: type: string description: The id of applet name: type: string description: The name of applet timestamp: type: string description: The timestamp of applet state: type: string description: The state of applet reason: type: string description: The reason of applet release: type: object properties: releaseID: type: string description: The releaseID of release tag: type: string description: The tag of release description: The release of applet Releases: type: object properties: total: type: number description: The total of releases currentRelease: type: string description: The currentRelease of releases readyReleasesCount: type: number description: The total of releases releases: type: array description: The total of releases items: type: object properties: _id: type: string description: The id of release type: type: string description: The type of release imageName: type: string description: The imageName of release projectType: type: string description: The projectType of release state: type: string description: The state of release port: type: number description: The port of release gitInfo: type: object properties: {} description: The gitInfo of release client: type: string description: The client of release finishedAt: type: string description: The finishedAt of release createdAt: type: string description: The createdAt of release tag: type: string description: The tag of release sourceAvailable: type: boolean description: The sourceAvailable of release CheckDomain: type: object properties: domain: type: object properties: _id: type: string user: type: string name: type: string type: type: string project: type: object properties: current_service: type: object properties: port: type: integer name: type: string fixedNode: type: boolean _id: type: string user: type: string project_id: type: string type: type: string status: type: string readOnlyRootFilesystem: type: boolean defaultSubdomain: type: boolean zeroDowntime: type: boolean isOneClickApp: type: boolean isWPPlus: type: boolean scale: type: number envs: type: array items: type: object properties: key: type: string value: type: string encrypted: type: boolean _id: type: string planID: type: string hasVolume: type: boolean fixedIPStatus: type: string managedBySystem: type: boolean updated_at: type: string created_at: type: string __v: type: number node: type: string currentRelease: type: string lastScaleStartedAt: type: string lastScaleFinishedAt: type: string resizes: type: number status: type: string certificatesStatus: type: string redirectTo: type: string redirectStatus: type: number updated_at: type: string punycodeName: type: string verificationCode: type: string created_at: type: string __v: type: number CNameRecord: type: string securitySchemes: jwt: type: apiKey description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345". #' name: Authorization in: header