openapi: 3.2.0 info: title: Canonical Instances API version: '1.0' description: 'Operations tagged instances across 2 of this provider''s published API definitions: canonical-anbox-cloud-ams-api-openapi.json, canonical-lxd-rest-api-openapi.yml. Each path carries the servers of the definition it was published in.' tags: - name: Instances paths: /1.0/instances: get: description: This endpoint returns a list of instance API endpoints. tags: - Instances summary: Get a list of instances operationId: instances_get parameters: - description: Maximum number of instances to provide name: limit in: query schema: type: integer - description: Offset at which to start with listing instances name: offset in: query schema: type: integer - description: Expand the returned resource definition name: recursion in: query schema: type: integer enum: - 0 - 1 default: 0 - example: cilsreunfpfec9b1ktg0 description: Filter instances by id. This is an exact match for the string. name: id in: query schema: type: string - example: ams-cilsreunfpfec9b1ktg0 description: Filter instances by name. This is an exact match for the string. name: name in: query schema: type: string - example: true description: Filter base instances. The instances which are not base, are regular instances. name: base in: query schema: type: boolean - description: Filter instances by type. name: type in: query schema: type: string enum: - vm - container - description: Filter instances by status. name: status in: query schema: type: string enum: - created - prepared - stopped - running - error - deleted - example: lxd0 description: Filter instances by the LXD node name. name: node in: query schema: type: string - example: cilsiomnfpfec9b1kteg description: Filter instances by the application ID. This is an exact match for the string. name: app_id in: query schema: type: string - example: my-app description: Filter instances by the application name. This is an exact match for the string. name: app_name in: query schema: type: string - example: 0 description: Filter instances by the application version. name: app_version in: query schema: type: integer - example: cilshrmnfpfec9b1kte0 description: Filter instances by the image ID. This is an exact match for the string. name: image_id in: query schema: type: string - example: 0 description: Filter instances by the image version. name: image_version in: query schema: type: integer - example: created_by=anbox,foo,bar description: Filter instances by tags. name: tags in: query schema: type: string responses: '200': description: API endpoints content: application/json: schema: type: object allOf: - $ref: '#/components/schemas/NoMetaSyncResponse' properties: metadata: description: List of endpoints type: array items: type: string example: "[\n \"/1.0/instances/foo\",\n \"/1.0/instances/bar\"\n]" '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' post: description: 'This endpoint creates a new instance instance with the provided specification. If AMS cannot fullfil the resource requirements for creating the instance, the request will fail.' tags: - Instances summary: Create a new instance operationId: instances_post responses: '202': description: Success response of the service content: application/json: schema: $ref: '#/components/schemas/OperationResponse' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancesPost' description: Specification of the instance to create delete: description: 'This endpoint deletes all specified instances. If the deletion of a single instance fails, the operation is aborted and an error is returned.' tags: - Instances summary: Delete multiple instances operationId: instances_delete responses: '202': description: Success response of the service content: application/json: schema: $ref: '#/components/schemas/OperationResponse' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancesDelete' description: List of instances to delete put: description: Changes the running state of all instances. operationId: instances_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Bulk instance state update tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancesPut' description: State /1.0/instances/{id_or_name}: get: description: This endpoint returns information about a specific instance instance. tags: - Instances summary: Get information about a specific instance instance operationId: instance_get parameters: - name: id_or_name in: path required: true schema: type: string responses: '200': description: Instance instance details content: application/json: schema: type: object allOf: - $ref: '#/components/schemas/NoMetaSyncResponse' properties: metadata: $ref: '#/components/schemas/Instance' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' delete: description: 'This endpoint deletes a specific instance. The deletion process happens asynchronously. The operation progress can be checked via the returned operation object.' tags: - Instances summary: Delete a specific instance operationId: instance_delete parameters: - name: id_or_name in: path required: true schema: type: string responses: '202': description: Success response of the service content: application/json: schema: $ref: '#/components/schemas/OperationResponse' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceDelete' description: Additional details for the delete operation. patch: description: This endpoint allows changing the state of a specific instance instance. tags: - Instances summary: Update the state of a specific instance instance operationId: instance_patch parameters: - name: id_or_name in: path required: true schema: type: string responses: '202': description: Success response of the service content: application/json: schema: $ref: '#/components/schemas/OperationResponse' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancePatch' /1.0/instances/{id_or_name}/exec: post: description: 'This endpoint is used to run a command in the instance. The endpoint returns an operation which will contain either 2 or 4 websockets. In non-interactive mode, you''ll get one websocket for each of stdin, stdout and stderr. In interactive mode, a single bi-directional websocket is used for stdin and stdout/stderr. An additional "control" socket is always added on top which can be used for out of band communication with LXD. This allows sending signals and window sizing information through.' tags: - Instances summary: Execute a command in a instance operationId: instance_exec_post parameters: - name: id_or_name in: path required: true schema: type: string responses: '202': description: Success response of the service content: application/json: schema: $ref: '#/components/schemas/OperationResponse' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceExecPost' description: Exec request /1.0/instances/{id_or_name}/logs: get: description: 'This endpoint returns a instance''s collected log files. If a instance has been set to status "error" AMS will automatically collect, logs for further inspection.' tags: - Instances summary: Get a list of collected log files for the instance operationId: instance_logs_get parameters: - name: id_or_name in: path required: true schema: type: string responses: '200': description: Collected log files content: application/json: schema: type: object allOf: - $ref: '#/components/schemas/NoMetaSyncResponse' properties: metadata: description: List of collected logs type: array items: type: string example: "[\n \"/1.0/instances/cilsiomnfpfec9b1kteg/logs/android.log\",\n \"/1.0/instances/cilsiomnfpfec9b1kteg/logs/system.log\"\n]" '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' /1.0/instances/{id_or_name}/logs/{name}: get: description: This endpoint returns the collected log file as a raw file. tags: - Instances summary: Retrieve a specific log file stored for the instance operationId: instance_logs_specific_get parameters: - name: id_or_name in: path required: true schema: type: string - description: Name of the log to retrieve name: name in: path required: true schema: type: string responses: '200': description: Raw file '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' /1.0/instances?recursion=1: get: description: This endpoint returns a list of instances. tags: - Instances summary: Get a list of instances operationId: instances_get_recursion1 parameters: - description: Maximum number of instances to provide name: limit in: query schema: type: integer - description: Offset at which to start with listing instances name: offset in: query schema: type: integer - description: Expand the returned resource definition name: recursion in: query schema: type: integer enum: - 0 - 1 default: 0 - example: cilsreunfpfec9b1ktg0 description: Filter instances by id. This is an exact match for the string. name: id in: query schema: type: string - example: ams-cilsreunfpfec9b1ktg0 description: Filter instances by name. This is an exact match for the string. name: name in: query schema: type: string - example: true description: Filter base instances. The instances which are not base, are regular instances. name: base in: query schema: type: boolean - description: Filter instances by type. name: type in: query schema: type: string enum: - vm - container - description: Filter instances by status. name: status in: query schema: type: string enum: - created - prepared - stopped - running - error - deleted - example: lxd0 description: Filter instances by the LXD node name. name: node in: query schema: type: string - example: cilsiomnfpfec9b1kteg description: Filter instances by the application ID. This is an exact match for the string. name: app_id in: query schema: type: string - example: my-app description: Filter instances by the application name. This is an exact match for the string. name: app_name in: query schema: type: string - example: 0 description: Filter instances by the application version. name: app_version in: query schema: type: integer - example: cilshrmnfpfec9b1kte0 description: Filter instances by the image ID. This is an exact match for the string. name: image_id in: query schema: type: string - example: 0 description: Filter instances by the image version. name: image_version in: query schema: type: integer - example: created_by=anbox,foo,bar description: Filter instances by tags. name: tags in: query schema: type: string responses: '200': description: API endpoints content: application/json: schema: type: object allOf: - $ref: '#/components/schemas/NoMetaSyncResponse' properties: metadata: description: List of instances type: array items: $ref: '#/components/schemas/Instance' '400': $ref: '#/components/responses/ErrorBadRequest' '404': $ref: '#/components/responses/ErrorNotFound' '500': $ref: '#/components/responses/InternalServerError' /1.0/instances/{name}: delete: description: 'Deletes a specific instance. This also deletes anything owned by the instance such as snapshots and backups.' operationId: delete10InstancesByName parameters: - description: Project name example: default in: query name: project schema: type: string - description: Force delete of running instances in: query name: force schema: type: boolean responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete an instance tags: - Instances x-operation-id-source: normalized x-operation-id-original: instance_delete get: description: Gets a specific instance (basic struct). operationId: get10InstancesByName parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Instance content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/Instance_2' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instance tags: - Instances x-operation-id-source: normalized x-operation-id-original: instance_get patch: description: Updates a subset of the instance configuration operationId: patch10InstancesByName parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Partially update the instance tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancePut' description: Update request x-operation-id-source: normalized x-operation-id-original: instance_patch post: description: 'Renames, moves an instance between pools or migrates an instance to another server. The returned operation metadata will vary based on what''s requested. For rename or move within the same server, this is a simple background operation with progress data. For migration, in the push case, this will similarly be a background operation with progress data, for the pull case, it will be a websocket operation with a number of secrets to be passed to the target server.' operationId: instance_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Rename or move/migrate an instance tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancePost' description: Migration request put: description: Updates the instance configuration or trigger a snapshot restore. operationId: instance_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Update the instance tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstancePut' description: Update request /1.0/instances/{name}/backups: get: description: Returns a list of instance backups (URLs). operationId: instance_backups_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of endpoints example: "[\n \"/1.0/instances/foo/backups/backup0\",\n \"/1.0/instances/foo/backups/backup1\"\n]" items: type: string type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the backups tags: - Instances post: description: Creates a new backup. operationId: instance_backups_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Create a backup tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceBackupsPost' description: Backup request /1.0/instances/{name}/backups/{backup}: delete: description: Deletes the instance backup. operationId: instance_backup_delete parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete a backup tags: - Instances get: description: Gets a specific instance backup. operationId: instance_backup_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Instance backup content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/InstanceBackup' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the backup tags: - Instances post: description: Renames an instance backup. operationId: instance_backup_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Rename a backup tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceBackupPost' description: Backup rename /1.0/instances/{name}/backups/{backup}/export: get: description: Download the raw backup file(s) from the server. operationId: instance_backup_export parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw image data '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the raw backup file(s) tags: - Instances /1.0/instances/{name}/backups?recursion=1: get: description: Returns a list of instance backups (structs). operationId: instance_backups_get_recursion1 parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of instance backups items: $ref: '#/components/schemas/InstanceBackup' type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the backups tags: - Instances /1.0/instances/{name}/console: delete: description: Clears the console log buffer. operationId: instance_console_delete parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Clear the console log tags: - Instances get: description: Gets the console log for the instance. operationId: instance_console_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw console log '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get console log tags: - Instances post: description: 'Connects to the console of an instance. The returned operation metadata will contain two websockets, one for data and one for control.' operationId: instance_console_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Connect to console tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceConsolePost' description: Console request /1.0/instances/{name}/exec: post: description: 'Executes a command inside an instance. The returned operation metadata will contain either 2 or 4 websockets. In non-interactive mode, you''ll get one websocket for each of stdin, stdout and stderr. In interactive mode, a single bi-directional websocket is used for stdin and stdout/stderr. An additional "control" socket is always added on top which can be used for out of band communication with LXD. This allows sending signals and window sizing information through.' operationId: post10InstancesByNameExec parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Run a command tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceExecPost_2' description: Exec request x-operation-id-source: normalized x-operation-id-original: instance_exec_post /1.0/instances/{name}/files: delete: description: Removes the file. operationId: instance_files_delete parameters: - description: Path to the file example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete a file tags: - Instances get: description: Gets the file content. If it's a directory, a json list of files will be returned instead. operationId: instance_files_get parameters: - description: Path to the file example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw file or directory listing headers: X-LXD-gid: description: File owner GID X-LXD-mode: description: Mode mask X-LXD-modified: description: Last modified date X-LXD-type: description: Type of file (file, symlink or directory) X-LXD-uid: description: File owner UID '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get a file tags: - Instances head: description: Gets the file or directory metadata. operationId: instance_files_head parameters: - description: Path to the file example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw file or directory listing headers: X-LXD-gid: description: File owner GID X-LXD-mode: description: Mode mask X-LXD-modified: description: Last modified date X-LXD-type: description: Type of file (file, symlink or directory) X-LXD-uid: description: File owner UID '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get metadata for a file tags: - Instances post: description: Creates a new file in the instance. operationId: instance_files_post parameters: - description: Path to the file example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string - description: Base 10 32-bit integer for the file owner UID example: 1000 in: header name: X-LXD-uid schema: type: integer - description: Base 10 32-bit integer for the file owner GID example: 1000 in: header name: X-LXD-gid schema: type: integer - description: Base 10 (no leading `0`) or base 8 (leading `0`) unix permissions bits (other bits are truncated) example: 420 in: header name: X-LXD-mode schema: type: integer - description: Comma-separated list of permissions to set for pre-existing files (0 or more of `uid`, `gid`, `mode`) example: uid,gid,mode in: header name: X-LXD-modify-perm schema: type: integer - description: Type of file (file, symlink or directory) example: file in: header name: X-LXD-type schema: type: string - description: Write mode (overwrite or append) example: overwrite in: header name: X-LXD-write schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Create or replace a file tags: - Instances requestBody: content: application/octet-stream: schema: {} description: Raw file content /1.0/instances/{name}/logs: get: description: Returns a list of log files (URLs). operationId: get10InstancesByNameLogs parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of endpoints example: "[\n \"/1.0/instances/foo/logs/lxc.conf\",\n \"/1.0/instances/foo/logs/lxc.log\"\n]" items: type: string type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the log files tags: - Instances x-operation-id-source: normalized x-operation-id-original: instance_logs_get /1.0/instances/{name}/logs/{filename}: get: description: Gets the log file. operationId: instance_log_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw file '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the log file tags: - Instances /1.0/instances/{name}/logs/exec-output: get: description: Returns a list of exec record-output files (URLs). operationId: instance_exec-output_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of endpoints example: "[\n \"/1.0/instances/foo/logs/exec-output/exec_d0a89537-0617-4ed6-a79b-c2e88a970965.stdout\",\n \"/1.0/instances/foo/logs/exec-output/exec_d0a89537-0617-4ed6-a79b-c2e88a970965.stderr\",\n]" items: type: string type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the exec record-output files tags: - Instances /1.0/instances/{name}/logs/exec-output/{filename}: delete: description: Removes the exec record-output file. operationId: instance_exec-output_delete parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete the exec record-output file tags: - Instances get: description: Gets the exec-output file. operationId: get10InstancesByNameLogsExecOutputByFilename parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Raw file '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the exec-output log file tags: - Instances x-operation-id-source: normalized x-operation-id-original: instance_exec-output_get /1.0/instances/{name}/metadata: get: description: Gets the image metadata for the instance. operationId: instance_metadata_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Image metadata content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/ImageMetadata' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instance image metadata tags: - Instances patch: description: Updates a subset of the instance image metadata. operationId: instance_metadata_patch parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '412': $ref: '#/components/responses/PreconditionFailed' '500': $ref: '#/components/responses/InternalServerError_2' summary: Partially update the image metadata tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/ImageMetadata' description: Image metadata required: true put: description: Updates the instance image metadata. operationId: instance_metadata_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '412': $ref: '#/components/responses/PreconditionFailed' '500': $ref: '#/components/responses/InternalServerError_2' summary: Update the image metadata tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/ImageMetadata' description: Image metadata required: true /1.0/instances/{name}/metadata/templates: delete: description: Removes the template file. operationId: instance_metadata_templates_delete parameters: - description: Template name example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete a template file tags: - Instances get: description: 'If no path specified, returns a list of template file names. If a path is specified, returns the file content.' operationId: instance_metadata_templates_get parameters: - description: Project name example: default in: query name: project schema: type: string - description: Template name example: hostname.tpl in: query name: path schema: type: string responses: '200': description: Raw template file or file listing '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the template file names or a specific tags: - Instances post: description: Creates a new image template file for the instance. operationId: instance_metadata_templates_post parameters: - description: Template name example: default in: query name: path schema: type: string - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Create or replace a template file tags: - Instances requestBody: content: application/octet-stream: schema: {} description: Raw file content /1.0/instances/{name}/rebuild: post: description: Rebuild an instance using an alternate image or as empty. operationId: instance_rebuild_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Rebuild an instance tags: - Instances requestBody: content: application/octet-stream: schema: $ref: '#/components/schemas/InstanceRebuildPost' description: InstanceRebuild request required: true /1.0/instances/{name}/sftp: get: description: Upgrades the request to an SFTP connection of the instance's filesystem. operationId: instance_sftp responses: '101': description: Switching protocols to SFTP '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instance SFTP connection tags: - Instances /1.0/instances/{name}/snapshots: get: description: Returns a list of instance snapshots (URLs). operationId: instance_snapshots_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of endpoints example: "[\n \"/1.0/instances/foo/snapshots/snap0\",\n \"/1.0/instances/foo/snapshots/snap1\"\n]" items: type: string type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the snapshots tags: - Instances post: description: Creates a new snapshot. operationId: instance_snapshots_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Create a snapshot tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceSnapshotsPost' description: Snapshot request /1.0/instances/{name}/snapshots/{snapshot}: delete: description: Deletes the instance snapshot. operationId: instance_snapshot_delete parameters: - description: Project name example: default in: query name: project schema: type: string - description: Which disk volumes to include in instance snapshot deletion. Possible values are "root" or "all-exclusive". example: all-exclusive in: query name: disk-volumes schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Delete a snapshot tags: - Instances get: description: Gets a specific instance snapshot. operationId: instance_snapshot_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Instance snapshot content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/InstanceSnapshot' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the snapshot tags: - Instances patch: description: Updates a subset of the snapshot config. operationId: instance_snapshot_patch parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Partially update snapshot tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceSnapshotPut' description: Snapshot update post: description: 'Renames or migrates an instance snapshot to another server. The returned operation metadata will vary based on what''s requested. For rename or move within the same server, this is a simple background operation with progress data. For migration, in the push case, this will similarly be a background operation with progress data, for the pull case, it will be a websocket operation with a number of secrets to be passed to the target server.' operationId: instance_snapshot_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Rename or move/migrate a snapshot tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceSnapshotPost' description: Snapshot migration put: description: Updates the snapshot config. operationId: instance_snapshot_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Update snapshot tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceSnapshotPut' description: Snapshot update /1.0/instances/{name}/snapshots?recursion=1: get: description: Returns a list of instance snapshots (structs). operationId: instance_snapshots_get_recursion1 parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of instance snapshots items: $ref: '#/components/schemas/InstanceSnapshot' type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the snapshots tags: - Instances /1.0/instances/{name}/state: get: description: 'Gets the runtime state of the instance. This is a reasonably expensive call as it causes code to be run inside of the instance to retrieve the resource usage and network information.' operationId: instance_state_get parameters: - description: Project name in: query name: project schema: type: string responses: '200': description: State content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/InstanceState' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the runtime state tags: - Instances put: description: Changes the running state of the instance. operationId: instance_state_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '202': $ref: '#/components/responses/Operation' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Change the state tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceStatePut' description: State /1.0/instances/{name}/uefi-vars: get: description: Gets the UEFI variables for a specific VM. operationId: instance_uefi_vars_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: Instance UEFI variables content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/InstanceUEFIVars' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instance's UEFI variables tags: - Instances put: description: Sets the UEFI variables for a specific VM. operationId: instance_uefi_vars_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError_2' summary: Set the instance's UEFI variables tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceUEFIVars' description: UEFI variables update request /1.0/instances/{name}?recursion=1: get: description: 'Gets a specific instance (full struct). recursion=1 also includes information about state, snapshots and backups. Selective recursion is supported using semicolon-separated syntax in the recursion parameter: recursion=2;fields=state.disk,state.network to fetch only specific state fields. Valid fields are: state.disk, state.network. Use recursion=2;fields= to fetch instance data without any expensive state fields.' operationId: instance_get_recursion1 parameters: - description: Project name example: default in: query name: project schema: type: string - description: Recursion level (0, 1, 2) or selective recursion (2;fields=state.disk,state.network) example: 2;fields=state.disk in: query name: recursion schema: type: string responses: '200': description: Instance content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/Instance_2' status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instance tags: - Instances /1.0/instances?recursion=2: get: description: 'Returns a list of instances (full structs). The main difference between recursion=1 and recursion=2 is that the latter also includes state and snapshot information allowing for a single API call to return everything needed by most clients.' operationId: instances_get_recursion2 parameters: - description: Project name example: default in: query name: project schema: type: string - description: Collection filter example: default in: query name: filter schema: type: string - description: Retrieve instances from all projects in: query name: all-projects schema: type: boolean - description: Recursion level (0, 1, 2) example: 2 in: query name: recursion schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of instances items: $ref: '#/components/schemas/InstanceFull' type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError_2' summary: Get the instances tags: - Instances components: schemas: NetworkProtocol: description: NetworkProtocol describes a specific network protocol like TCP or UDP a ContainerService can use type: string InstanceType: description: InstanceType describes the type of an instance (container, vm) type: string InstanceExecPost: description: InstanceExecPost represents an instance execution request type: object properties: command: description: Command inside the instance to execute type: array items: type: string example: /bin/ls environment: description: Environment to setup when the command is executed. type: object additionalProperties: type: string example: FOO: bar height: description: Height of the terminal. Only required when `interactive` is set to `true`. type: integer format: int64 interactive: description: Whether the command is executed interactively or not type: boolean width: description: Width of the terminal. Only required when `interactive` is set to `true`. type: integer format: int64 InstancePatch: description: InstancePatch describes the fields which can be changed for an existing instance type: object properties: desired_status: description: Desired status of the instance type: string InstancesPost: description: 'InstancesPost represents the fields required to launch a new instance for a specific application' type: object properties: addons: description: Addons to enable for the instance type: array items: type: string example: - addon0 - addon1 app_id: description: ID of the application to use. Can be empty if an image ID is specified instead type: string example: cilsiomnfpfec9b1kteg app_version: description: Version of the application to use. If not specified, the latest version is used. type: integer format: int64 example: 0 config: type: object properties: boot_activity: description: BootActivity specifies the Android activity which is started by default type: string example: com.android.settings/.DevSettings boot_package: description: BootPackage specifies the Android application package name which is started by default type: string example: com.android.settings devmode: description: DevMode specifies if development mode has been turned on for the instance type: boolean disable_watchdog: description: DisableWatchdog defines whether the watchdog is disabled type: boolean display: description: Display specifies the configuration of the virutal display of the instance type: object properties: density: description: Density is the piel density of the virtual display type: integer format: int64 fps: description: FPS is the frame rate of the virtual display type: integer format: int64 height: description: Height is the height of the virtual display type: integer format: int64 width: description: Width is the width of the virtual display type: integer format: int64 enable_streaming: description: EnableStreaming specifies if streaming should be enabled for the instance or not type: boolean features: description: Feature flags to enable for the instance. type: string example: feature0, feature1 metrics_server: description: MetricsServer specifies a metrics server the instance will use type: string example: 10.0.0.45:8086 platform: description: Platform specifies the Anbox platform the instance is running with type: string example: webrtc image_id: description: ID of the image to use. Can be empty if an application ID is specified instead. type: string example: cilshrmnfpfec9b1kte0 image_version: description: Version of the image to use. If not specified, the latest version is used. type: integer format: int64 example: 0 name: description: 'Name of the instance. Will be automatically assigned if not specified. Names must be unique.' type: string no_start: description: Do not start the instance after creation. type: boolean node: description: Node to start the instance on. If empty node will be automatically selected. type: string example: lxd0 resources: description: Resources specifies the resources allocated for the instance type: object properties: cpus: description: Number of CPU cores the instance should get assigned. type: integer format: int64 example: 4 disk_size: description: Disk size the instance should get allocated in bytes type: integer format: int64 example: 3221225472 gpu-slots: description: Number of GPU slots the instance should get assigned. type: integer format: int64 example: 1 memory: description: Memory the instance should get assigned in bytes. type: integer format: int64 example: 3221225472 vpu-slots: description: Number of VPU slots the instance should get assigned type: integer format: int64 example: 1 services: description: Services to enable for the instance type: array items: $ref: '#/components/schemas/NetworkServiceSpec' tags: description: Tags which will be assigned to the instance type: array items: type: string example: - tag0 - tag1 type: $ref: '#/components/schemas/InstanceType' user_data: description: User data to pass to the instance. type: string example: '{\"key\":\"value\"}' StatusCode: description: StatusCode represents a valid REST operation type: integer format: int64 NoMetaSyncResponse: description: Swagger Synchronous response without metadata field type: object properties: error_code: description: Error code for the operation type: integer format: int64 example: 0 status: description: Status of requested operation type: string example: Success status_code: description: Status code of the request type: integer format: int64 example: 200 type: description: Type of operation response type: string example: sync OperationResponse: description: Operation type: object properties: metadata: $ref: '#/components/schemas/Operation' operation: type: string example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1 status: type: string example: Operation created status_code: type: integer format: int64 example: 100 type: type: string example: async Instance: description: Instance represents a single instance type: object properties: address: description: Address is the IP address of the instance type: string example: 192.168.1.74 app_id: description: 'AppID is the ID of the application the instance is created from. Empty if the instance has not been created from an application.' type: string example: cilsiomnfpfec9b1kteg app_name: description: 'AppName is the name of the application the instance is created from. Empty if the instance has not been created from an application.' type: string example: myapp app_version: description: 'AppVersion is the version of the application the instance is created from. Empty if the instance has not been created from an application.' type: integer format: int64 example: 0 architecture: description: Architecture describes the CPU archtitecture the instance is using type: string example: aarch64 base: description: If this is a base instance or not type: boolean config: description: Config summarizes the configuration the instance uses type: object properties: boot_activity: description: BootActivity specifies the Android activity which is started by default type: string example: com.android.settings/.DevSettings boot_package: description: BootPackage specifies the Android application package name which is started by default type: string example: com.android.settings devmode: description: DevMode specifies if development mode has been turned on for the instance type: boolean disable_watchdog: description: DisableWatchdog defines whether the watchdog is disabled type: boolean display: type: object properties: density: description: Density is the piel density of the virtual display type: integer format: int64 fps: description: FPS is the frame rate of the virtual display type: integer format: int64 height: description: Height is the height of the virtual display type: integer format: int64 width: description: Width is the width of the virtual display type: integer format: int64 enable_streaming: description: EnableStreaming specifies if streaming should be enabled for the instance or not type: boolean metrics_server: description: MetricsServer specifies a metrics server the instance will use type: string example: 10.0.0.45:8086 platform: description: Platform specifies the Anbox platform the instance is running with type: string example: webrtc created_at: description: CreatedAt specifies the time at which the instance was created type: integer format: int64 example: 1689604498 error_message: description: ErrorMessage provides an error message when the instance status is set to error. type: string example: instance failed to boot id: description: ID of the instance type: string example: cilsreunfpfec9b1ktg0 image_id: description: 'ImageID is the ID of the image the instance is created from. Empty if the instance has not been created from an image.' type: string example: cilshrmnfpfec9b1kte0 image_version: description: 'ImageVersion is the version of the image the instance is created from. Empty if the instance has not been created from an image.' type: integer format: int64 example: 0 name: description: Name of the instance. Typically in the format "ams-". type: string example: ams-cilsreunfpfec9b1ktg0 node: description: Node the instance is running on type: string example: lxd0 public_address: description: 'PublicAddress is the external IP address the instance is accessible on (in most cases the IP of the node it is running on)' type: string example: 1.2.3.4 resources: $ref: '#/components/schemas/InstanceResources' services: description: Services the instance exposes type: array items: $ref: '#/components/schemas/InstanceService' status: description: Status of the instance type: string example: running status_code: $ref: '#/components/schemas/InstanceStatus' status_message: description: StatusMessage describes the current status of the instance type: string example: '"Waiting for image download"' stored_logs: description: StoredLogs lists log files AMS stores for the instance. type: array items: type: string example: - android.log - system.log tags: description: Tags specifies the tags the instance has assigned type: array items: type: string example: - foo - bar type: $ref: '#/components/schemas/InstanceType' InstancesDelete: description: InstancesDelete represents a list of instances to delete together type: object properties: force: description: Whether deletion of the instances should be forced type: boolean ids: description: IDs of the instances to delete type: array items: type: string example: - cilsreunfpfec9b1ktg0 - cilsreunfpfec9b1ktg1 InstanceDelete: description: InstanceDelete describes a request used to delete a instance type: object properties: force: description: Whether deletion of the instance should be forced type: boolean Operation: description: Operation represents a background operation type: object properties: class: description: Class of the operation type: string enum: - task - websocket - token example: task created_at: description: When the operation was created type: string format: date-time description: description: Human readable description of the operation type: string example: updating addon 3apqo5te err: description: The error string if the operation failed type: string id: description: UUID of the operation type: string example: c6832c58-0867-467e-b245-2962d6527876 may_cancel: description: Whether this operation can be canceled (DELETE over REST) type: boolean example: false metadata: description: Metadata related to the operation and affected resources type: object additionalProperties: {} example: {} resources: description: 'Dictionnary of resource types (containers, snapshots, images) and affected resources' type: object additionalProperties: type: array items: type: string example: applications: - /1.0/applications/my-app server_address: description: The address of the server where the operation ran type: string format: ipv4 status: description: String version of the operation status type: string example: Running status_code: $ref: '#/components/schemas/StatusCode' updated_at: description: When the operation was updated type: string format: date-time InstanceStatus: description: InstanceStatus represents the status a instance can be in type: integer format: int64 InstanceService: description: 'While NetworkServiceSpec defines what the user requests, InstanceService is what is actually opened on the instance.' type: object title: InstanceService describes a single service the instance exposes to the outside world. properties: expose: description: 'Expose defines wether the service is exposed on the public endpoint of the node or if it is only available on the private endpoint. To expose the service set to true and to false otherwise.' type: boolean name: description: 'Name gives the instance a hint what the exposed port is being used for. This allows further tweaks inside the instance to expose the service correctly.' type: string example: myservice node_port: description: 'NodePort is the port used on the LXD node to map to the service port If left empty the node port is automatically selected.' type: integer format: int64 example: 4000 node_port_end: description: 'NodePortEnd, if specified, denotes the end of the port range on the node starting at NodePort' type: integer format: int64 example: 4010 port: description: Port is the port the instance provides a service on type: integer format: int64 example: 3000 port_end: description: PortEnd, if specified, denotes the end of the port range starting at Port type: integer format: int64 example: 3010 protocols: description: List of network protocols (tcp, udp) the port should be exposed for type: array items: $ref: '#/components/schemas/NetworkProtocol' example: - tcp - udp InstanceResources: description: InstanceResources represents resources assigned to an instance type: object properties: cpus: description: CPUs cores assigned to the instance type: integer format: int64 example: 2 disk-size: description: DiskSize specifies the amount of storage assigned to the instance in bytes type: integer format: int64 example: 3221225472 gpu-slots: description: GPUSlots specifies the number of GPU slots the instance got allocated type: integer format: int64 example: 1 memory: description: Memory assigned to the instance in bytes type: integer format: int64 example: 3221225472 vpu-slots: description: VPUSlots specifies the number of VPU slots the instance type: integer format: int64 NetworkServiceSpec: description: NetworkServiceSpec is used to define the user defined network services that should be opened on a container type: object properties: expose: description: 'Expose defines wether the service is exposed on the public endpoint of the node or if it is only available on the private endpoint. To expose the service set to true and to false otherwise.' type: boolean name: description: 'Name gives the container a hint what the exposed port is being used for. This allows further tweaks inside the container to expose the service correctly. Exampe: ssh' type: string port: description: Port is the port the container provides a service on type: integer format: int64 example: 3000 port_end: description: 'PortEnd is the end of the port range set for a service. If empty, only a single port is opened' type: integer format: int64 example: 3010 protocols: description: List of network protocols (tcp, udp) the port should be exposed for type: array items: $ref: '#/components/schemas/NetworkProtocol' example: - tcp - udp InstanceStateNetworkCounters: description: 'InstanceStateNetworkCounters represents packet counters as part of the network section of a LXD instance''s state.' properties: bytes_received: description: Number of bytes received example: 192021 format: uint64 type: integer x-go-name: BytesReceived bytes_sent: description: Number of bytes sent example: 10888579 format: uint64 type: integer x-go-name: BytesSent errors_received: description: Number of errors received example: 14 format: uint64 type: integer x-go-name: ErrorsReceived errors_sent: description: Number of errors sent example: 41 format: uint64 type: integer x-go-name: ErrorsSent packets_dropped_inbound: description: Number of inbound packets dropped example: 179 format: uint64 type: integer x-go-name: PacketsDroppedInbound packets_dropped_outbound: description: Number of outbound packets dropped example: 541 format: uint64 type: integer x-go-name: PacketsDroppedOutbound packets_received: description: Number of packets received example: 1748 format: uint64 type: integer x-go-name: PacketsReceived packets_sent: description: Number of packets sent example: 964 format: uint64 type: integer x-go-name: PacketsSent type: object x-go-package: github.com/canonical/lxd/shared/api InstanceStateCPU: properties: usage: description: CPU usage in nanoseconds example: 3637691016 format: int64 type: integer x-go-name: Usage title: InstanceStateCPU represents the cpu information section of a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceSnapshotPost: properties: live: description: Whether to perform a live migration (requires migration) example: false type: boolean x-go-name: Live migration: description: Whether this is a migration request example: false type: boolean x-go-name: Migration name: description: New name for the snapshot example: foo type: string x-go-name: Name target: $ref: '#/components/schemas/InstancePostTarget' title: InstanceSnapshotPost represents the fields required to rename/move a LXD instance snapshot. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceExecPost_2: properties: command: description: Command and its arguments example: - bash items: type: string type: array x-go-name: Command cwd: description: Current working directory for the command example: /home/foo/ type: string x-go-name: Cwd environment: additionalProperties: type: string description: Additional environment to pass to the command example: FOO: BAR type: object x-go-name: Environment group: description: GID of the user to spawn the command as example: 1000 format: uint32 type: integer x-go-name: Group height: description: Terminal height in rows (for interactive) example: 24 format: int64 type: integer x-go-name: Height interactive: description: Whether the command is to be spawned in interactive mode (singled PTY instead of 3 PIPEs) example: true type: boolean x-go-name: Interactive record-output: description: Whether to capture the output for later download (requires non-interactive) type: boolean x-go-name: RecordOutput user: description: UID of the user to spawn the command as example: 1000 format: uint32 type: integer x-go-name: User wait-for-websocket: description: Whether to wait for all websockets to be connected before spawning the command example: true type: boolean x-go-name: WaitForWS width: description: Terminal width in characters (for interactive) example: 80 format: int64 type: integer x-go-name: Width title: InstanceExecPost represents a LXD instance exec request. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceStateNetwork: properties: addresses: description: List of IP addresses items: $ref: '#/components/schemas/InstanceStateNetworkAddress' type: array x-go-name: Addresses counters: $ref: '#/components/schemas/InstanceStateNetworkCounters' host_name: description: Name of the interface on the host example: vethbbcd39c7 type: string x-go-name: HostName hwaddr: description: MAC address example: 00:16:3e:0c:ee:dd type: string x-go-name: Hwaddr mtu: description: MTU (maximum transmit unit) for the interface example: 1500 format: int64 type: integer x-go-name: Mtu state: description: Administrative state of the interface (up/down) example: up type: string x-go-name: State type: description: Type of interface (broadcast, loopback, point-to-point, ...) example: broadcast type: string x-go-name: Type title: InstanceStateNetwork represents the network information section of a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api StatusCode_2: format: int64 title: StatusCode represents a valid LXD operation and container status. type: integer x-go-package: github.com/canonical/lxd/shared/api InstanceFull: properties: access_entitlements: description: AccessEntitlements represents the entitlements that are granted to the requesting user on the attached entity. example: - can_view - can_edit items: type: string type: array x-go-name: AccessEntitlements architecture: description: Architecture name example: x86_64 type: string x-go-name: Architecture backups: description: List of backups. items: $ref: '#/components/schemas/InstanceBackup' type: array x-go-name: Backups config: additionalProperties: type: string description: Instance configuration (see doc/instances.md) example: security.nesting: 'true' type: object x-go-name: Config created_at: description: Instance creation timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: CreatedAt description: description: Instance description example: My test instance type: string x-go-name: Description devices: additionalProperties: additionalProperties: type: string type: object description: Instance devices (see doc/instances.md) example: root: path: / pool: default type: disk type: object x-go-name: Devices ephemeral: description: Whether the instance is ephemeral (deleted on shutdown) example: false type: boolean x-go-name: Ephemeral expanded_config: additionalProperties: type: string description: Expanded configuration (all profiles and local config merged) example: security.nesting: 'true' type: object x-go-name: ExpandedConfig expanded_devices: additionalProperties: additionalProperties: type: string type: object description: Expanded devices (all profiles and local devices merged) example: root: path: / pool: default type: disk type: object x-go-name: ExpandedDevices last_used_at: description: Last start timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: LastUsedAt location: description: What cluster member this instance is located on example: lxd01 type: string x-go-name: Location name: description: Instance name example: foo type: string x-go-name: Name profiles: description: List of profiles applied to the instance example: - default items: type: string type: array x-go-name: Profiles project: description: 'Instance project name API extension: instance_all_projects' example: foo type: string x-go-name: Project snapshots: description: List of snapshots. items: $ref: '#/components/schemas/InstanceSnapshot' type: array x-go-name: Snapshots state: $ref: '#/components/schemas/InstanceState' stateful: description: Whether the instance currently has saved state on disk example: false type: boolean x-go-name: Stateful status: description: Instance status (see instance_state) example: Running type: string x-go-name: Status status_code: $ref: '#/components/schemas/StatusCode_2' type: description: The type of instance (container or virtual-machine) example: container type: string x-go-name: Type title: InstanceFull is a combination of Instance, InstanceBackup, InstanceState and InstanceSnapshot. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceSource: properties: alias: description: Image alias name (for image source) example: ubuntu/24.04 type: string x-go-name: Alias allow_inconsistent: description: 'Whether to ignore errors when copying (e.g. for volatile files) API extension: instance_allow_inconsistent_copy' example: false type: boolean x-go-name: AllowInconsistent base-image: description: Base image fingerprint (for faster migration) example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a type: string x-go-name: BaseImage certificate: description: Certificate (for remote images or migration) example: X509 PEM certificate type: string x-go-name: Certificate container_only: description: 'Whether the copy should skip the snapshots (for copy, deprecated, use instance_only) Deprecated: Use InstanceOnly.' example: false type: boolean x-deprecated: true x-go-name: ContainerOnly conversion_options: description: 'Optional list of options that are used during image conversion (for conversion). API extension: instance_import_conversion' example: - format items: type: string type: array x-go-name: ConversionOptions fingerprint: description: Image fingerprint (for image source) example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a type: string x-go-name: Fingerprint image_registry: description: 'Image registry name API extension: image_registries' example: ubuntu type: string x-go-name: ImageRegistry instance_only: description: Whether the copy should skip the snapshots (for copy) example: false type: boolean x-go-name: InstanceOnly live: description: Whether this is a live migration (for migration) example: false type: boolean x-go-name: Live mode: description: Whether to use pull or push mode (for migration) example: pull type: string x-go-name: Mode operation: description: Remote operation URL (for migration) example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1 type: string x-go-name: Operation override_snapshot_profiles: description: 'Whether the instances''s snapshot should receive target instances profile on copy API extension: override_snapshot_profiles_on_copy' example: true type: boolean x-go-name: OverrideSnapshotProfiles project: description: Source project name (for copy and local image) example: blah type: string x-go-name: Project properties: additionalProperties: type: string description: Image filters (for image source) example: os: Ubuntu release: jammy variant: cloud type: object x-go-name: Properties protocol: description: Protocol name (for remote image) example: simplestreams type: string x-go-name: Protocol refresh: description: Whether this is refreshing an existing instance (for migration and copy) example: false type: boolean x-go-name: Refresh secret: description: Remote server secret (for remote private images) example: RANDOM-STRING type: string x-go-name: Secret secrets: additionalProperties: type: string description: Map of migration websockets (for migration) example: criu: RANDOM-STRING rsync: RANDOM-STRING type: object x-go-name: Websockets server: description: Remote server URL (for remote images) example: https://cloud-images.ubuntu.com/releases/ type: string x-go-name: Server source: description: Existing instance name or snapshot (for copy) example: foo/snap0 type: string x-go-name: Source source_disk_size: description: 'Source disk size in bytes used to set the instance''s volume size to accommodate the transferred root disk. This value is ignored if the root disk device has a size explicitly configured (for conversion). API extension: instance_import_conversion' example: 12345 format: int64 type: integer x-go-name: SourceDiskSize type: $ref: '#/components/schemas/SourceType' title: InstanceSource represents the creation source for a new instance. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceSnapshotPut: properties: expires_at: description: When the snapshot expires (gets auto-deleted) example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: ExpiresAt title: InstanceSnapshotPut represents the modifiable fields of a LXD instance snapshot. type: object x-go-package: github.com/canonical/lxd/shared/api InstancesPut: properties: state: $ref: '#/components/schemas/InstanceStatePut' title: InstancesPut represents the fields available for a mass update. type: object x-go-package: github.com/canonical/lxd/shared/api InstancePost: properties: Config: additionalProperties: type: string description: 'Instance configuration file. API extension: instance_move_config' example: security.nesting: 'true' type: object Devices: additionalProperties: additionalProperties: type: string type: object description: 'Instance devices. API extension: instance_move_config' example: root: path: / pool: default type: disk type: object Profiles: description: 'List of profiles applied to the instance. API extension: instance_move_config' example: - default items: type: string type: array allow_inconsistent: description: 'AllowInconsistent allow inconsistent copies when migrating. API extension: instance_allow_inconsistent_copy' example: false type: boolean x-go-name: AllowInconsistent container_only: description: 'Whether snapshots should be discarded (migration only, deprecated, use instance_only) Deprecated: use InstanceOnly.' example: false type: boolean x-deprecated: true x-go-name: ContainerOnly instance_only: description: Whether snapshots should be discarded (migration only) example: false type: boolean x-go-name: InstanceOnly live: description: Whether to perform a live migration (migration only) example: false type: boolean x-go-name: Live migration: description: Whether the instance is being migrated to another server example: false type: boolean x-go-name: Migration name: description: New name for the instance example: bar type: string x-go-name: Name override_snapshot_profiles: description: 'Whether the instances''s snapshot should receive target instances profile on copy API extension: override_snapshot_profiles_on_copy' example: true type: boolean x-go-name: OverrideSnapshotProfiles pool: description: 'Target pool for local cross-pool move API extension: instance_pool_move' example: baz type: string x-go-name: Pool project: description: 'Target project for local cross-project move API extension: instance_project_move' example: foo type: string x-go-name: Project target: $ref: '#/components/schemas/InstancePostTarget' title: InstancePost represents the fields required to rename/move a LXD instance. type: object x-go-package: github.com/canonical/lxd/shared/api InstancePostTarget: properties: certificate: description: The certificate of the migration target example: X509 PEM certificate type: string x-go-name: Certificate operation: description: The operation URL on the remote target example: https://1.2.3.4:8443/1.0/operations/5e8e1638-5345-4c2d-bac9-2c79c8577292 type: string x-go-name: Operation secrets: additionalProperties: type: string description: Migration websockets credentials example: migration: random-string type: object x-go-name: Websockets title: InstancePostTarget represents the migration target host and operation. type: object x-go-package: github.com/canonical/lxd/shared/api OperationRequestor: description: 'API extension: operation_requestor.' properties: address: description: Address is the origin address of the request. example: 10.0.2.15 type: string x-go-name: Address protocol: description: Protocol represents the method used to authenticate the requestor. example: oidc type: string x-go-name: Protocol username: description: Username is the username of the requestor. This is the identifier of the identity, or the username if using the unix socket. example: jane.doe@example.com type: string x-go-name: Username title: OperationRequestor represents the initial requestor of an operation type: object x-go-package: github.com/canonical/lxd/shared/api InstanceBackup: properties: container_only: description: 'Whether to ignore snapshots (deprecated, use instance_only) Deprecated: Use InstanceOnly.' example: false type: boolean x-deprecated: true x-go-name: ContainerOnly created_at: description: When the backup was created example: '2021-03-23T16:38:37.753398689-04:00' format: date-time type: string x-go-name: CreatedAt expires_at: description: When the backup expires (gets auto-deleted) example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: ExpiresAt instance_only: description: Whether to ignore snapshots example: false type: boolean x-go-name: InstanceOnly name: description: Backup name example: backup0 type: string x-go-name: Name optimized_storage: description: Whether to use a pool-optimized binary format (instead of plain tarball) example: true type: boolean x-go-name: OptimizedStorage title: InstanceBackup represents a LXD instance backup. type: object x-go-package: github.com/canonical/lxd/shared/api Instance_2: properties: access_entitlements: description: AccessEntitlements represents the entitlements that are granted to the requesting user on the attached entity. example: - can_view - can_edit items: type: string type: array x-go-name: AccessEntitlements architecture: description: Architecture name example: x86_64 type: string x-go-name: Architecture config: additionalProperties: type: string description: Instance configuration (see doc/instances.md) example: security.nesting: 'true' type: object x-go-name: Config created_at: description: Instance creation timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: CreatedAt description: description: Instance description example: My test instance type: string x-go-name: Description devices: additionalProperties: additionalProperties: type: string type: object description: Instance devices (see doc/instances.md) example: root: path: / pool: default type: disk type: object x-go-name: Devices ephemeral: description: Whether the instance is ephemeral (deleted on shutdown) example: false type: boolean x-go-name: Ephemeral expanded_config: additionalProperties: type: string description: Expanded configuration (all profiles and local config merged) example: security.nesting: 'true' type: object x-go-name: ExpandedConfig expanded_devices: additionalProperties: additionalProperties: type: string type: object description: Expanded devices (all profiles and local devices merged) example: root: path: / pool: default type: disk type: object x-go-name: ExpandedDevices last_used_at: description: Last start timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: LastUsedAt location: description: What cluster member this instance is located on example: lxd01 type: string x-go-name: Location name: description: Instance name example: foo type: string x-go-name: Name profiles: description: List of profiles applied to the instance example: - default items: type: string type: array x-go-name: Profiles project: description: 'Instance project name API extension: instance_all_projects' example: foo type: string x-go-name: Project stateful: description: Whether the instance currently has saved state on disk example: false type: boolean x-go-name: Stateful status: description: Instance status (see instance_state) example: Running type: string x-go-name: Status status_code: $ref: '#/components/schemas/StatusCode_2' type: description: The type of instance (container or virtual-machine) example: container type: string x-go-name: Type title: Instance represents a LXD instance. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceStateDisk: properties: total: description: 'Total size in bytes. Uses 0 to convey that the instance has access to the entire pool''s storage. API extension: instances_state_total' example: 502239232 format: int64 type: integer x-go-name: Total usage: description: Disk usage in bytes. Uses 0 to indicate that the storage driver for the pool does not support retrieving disk usage. example: 502239232 format: int64 type: integer x-go-name: Usage title: InstanceStateDisk represents the disk information section of a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api InstancePut: properties: architecture: description: Architecture name example: x86_64 type: string x-go-name: Architecture config: additionalProperties: type: string description: Instance configuration (see doc/instances.md) example: security.nesting: 'true' type: object x-go-name: Config description: description: Instance description example: My test instance type: string x-go-name: Description devices: additionalProperties: additionalProperties: type: string type: object description: Instance devices (see doc/instances.md) example: root: path: / pool: default type: disk type: object x-go-name: Devices ephemeral: description: Whether the instance is ephemeral (deleted on shutdown) example: false type: boolean x-go-name: Ephemeral profiles: description: List of profiles applied to the instance example: - default items: type: string type: array x-go-name: Profiles restore: description: If set, instance will be restored to the provided snapshot name example: snap0 type: string x-go-name: Restore restore_disk_volumes_mode: description: 'Which disk volumes to restore from an instance snapshot. Possible values are "root" or "all-exclusive". API extension: instance_snapshot_multi_volume' example: all-exclusive type: string x-go-name: RestoreDiskVolumesMode stateful: description: Whether the instance currently has saved state on disk example: false type: boolean x-go-name: Stateful title: InstancePut represents the modifiable fields of a LXD instance. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceSnapshotsPost: properties: disk_volumes_mode: description: 'Which disk volumes to include in instance snapshot. Possible values are "root" or "all-exclusive". API extension: instance_snapshot_multi_volume' example: all-exclusive type: string x-go-name: DiskVolumesMode expires_at: description: 'When the snapshot expires (gets auto-deleted) API extension: snapshot_expiry_creation' example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: ExpiresAt name: description: Snapshot name example: snap0 type: string x-go-name: Name stateful: description: Whether the snapshot should include runtime state example: false type: boolean x-go-name: Stateful title: InstanceSnapshotsPost represents the fields available for a new LXD instance snapshot. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceRebuildPost: properties: source: $ref: '#/components/schemas/InstanceSource' title: InstanceRebuildPost indicates how to rebuild an instance. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceStateMemory: properties: swap_usage: description: SWAP usage in bytes example: 12297557 format: int64 type: integer x-go-name: SwapUsage swap_usage_peak: description: Peak SWAP usage in bytes example: 12297557 format: int64 type: integer x-go-name: SwapUsagePeak total: description: 'Total memory size in bytes API extension: instances_state_total' example: 12297557 format: int64 type: integer x-go-name: Total usage: description: Memory usage in bytes example: 73248768 format: int64 type: integer x-go-name: Usage usage_peak: description: Peak memory usage in bytes example: 73785344 format: int64 type: integer x-go-name: UsagePeak title: InstanceStateMemory represents the memory information section of a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api Operation_2: description: Operation represents a LXD background operation properties: child_count: description: 'Number of child operations. API extension: operation_child_count' example: 2 format: int64 type: integer x-go-name: ChildCount class: description: Type of operation (task, token or websocket) example: websocket type: string x-go-name: Class created_at: description: Operation creation time example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: CreatedAt description: description: Description of the operation example: Executing command type: string x-go-name: Description err: description: Operation error message example: Some error message type: string x-go-name: Err err_code: description: 'Operation error code API extension: bulk_operations' example: 404 format: int64 type: integer x-go-name: ErrCode id: description: UUID of the operation example: 6916c8a6-9b7d-4abd-90b3-aedfec7ec7da type: string x-go-name: ID location: description: 'Which cluster member this record was found on API extension: operation_location' example: lxd01 type: string x-go-name: Location may_cancel: description: Whether the operation can be canceled example: false type: boolean x-go-name: MayCancel metadata: additionalProperties: {} description: Operation specific metadata example: command: - bash environment: HOME: /root LANG: C.UTF-8 PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM: xterm USER: root fds: '0': da3046cf02c0116febf4ef3fe4eaecdf308e720c05e5a9c730ce1a6f15417f66 '1': 05896879d8692607bd6e4a09475667da3b5f6714418ab0ee0e5720b4c57f754b interactive: true type: object x-go-name: Metadata requestor: $ref: '#/components/schemas/OperationRequestor' resources: additionalProperties: items: type: string type: array description: Affected resources example: instances: - /1.0/instances/foo - /1.0/instances/bar type: object x-go-name: Resources status: description: Status name example: Running type: string x-go-name: Status status_code: $ref: '#/components/schemas/StatusCode_2' updated_at: description: Operation last change example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: UpdatedAt type: object x-go-package: github.com/canonical/lxd/shared/api InstanceBackupsPost: properties: compression_algorithm: description: 'What compression algorithm to use API extension: backup_compression_algorithm' example: gzip type: string x-go-name: CompressionAlgorithm container_only: description: 'Whether to ignore snapshots (deprecated, use instance_only) Deprecated: Use InstanceOnly.' example: false type: boolean x-deprecated: true x-go-name: ContainerOnly expires_at: description: When the backup expires (gets auto-deleted) example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: ExpiresAt instance_only: description: Whether to ignore snapshots example: false type: boolean x-go-name: InstanceOnly name: description: Backup name example: backup0 type: string x-go-name: Name optimized_storage: description: Whether to use a pool-optimized binary format (instead of plain tarball) example: true type: boolean x-go-name: OptimizedStorage version: description: 'What backup format version to use API extension: backup_metadata_version' example: 1 format: uint32 type: integer x-go-name: Version title: InstanceBackupsPost represents the fields available for a new LXD instance backup. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceBackupPost: properties: name: description: New backup name example: backup1 type: string x-go-name: Name title: InstanceBackupPost represents the fields available for the renaming of a instance backup. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceSnapshot: properties: architecture: description: Architecture name example: x86_64 type: string x-go-name: Architecture config: additionalProperties: type: string description: Instance configuration (see doc/instances.md) example: security.nesting: 'true' type: object x-go-name: Config created_at: description: Instance creation timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: CreatedAt devices: additionalProperties: additionalProperties: type: string type: object description: Instance devices (see doc/instances.md) example: root: path: / pool: default type: disk type: object x-go-name: Devices ephemeral: description: Whether the instance is ephemeral (deleted on shutdown) example: false type: boolean x-go-name: Ephemeral expanded_config: additionalProperties: type: string description: Expanded configuration (all profiles and local config merged) example: security.nesting: 'true' type: object x-go-name: ExpandedConfig expanded_devices: additionalProperties: additionalProperties: type: string type: object description: Expanded devices (all profiles and local devices merged) example: root: path: / pool: default type: disk type: object x-go-name: ExpandedDevices expires_at: description: When the snapshot expires (gets auto-deleted) example: '2021-03-23T17:38:37.753398689-04:00' format: date-time type: string x-go-name: ExpiresAt last_used_at: description: Last start timestamp example: '2021-03-23T20:00:00-04:00' format: date-time type: string x-go-name: LastUsedAt name: description: Snapshot name example: foo type: string x-go-name: Name profiles: description: List of profiles applied to the instance example: - default items: type: string type: array x-go-name: Profiles size: description: 'Size of the snapshot in bytes API extension: snapshot_disk_usage' example: 143360 format: int64 type: integer x-go-name: Size stateful: description: Whether the instance currently has saved state on disk example: false type: boolean x-go-name: Stateful title: InstanceSnapshot represents a LXD instance snapshot. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceConsolePost: properties: height: description: Console height in rows (console type only) example: 24 format: int64 type: integer x-go-name: Height type: description: 'Type of console to attach to (console or vga) API extension: console_vga_type' example: console type: string x-go-name: Type width: description: Console width in columns (console type only) example: 80 format: int64 type: integer x-go-name: Width title: InstanceConsolePost represents a LXD instance console request. type: object x-go-package: github.com/canonical/lxd/shared/api ImageMetadata: description: ImageMetadata represents LXD image metadata (used in image tarball) properties: architecture: description: Architecture name example: x86_64 type: string x-go-name: Architecture creation_date: description: Image creation data (as UNIX epoch) example: 1620655439 format: int64 type: integer x-go-name: CreationDate expiry_date: description: Image expiry data (as UNIX epoch) example: 1620685757 format: int64 type: integer x-go-name: ExpiryDate properties: additionalProperties: type: string description: Descriptive properties example: os: Ubuntu release: jammy variant: cloud type: object x-go-name: Properties templates: additionalProperties: $ref: '#/components/schemas/ImageMetadataTemplate' description: Template for files in the image type: object x-go-name: Templates type: object x-go-package: github.com/canonical/lxd/shared/api InstanceUEFIVariable: description: InstanceUEFIVariable represents an EFI variable entry properties: attr: description: UEFI variable attributes example: 7 format: uint32 type: integer x-go-name: Attr data: description: UEFI variable data (HEX-encoded) example: '01' type: string x-go-name: Data digest: description: UEFI variable digest (HEX-encoded) type: string x-go-name: Digest timestamp: description: UEFI variable timestamp (HEX-encoded) type: string x-go-name: Timestamp type: object x-go-package: github.com/canonical/lxd/shared/api InstanceStatePut: properties: action: description: State change action (start, stop, restart, freeze, unfreeze) example: start type: string x-go-name: Action force: description: Whether to force the action (for stop and restart) example: false type: boolean x-go-name: Force stateful: description: Whether to store the runtime state (for stop) example: false type: boolean x-go-name: Stateful timeout: description: How long to wait (in s) before giving up (when force isn't set) example: 30 format: int64 type: integer x-go-name: Timeout title: InstanceStatePut represents the modifiable fields of a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceUEFIVars: properties: variables: additionalProperties: $ref: '#/components/schemas/InstanceUEFIVariable' description: 'UEFI variables map Hashmap key format is -' example: SecureBootEnable-f0a30bc7-af08-4556-99c4-001009c93a44: attr: 3 data: '01' type: object x-go-name: Variables title: InstanceUEFIVars represents the UEFI variables of a LXD virtual machine. type: object x-go-package: github.com/canonical/lxd/shared/api InstanceState: properties: cpu: $ref: '#/components/schemas/InstanceStateCPU' disk: additionalProperties: $ref: '#/components/schemas/InstanceStateDisk' description: Disk usage key/value pairs type: object x-go-name: Disk memory: $ref: '#/components/schemas/InstanceStateMemory' network: additionalProperties: $ref: '#/components/schemas/InstanceStateNetwork' description: Network usage key/value pairs type: object x-go-name: Network pid: description: PID of the runtime example: 7281 format: int64 type: integer x-go-name: Pid processes: description: Number of processes in the instance example: 50 format: int64 type: integer x-go-name: Processes status: description: Current status (Running, Stopped, Frozen or Error) example: Running type: string x-go-name: Status status_code: $ref: '#/components/schemas/StatusCode_2' title: InstanceState represents a LXD instance's state. type: object x-go-package: github.com/canonical/lxd/shared/api SourceType: title: SourceType represents source of the instance creation. type: string x-go-package: github.com/canonical/lxd/shared/api InstanceStateNetworkAddress: description: 'InstanceStateNetworkAddress represents a network address as part of the network section of a LXD instance''s state.' properties: address: description: IP address example: fd42:4c81:5770:1eaf:216:3eff:fe0c:eedd type: string x-go-name: Address family: description: Network family (inet or inet6) example: inet6 type: string x-go-name: Family netmask: description: Network mask example: '64' type: string x-go-name: Netmask scope: description: Address scope (local, link or global) example: global type: string x-go-name: Scope type: object x-go-package: github.com/canonical/lxd/shared/api ImageMetadataTemplate: description: ImageMetadataTemplate represents a template entry in image metadata (used in image tarball) properties: create_only: description: Whether to trigger only if the file is missing example: false type: boolean x-go-name: CreateOnly properties: additionalProperties: type: string description: Key/value properties to pass to the template example: foo: bar type: object x-go-name: Properties template: description: The template itself as a valid pongo2 template example: pongo2-template type: string x-go-name: Template when: description: When to trigger the template (create, copy or start) example: create items: type: string type: array x-go-name: When type: object x-go-package: github.com/canonical/lxd/shared/api responses: InternalServerError: description: Internal Server Error content: application/json: schema: type: object properties: error: type: string example: internal server error error_code: type: integer format: int64 example: 500 metadata: example: '{}' type: type: string example: error ErrorBadRequest: description: Bad Request content: application/json: schema: type: object properties: error: type: string example: bad request error_code: type: integer format: int64 example: 400 metadata: example: '{}' type: type: string example: error ErrorNotFound: description: Not found content: application/json: schema: type: object properties: error: type: string example: not found error_code: type: integer format: int64 example: 404 type: type: string example: error EmptySyncResponse: description: Empty sync response content: application/json: schema: properties: status: example: Success type: string x-go-name: Status status_code: example: 200 format: int64 type: integer x-go-name: StatusCode type: example: sync type: string x-go-name: Type type: object BadRequest: description: Bad Request content: application/json: schema: properties: error: example: bad request type: string x-go-name: Error error_code: example: 400 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object InternalServerError_2: description: Internal Server Error content: application/json: schema: properties: error: example: internal server error type: string x-go-name: Error error_code: example: 500 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object NotFound: description: Not found content: application/json: schema: properties: error: example: not found type: string x-go-name: Error error_code: example: 404 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object Forbidden: description: Forbidden content: application/json: schema: properties: error: example: not authorized type: string x-go-name: Error error_code: example: 403 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object PreconditionFailed: description: Precondition Failed content: application/json: schema: properties: error: example: precondition failed type: string x-go-name: Error error_code: example: 412 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object Operation: description: Operation content: application/json: schema: properties: metadata: $ref: '#/components/schemas/Operation_2' operation: example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1 type: string x-go-name: Operation status: example: Operation created type: string x-go-name: Status status_code: example: 100 format: int64 type: integer x-go-name: StatusCode type: example: async type: string x-go-name: Type type: object x-refined-from: - canonical-anbox-cloud-ams-api-openapi.json - canonical-lxd-rest-api-openapi.yml