openapi: 3.0.1 info: title: Liara Iaas API Documentaion description: Manage your vms and its resources termsOfService: '#' contact: email: info@liara.ir version: 1.0.0 externalDocs: description: Find out more about Iaas url: http://liara.ir servers: - url: https://iaas-api.liara.ir security: - jwt: [] tags: - name: VMs description: Manage your VMs paths: /vm: get: tags: - VMs summary: Get all vms description: get all vms that user owns operationId: getVMs responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetVMsResponse' 401: description: Missing authentication content: {} post: tags: - VMs summary: Create a vm description: create a vm that user owns operationId: createVM requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateVMRequest" responses: 200: description: Successful operation content: application/json: schema: type: object properties: taskID: type: string 400: description: Bad request content: {} 401: description: Missing authentication content: {} 412: description: Precondition failed content: {} 429: description: Too many request content: {} 402: description: Payment required content: {} 409: description: Conflict content: {} /vm/{id}: get: tags: - VMs summary: Get vm details description: get a vm that user owns operationId: getVMDetails parameters: - name: id in: path required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetVMDetails' 401: description: Missing authentication content: {} delete: tags: - VMs summary: Delete a vm description: delete a vm that user owns operationId: deleteVM parameters: - name: id in: path required: true schema: type: string responses: 200: description: Successful operation content: application/json: schema: type: object properties: taskID: type: string 401: description: Missing authentication content: {} 404: description: VM not found content: {} components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT schemas: GetVMsResponse: type: object properties: vms: type: array description: List of vms belonging to the user items: type: object properties: _id: type: string description: Unique identifier of the vm plan: type: string description: vm plan identifier OS: type: string description: Operating system used state: type: string description: Current state of the vm enum: [CREATED,CREATING,FROZEN,DELETED,DELETING] name: type: string description: vm name createdAt: type: string description: vm creation timestamp power: type: string description: Power state of the vm enum: [POWERED_ON, POWERED_OFF ,SUSPENDED] GetVMDetails: type: object properties: _id: type: string plan: type: string OS: type: string state: type: string enum: [CREATED, RUNNING, STOPPED, DELETED] config: type: object properties: SSHKeys: type: array items: type: string rootPassword: type: string hostname: type: string name: type: string createdAt: type: string guestState: type: string power: type: string enum: [POWERED_ON, POWERED_OFF] IPs: type: array items: type: object properties: address: type: string version: type: string planDetails: type: object properties: available: type: boolean region: type: string monthlyPrice: type: number hourlyPrice: type: number volume: type: number RAM: type: object properties: amount: type: number CPU: type: object properties: amount: type: number IPv4MonthlyPrice: type: array items: type: number IPv4HourlyPrice: type: array items: type: number CreateVMRequest: type: object properties: name: type: string description: Lowercase vm name OS: type: string enum: [ubuntu-24.04, ubuntu-22.04, debian-12.9] description: The os name plan: type: string enum: [standard-base-g2,standard-plus-g2,pro-g2,pro-plus-g2,express-g2,express-plus-g2] description: The plan of app that you want to create config: description: The config of vm that you want to create type: object properties: SSHKeys: type: array items: type: string