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 - `teamID`: To access services in a team 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: [] tags: - name: Apps description: Everything about your Apps - name: Deploy description: Deploy endpoints - name: Settings description: Settings of your app - name: Disks description: Disks of your app - name: Domains description: Domains of your app - name: Reports description: Reports of your app 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: application/json: schema: type: object properties: sourceID: type: string 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: application/json: schema: type: object properties: releaseID: type: string 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 properties: IP: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} 409: description: Conflict content: {} '/v1/projects/{id}/read-only/{status}': post: tags: - Settings summary: Read only description: read only that user owns operationId: readOnly 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/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: application/json: schema: type: object properties: message: type: string 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/{name}/disks/{dname}/ftp': post: tags: - Disks summary: Create ftp description: create ftp that user owns operationId: createFtp parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: dname in: path description: The name of your disk required: true schema: type: string requestBody: description: The plan of your app content: application/json: schema: required: - username - readOnly type: object properties: username: type: string readOnly: type: boolean required: true responses: 200: description: Successful operation content: application/json: schema: type: object properties: username: type: string password: type: string host: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} x-codegen-request-body-name: create ftp get: tags: - Disks summary: Get ftps description: get ftps that user owns operationId: getFtps parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: dname in: path description: The name of your disk required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: type: object properties: accesses: type: array items: type: object properties: _id: type: string disk: type: string username: type: string password: type: string readOnly: type: boolean createdAt: type: string format: date-time __v: type: integer host: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/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: application/json: schema: $ref: '#/components/schemas/Get-disks' 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: application/json: schema: $ref: '#/components/schemas/Get-disk-backup' 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/{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: application/json: schema: type: object properties: link: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/disks/{dname}/resize': post: tags: - Disks summary: Resize disk description: resize disk that user owns operationId: resizeDisk parameters: - name: name in: path description: The name of your app required: true schema: type: string - name: dname in: path description: The name of your disk required: true schema: type: string requestBody: description: The size of your disk content: application/json: schema: required: - size type: object properties: size: 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: resize disk '/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/ftp/{fname}': delete: tags: - Disks summary: Delete a ftp description: delete a ftp that user owns operationId: deleteFtp parameters: - name: fname in: path description: The name of your ftp 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/{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': 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: query description: Show logs since timestamp required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Logs' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/events': get: tags: - Apps summary: Get events of the app description: get events of the app owned by user operationId: getAppEvents parameters: - name: name in: path description: The name of the app required: true schema: type: string - name: search in: query description: Show events based on search query required: false schema: type: string - name: start in: query description: start timestamp example: 1704028315 required: false schema: type: number - name: end in: query description: end timestamp example: 1704028315 required: false schema: type: number responses: 200: description: Successful operation content: application/json: schema: required: - data type: object properties: data: type: array items: type: object properties: metaData: type: object values: type: array items: type: array items: type: string 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': 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: query description: The page of your releases required: true schema: type: number default: 1.0 - name: count in: query 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: application/json: schema: type: object properties: cpuUsage: type: array items: type: object properties: value: type: array items: oneOf: - type: number - type: string applet: type: string memoryUsage: type: array items: type: object properties: value: type: array items: oneOf: - type: number - type: string applet: type: string disksUsage: type: array items: type: object properties: size: type: string usage: type: string reportedAt: type: string name: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/metrics/cpu': 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: query description: The since of your cpu reports required: true schema: type: number responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/metrics/memory': 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: query description: The since of your memory reports required: true schema: type: number responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/metrics/network-receive': 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: query description: The since of your network-receive reports required: true schema: type: number responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} '/v1/projects/{name}/metrics/network-transmit': 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: query description: The since of your network-transmit reports required: true schema: type: number responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} 401: description: Missing authentication content: {} 404: description: App does not exists. content: {} /v1/domains: get: tags: - Domains summary: Get all domains description: get all domains that user owns operationId: getAppDomains parameters: - name: project in: query 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: {} 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: 201: description: Successful operation content: application/json: schema: type: object properties: domain: type: object properties: _id: type: string 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: application/json: schema: type: object properties: code: type: string 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 readOnlyRootFilesystem: type: boolean description: For filesystem network: type: string description: For project 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 readOnlyRootFilesystem: type: boolean description: The readOnlyRootFilesystem of project zeroDowntime: type: boolean description: The zeroDowntime status of project scale: type: number 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: boolean 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: number 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: boolean description: The project deployment status Logs: type: array items: type: object properties: type: type: string datetime: type: string message: type: string 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: branch: type: string nullable: true message: type: string nullable: true commit: type: string nullable: true committedAt: type: string format: date-time nullable: true remote: type: string nullable: true author: type: object properties: email: type: string nullable: true name: type: string nullable: true tags: type: array items: type: string 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 platform: type: string Get-disks: type: object properties: disks: type: array items: properties: _id: type: string name: type: string size: type: integer updatedAt: type: string createdAt: type: string mounts: type: array items: properties: name: type: string mountedTo: type: string Get-disk-backup: type: object properties: backups: type: array items: type: object properties: name: type: string lastModified: type: string etag: type: string size: type: number Reports: type: object properties: end: type: number result: type: array items: type: object properties: values: type: array items: type: array items: oneOf: - type: number - type: string applet: type: string CheckDomain: type: object properties: domain: type: object properties: _id: type: string user: type: string name: type: string type: type: string project: type: object properties: _id: type: string project_id: type: string 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 issuedAt: type: string securitySchemes: jwt: type: apiKey description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345". #' name: Authorization in: header