diff --git a/reference/api-reference/ams-api.yaml b/reference/api-reference/ams-api.yaml index 9a2dd966..721a041c 100644 --- a/reference/api-reference/ams-api.yaml +++ b/reference/api-reference/ams-api.yaml @@ -1,5500 +1,5689 @@ -definitions: - Addon: - description: Addon describes a package with additional functionality to be added to containers - properties: - name: - description: Name of the addon - example: my-addon - type: string - used_by: - description: List of applications using this addon - example: - - app1 - - app2 - items: - type: string - type: array - versions: - description: List of versions of the addon - items: - $ref: '#/definitions/AddonVersion' +swagger: '2.0' +info: + description: 'The Anbox Management Service (AMS) external REST API is the REST API + used by + + all AMS clients. Note that internal endpoints are not included in this + + documentation. + + + The AMS API is available over both a local unix+http and a remote https API. + + Authentication for local users relies on group membership and access to the + + unix socket. For remote users, the default authentication method is TLS client + + certificates.' + title: AMS external REST API + version: '1.0' +paths: + /1.0/: + get: + description: 'This endpoint returns the service status and its supported API + extensions. + + It also returns whether the connection is trusted or not.' + produces: + - application/json + tags: + - service + summary: Get the status and features supported by the service + operationId: service_get + responses: + '200': + description: Current config for the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/ServiceStatus' + default: + $ref: '#/responses/InternalServerError' + /1.0/addons: + get: + description: This endpoint returns a list of addons in AMS. + produces: + - application/json + tags: + - addons + summary: Get a list of addons + operationId: addons_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - type: object - AddonPatch: - description: AddonPatch allows updating an existing addon with a new version - type: object - AddonVersion: - description: AddonVersion describes a single version of an addon - properties: - created_at: - description: Creation timestamp of the addon - example: 1610641117 - format: int64 - type: integer - fingerprint: - description: SHA-256 fingerprint of the addon version - example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261 - type: string - size: - description: Size (in bytes) of the addon payload - example: 529887868 - format: int64 - type: integer - version: - description: Version for the addon - example: 0 - format: int64 - type: integer - type: object - AddonsPost: - description: AddonsPost is used to create a new addon - properties: - name: - description: Name of the addon - example: my-addon - type: string - type: object - Application: - description: Application represents an AMS application - properties: - abi: - description: ABI supported by the application - example: x86_64 - type: string - addons: - description: List of addons enabled for the application - example: - - ssh - - gms items: - type: string + type: string + example: "[\n \"/1.0/addons/foo\",\n \"/1.0/addons/bar\"\n]" + default: + $ref: '#/responses/InternalServerError' + post: + description: 'This enpoint creates a new addon by uploading a package with the + addon + + manifest and hooks. The package format must be bzip2 or zip archive. + + + Required Extensions: + + `zip_archive_support`: To use the zip format, the server must have the extension.' + consumes: + - application/octet-stream + produces: + - application/json + tags: + - addons + summary: Create a new addon + operationId: addons_post + parameters: + - type: string + description: SHA-256 fingerprint of package e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: string + description: 'JSON encoded byte string of addon details e.g { "name": "my-addon" + }' + name: X-AMS-Request + in: header + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/addons/{name}: + get: + description: This endpoint gets the information of an addon stored in AMS. + consumes: + - application/json + produces: + - application/json + tags: + - addons + summary: Get an addon + operationId: addon_get + parameters: + - type: string + description: Name of the addon to retrieve + name: name + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Addon' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: This endpoint deletes an addon stored in AMS. + consumes: + - application/json + produces: + - application/json + tags: + - addons + summary: Delete an addon + operationId: addon_delete + parameters: + - type: string + description: Name of the addon to delete + name: name + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + patch: + description: 'This endpoint updates an addon''s metadata and creates a new addon + version + + for it.' + consumes: + - application/octet-stream + produces: + - application/json + tags: + - addons + summary: Update an addon with a new package + operationId: addon_patch + parameters: + - type: string + description: SHA-256 fingerprint of addon payload e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: string + description: Json encoded byte string of addon details e.g {} + name: X-AMS-Request + in: header + required: true + - type: string + description: Name of the addon to update + name: name + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/addons/{name}/{version}: + delete: + description: This endpoint deletes a specific version of an addon. + consumes: + - application/json + produces: + - application/json + tags: + - addons + summary: Delete an addon version + operationId: addon_version_delete + parameters: + - type: string + description: Name of the addon whose version needs to be deleted + name: name + in: path + required: true + - type: integer + description: Version of the addon to delete + name: version + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/addons?recursion=1: + get: + description: This endpoint returns a list of available addons in the cluster. + produces: + - application/json + tags: + - addons + summary: Get a list of addons expanded + operationId: addons_get_recursion1 + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: type: array - boot_package: - description: Name of the boot package for the application - example: com.foo.bar - type: string - created_at: - description: Creation UTC timestamp of the application - example: 1532150640 - format: int64 - type: integer - id: - description: ID of the application - example: btavtegj1qm58qg7ru50 - type: string - immutable: - description: Flag to show whether the application can be edited - example: false - type: boolean - inhibit_auto_updates: - description: Whether or not to auto update the application's base image - example: false - type: boolean - instance_type: - description: Instance type required by the application - example: a2.3 - type: string - name: - description: Name of the application - example: my-app - type: string - node_selector: - description: List of tags for filtering the nodes to run the application on - example: - - gpu=nvidia - - cpu=intel items: - type: string + $ref: '#/definitions/Addon' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications: + get: + description: This endpoint returns a list of available applications. + produces: + - application/json + tags: + - applications + summary: Get a list of applications + operationId: applications_get + parameters: + - type: integer + default: 0 + description: Index to start listing the records + name: offset + in: query + - type: integer + default: -1 + description: Limit the number of returned records + name: limit + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: btavtegj1qm58qg7ru50 + description: Filter applications by id. This is an exact match for the string. + name: id + in: query + - type: string + example: my-app + description: Filter applications by name. This is an exact match for the + string. + name: name + in: query + - type: string + example: a2.3 + description: Filter applications by their instance_type. + name: instance_type + in: query + - enum: + - initializing + - ready + - error + - deleted + type: string + example: initializing + description: Filter applications by status. + name: status + in: query + - type: string + example: com.foo.bar + description: Filter applications by their boot package. + name: boot_package + in: query + - type: boolean + example: false + description: Filter immutable applications. + name: immutable + in: query + - type: boolean + example: false + description: Filter applications with automatic updates enabled. + name: inhibit_auto_updates + in: query + - type: boolean + example: false + description: Filter published applications. + name: published + in: query + - type: string + example: gms,ssh + description: Filter applications by their attached addon names. + name: addons + in: query + - type: string + example: x86_64 + description: Filter applications by their supported ABI architecture. + name: abi + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter applications by tags. + name: tags + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - parent_image_id: - description: Parent image used for the application - example: btavtegj1qm58qg7ru50 - type: string - published: - description: Whether or not the application is published - example: false - type: boolean - resources: - $ref: '#/definitions/ApplicationResources' - status: - description: Current status of the application - enum: - - initializing - - unknown - - ready - - deleted - - error - example: deleted - type: string - status_code: - $ref: '#/definitions/ApplicationStatus' - tags: - description: Tags to attach to the application - example: - - created_by=anbox items: - type: string + type: string + example: "[\n \"/1.0/applications/foo\",\n \"/1.0/applications/bar\"\ + \n]" + default: + $ref: '#/responses/InternalServerError' + post: + description: "This endpoint creates a new application in AMS using a manifest\ + \ file. The\npayload to upload must be a tarball compressed with bzip2 or\ + \ a zip archive.\nAlso it must contain a **manifest.yaml** file which declares\ + \ the basic\ninformation for the creation of the application.\n\nRequired\ + \ Extensions:\n`zip_archive_support`: To use the zip format, the server must\ + \ have the extension.\nTo support the following syntax in the application\ + \ **manifest.yaml** file, the\nserver requires the corresponding extensions:\n\ + \ Manifest Key | Required Extension |\n ----------------\ + \ | -----------------------------------|\n resources | application_resource_customization\ + \ |\n watchdog | application_watchdog_settings |\n services \ + \ | application_services_configuration |\n version | application_manifest_version\ + \ |\n video-encoder | application_gpu_encoder |" + consumes: + - application/octet-stream + produces: + - application/json + tags: + - applications + summary: Create a new application + operationId: application_post + parameters: + - type: boolean + default: false + description: Whether the application is based on a virtual machine or a + container + name: vm + in: query + - type: string + description: SHA-256 fingerprint of the payload e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: file + description: A tarball or zip file + name: upfile + in: formData + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: 'This endpoint deletes multiple applications. If the deletion of + a single application + + fails the operation is aborted and an error is returned.' + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Delete multiple applications + operationId: applications_delete + parameters: + - description: List of applications to delete + name: details + in: body + schema: + $ref: '#/definitions/ApplicationsDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/applications/{id}: + get: + description: This endpoint gets the information about an application stored + in AMS. + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Get information about an application + operationId: application_get + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Application' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: This endpoint deletes an application and its versions from AMS. + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Delete an application + operationId: application_delete + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + patch: + description: 'This endpoint updates an application with a new package of format + bzip2 or + + zip by uploading a new package to replace/update the existing package. + + + Required Extensions: + + `zip_archive_support`: To use the zip format, the server must have the extension.' + consumes: + - application/octet-stream + produces: + - application/json + tags: + - applications + summary: Update an application with a new package + operationId: application_patch_upload + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + - type: string + description: SHA-256 fingerprint of application e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: file + description: A tarball or zip file + name: upfile + in: formData + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications/{id}/: + patch: + description: "This endpoint updates an applications's metadata only but not\ + \ the package.\nChanging the following fields will lead to the creation of\ + \ a new application\nversion:\n\n SUPPORTED UPDATE FIELD | WILL CREATE\ + \ A NEW APPLICATION VERSION |\n ------------------------- | -----------------------------------------\ + \ |\n image | no \ + \ |\n instance-type | no \ + \ |\n tags | no \ + \ |\n addons | no \ + \ |\n resources | no \ + \ |\n inhibit_auto_updates | no \ + \ |\n services | yes \ + \ |\n watchdog | yes \ + \ |\n boot_activity | yes \ + \ |\n required_permissions | yes \ + \ |\n video_encoder | yes \ + \ |\n manifest_version | yes \ + \ |\n\nRequired Extensions:\n`application_partial_updates`:\ + \ To use those fields that would create a new\napplication version on application\ + \ update." + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Update an applications's metadata + operationId: application_patch_meta + parameters: + - type: string + description: Id of the application to update + name: id + in: path + required: true + - description: Details of the attributes to update + name: details + in: body + schema: + $ref: '#/definitions/ApplicationPatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications/{id}/manifest: + get: + description: 'This endpoint gets the latest application manifest file. + + + Required Extensions: + + `application_manifest_download`: The use of this API requires this extension' + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Get an application's manifest + operationId: application_manifest_get + parameters: + - type: string + description: Id of the application to retrieve + name: id + in: path + required: true + responses: + '200': + description: Success response of the service + headers: + X-AMS-ManifestSha256: + type: string + description: SHA-256 of the manifest file + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications/{id}/{version}: + get: + description: This endpoint gets the information of a specific version of an + application. + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Get information about an application's specific version + operationId: application_version_get + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + - type: integer + description: Version of the application + name: version + in: path + required: true + responses: + '200': + description: Success response of the service + headers: + X-AMS-ManifestSha256: + type: string + description: SHA-256 of the version manifest file + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: This endpoint deletes a specific version of an application. + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Delete a version of an application + operationId: application_version_delete + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + - type: integer + description: Version of the application + name: version + in: path + required: true + - description: Details for the application version to delete + name: details + in: body + schema: + $ref: '#/definitions/ApplicationVersionDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + patch: + description: 'This endpoint updates the information of a specific version of + an application. + + + Required Extensions: + + `application_image_export`: The use of this API requires this extension' + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Update a specific version of an application + operationId: application_version_patch + parameters: + - type: string + description: Id of the application + name: id + in: path + required: true + - type: integer + description: Version of the application + name: version + in: path + required: true + - description: Details for the application version to update + name: details + in: body + schema: + $ref: '#/definitions/ApplicationVersionPatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications/{id}/{version}/manifest: + get: + description: 'This endpoint gets the application manifest file of one specific + application + + version. + + + Required Extensions: + + `application_manifest_download`: The use of this API requires this extension' + consumes: + - application/json + produces: + - application/json + tags: + - applications + summary: Get the manifest for a specific version of an application + operationId: application_version_manifest_get + parameters: + - type: string + description: Id of the application to retrieve + name: id + in: path + required: true + - type: integer + description: Version of the application to retrieve + name: version + in: path + required: true + responses: + '200': + description: Success response of the service + headers: + X-AMS-ManifestSha256: + type: string + description: SHA-256 of the manifest file + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/applications?recursion=1: + get: + description: This endpoint returns a list of available applications in the cluster. + produces: + - application/json + tags: + - applications + summary: Get a list of applications with expanded object definitions + operationId: applications_get_recursion1 + parameters: + - type: integer + default: 0 + description: Index to start listing the records + name: offset + in: query + - type: integer + default: -1 + description: Limit the number of returned records + name: limit + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: btavtegj1qm58qg7ru50 + description: Filter applications by id. This is an exact match for the string. + name: id + in: query + - type: string + example: my-app + description: Filter applications by name. This is an exact match for the + string. + name: name + in: query + - type: string + example: a2.3 + description: Filter applications by their instance_type. + name: instance_type + in: query + - enum: + - initializing + - ready + - error + - deleted + type: string + example: initializing + description: Filter applications by status. + name: status + in: query + - type: string + example: com.foo.bar + description: Filter applications by their boot package. + name: boot_package + in: query + - type: boolean + example: false + description: Filter immutable applications. + name: immutable + in: query + - type: boolean + example: false + description: Filter applications with automatic updates enabled. + name: inhibit_auto_updates + in: query + - type: boolean + example: false + description: Filter published applications. + name: published + in: query + - type: string + example: gms,ssh + description: Filter applications by their attached addon names. + name: addons + in: query + - type: string + example: x86_64 + description: Filter applications by their supported ABI architecture. + name: abi + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter applications by tags. + name: tags + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - versions: - description: List of versions for the application items: - $ref: '#/definitions/ApplicationVersion' + $ref: '#/definitions/Application' + default: + $ref: '#/responses/InternalServerError' + /1.0/certificates: + get: + description: This endpoint returns a list of certificates of trusted clients + produces: + - application/json + tags: + - certificates + summary: Get a list of certificates + operationId: certificates_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - vm: - description: Whether the application is based on virtual machines or containers - type: boolean - type: object - ApplicationAddon: - description: ApplicationAddon describes a specific version of an addon an application version uses - properties: - name: - description: Name of the application addon - example: ssh - type: string - version: - description: Version of the application addon - example: 0 - format: int64 - type: integer - type: object - ApplicationBootstrap: - description: ApplicationBootstrap describes the fields used to configure the application bootstrap - properties: - keep: - description: List of files to keep after the bootstrap - example: - - app.apk items: - type: string + type: string + example: "[\n \"/1.0/certificates/b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\"\ + ,\n \"/1.0/certificates/a52c80e8337d3e08a52e52c6aa25ecfac473eae34a4880ed0088b9dbc2fagcd5\"\ + \n]" + default: + $ref: '#/responses/InternalServerError' + post: + description: 'This endpoint adds a new trusted client to the service by adding + a new + + client certificate.' + consumes: + - application/json + produces: + - application/json + tags: + - certificates + summary: Add a new client certificate + operationId: certificates_post + parameters: + - description: Details of the certificate to create + name: details + in: body + required: true + schema: + $ref: '#/definitions/CertificatesPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '403': + $ref: '#/responses/ErrorForbidden' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/certificates/{fingerprint}: + get: + description: 'The endpoint gets the information of a trusted client''s certificate + and its + + fingerprint.' + consumes: + - application/json + produces: + - application/json + tags: + - certificates + summary: Get the information about a certificate + operationId: certificate_get + parameters: + - type: string + description: SHA-256 fingerprint of the certificate to retrieve + name: fingerprint + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Certificate' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: 'This endpoint deletes a client''s trusted certificate from the + service''s + + trust store.' + consumes: + - application/json + produces: + - application/json + tags: + - certificates + summary: Delete a client's trusted certificate + operationId: certificate_delete + parameters: + - type: string + description: SHA-256 fingerprint of the certificate + name: fingerprint + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/certificates?recursion=1: + get: + description: This endpoint returns a list of certificates of trusted clients. + produces: + - application/json + tags: + - certificates + summary: Get a list of expanded certificates + operationId: certificates_get_recursion1 + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: type: array - type: object - ApplicationDelete: - description: ApplicationDelete represents the fields used to delete an application - properties: - force: - description: Whether deletion of the application should be forced - example: false - type: boolean - type: object - ApplicationExtraData: - description: ApplicationExtraData represents an extra application data - properties: - owner: - description: Owner and group for the files - example: root:root - type: string - permissions: - description: Unix permissions for the files - example: "0644" - type: string - target: - description: Path to the target file on the android filesystem - example: /sdcard/Android/obb/com.foo.bar/ - type: string - type: object - ApplicationHooks: - description: ApplicationHooks describes the fields used to configure the hooks of an application - properties: - timeout: - description: Time limit to wait for the hook to complete before timing out - example: 10m - type: string - type: object - ApplicationPatch: - description: ApplicationPatch represents the fields a user can modify - properties: - addons: - description: List of addons enabled for the application - example: - - ssh - - gms items: - type: string + $ref: '#/definitions/Certificate' + default: + $ref: '#/responses/InternalServerError' + /1.0/config: + get: + description: This endpoint shows the current configuration values for the service. + produces: + - application/json + tags: + - config + summary: Get the current configuration of the service + operationId: config_get + responses: + '200': + description: Current config for the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + type: object + properties: + config: + description: Configuration of the service + type: object + properties: + agent.api.fingerprint: + description: Fingerprint of certificate in the AMS trust store + which is trusted when communicating with the stream agent + type: string + default: '' + example: fd42316b32df + agent.api.token: + description: Token to be used for API authentication with + stream agent + type: string + default: '' + example: foobar + agent.api.url: + description: URL for stream agent API endpoint + type: string + default: '' + example: https://foo.bar:9001 + application.addons: + description: Enable addons globally for applications + type: string + default: '' + example: my-addon + application.auto_publish: + description: Automatically publish the latest version for + an application + type: boolean + default: true + application.auto_update: + description: Automatically update the images and applications + to the latest versions + type: boolean + default: true + application.default_abi: + description: Set a default support ABI architecture globally + type: string + default: '' + example: arm64-v8a + application.max_published_versions: + description: Set the maximum number of application versions + to publish + type: integer + format: int32 + default: 3 + example: 3 + container.apt_mirror: + description: APT mirror to use for downloading dependencies + inside the container + type: string + default: '' + example: http://ports.ubuntu.com/ubuntu-ports + container.default_platform: + description: Platform to be forwarded to the container for + running audio/video operations + type: string + default: 'null' + enum: + - 'null' + - webrtc + - swrast + example: webrtc + container.features: + description: Enable additional android features + type: string + default: '' + example: enable_virtual_keyboard,foo + container.security_updates: + description: Enable/disable security update for containers + type: boolean + default: true + core.debug_address: + description: Address used to expose debug information on + type: string + default: '' + example: https://127.0.0.1:9090 + core.proxy_http: + description: Proxy variables inside container + type: string + default: '' + example: http://my-proxy:8000 + core.proxy_https: + description: Proxy variables inside container + type: string + default: '' + example: http://my-proxy:8000 + core.proxy_ignore_hosts: + description: Proxy variables inside container + type: string + default: '' + example: localhost,127.0.0.1 + core.trust_password: + description: 'Trust password used to add remote clients. + + AMS does not expose the actual password + + but only the fact that it is set or not.' + type: string + default: '' + example: sUp3rS3cR3t + cpu.limit_mode: + description: CPU limiting strategies used for a container + type: string + default: scheduler + enum: + - scheduler + - pinning + example: scheduler + gpu.allocation_mode: + description: GPU allocation mode + type: string + default: single + enum: + - all + - single + example: single + gpu.type: + description: GPU type. Can be `none`, `nvidia`, `intel` or + `amd` + type: string + default: none + enum: + - none + - nvidia + - amd + - intel + example: none + images.allow_insecure: + description: Allow insecure TLS for accessing image registry + type: boolean + default: false + images.auth: + description: Auth token required to access the image registry + type: string + default: '' + example: user:password + images.update_interval: + description: Interval used to check for image updates + type: string + default: 5m + example: 5m + images.url: + description: Image registry URL + type: string + default: https://images.anbox-cloud.io/stable/ + example: https://images.anbox-cloud.io/stable/ + images.version_lockstep: + description: Lock latest image version to align with latest + AMS version + type: boolean + default: true + instance.apt_mirror: + description: APT mirror to use for downloading dependencies + inside the instance + type: string + default: '' + example: http://ports.ubuntu.com/ubuntu-ports + instance.default_platform: + description: Platform to be forwarded to the instance for + running audio/video operations + type: string + default: 'null' + enum: + - 'null' + - webrtc + - swrast + example: webrtc + instance.features: + description: Enable additional android features + type: string + default: '' + example: enable_virtual_keyboard,foo + instance.security_updates: + description: Enable/disable security update for instance + type: boolean + default: true + load_balancer.url: + description: Set host URL for AMS to loadbalancer's URL + type: string + default: '' + example: https://load-balanced-ams.com + node.queue_size: + description: Queue size for internal AMS workers + type: integer + format: int32 + default: 100 + example: 100 + node.workers_per_queue: + description: Number of internal workers for AMS + type: integer + format: int32 + default: 4 + example: 4 + registry.filter: + description: Tag filters used for selecting applications when + interacting with the registry + type: string + default: '' + example: foo,bar + registry.fingerprint: + description: Fingerprint used to verify the ceritifcate of + the application registry + type: string + default: '' + example: my-registry-fingerprint + registry.mode: + description: Mode used to interact with the registry + type: string + default: pull + enum: + - push + - pull + - manual + example: pull + registry.update_interval: + description: Interval used for checking for updates to applications + type: string + default: 1h + example: 1h + registry.url: + description: Application registry URL + type: string + default: '' + example: https://foo.bar/ + scheduler.strategy: + description: Container scheduling startegy + type: string + default: spread + enum: + - spread + - binpack + example: spread + default: + $ref: '#/responses/InternalServerError' + patch: + description: This endpoint updates the configuration items for the service. + consumes: + - application/json + produces: + - application/json + tags: + - config + summary: Update service configuration + operationId: config_patch + parameters: + - description: Configuration items to change + name: details + in: body + schema: + $ref: '#/definitions/ConfigPost' + responses: + '200': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/containers: + get: + description: This endpoint returns a list of container API endpoints. + produces: + - application/json + tags: + - containers + summary: Get a list of containers + operationId: containers_get + parameters: + - type: integer + description: Maximum number of containers to provide + name: limit + in: query + - type: integer + description: Offset at which to start with listing containers + name: offset + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: cilsreunfpfec9b1ktg0 + description: Filter containers by id. This is an exact match for the string. + name: id + in: query + - type: string + example: ams-cilsreunfpfec9b1ktg0 + description: Filter containers by name. This is an exact match for the string. + name: name + in: query + - enum: + - base + - regular + type: string + description: Filter containers by type. + name: type + in: query + - enum: + - created + - prepared + - stopped + - running + - error + - deleted + type: string + description: Filter containers by status. + name: status + in: query + - type: string + example: lxd0 + description: Filter containers by the LXD node name. + name: node + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter containers by the application ID. This is an exact match + for the string. + name: app_id + in: query + - type: string + example: my-app + description: Filter containers by the application name. This is an exact + match for the string. + name: app_name + in: query + - type: integer + example: 0 + description: Filter containers by the application version. + name: app_version + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter containers by the image ID. This is an exact match for + the string. + name: image_id + in: query + - type: integer + example: 0 + description: Filter containers by the image version. + name: image_version + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter containers by tags. + name: tags + in: query + responses: + '200': + description: API endpoints + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of endpoints type: array - boot_activity: - description: Name of the boot package for the version - example: com.foo.bar.MainActivity - type: string - bootstrap: - $ref: '#/definitions/ApplicationBootstrap' - features: - description: List of features supported by the application - example: - - feature1 - - feature2 items: - type: string + type: string + example: "[\n \"/1.0/containers/foo\",\n \"/1.0/containers/bar\"\ + \n]" + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + post: + description: 'This endpoint creates a new container instance with the provided + specification. + + If AMS cannot fullfil the resource requirements for creating the instance, + + the request will fail.' + consumes: + - application/json + produces: + - application/json + tags: + - containers + summary: Create a new container instance + operationId: containers_post + parameters: + - description: Specification of the container to create + name: details + in: body + schema: + $ref: '#/definitions/ContainersPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + delete: + description: 'This endpoint deletes all specified containers. If the deletion + of a single + + container fails, the operation is aborted and an error is returned.' + consumes: + - application/json + produces: + - application/json + tags: + - containers + summary: Delete multiple containers. + operationId: containers_delete + parameters: + - description: List of containers to delete + name: details + in: body + schema: + $ref: '#/definitions/ContainersDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/containers/{id}: + get: + description: This endpoint returns information about a specific container instance. + produces: + - application/json + tags: + - containers + summary: Get information about a specific container instance. + operationId: container_get + parameters: + - type: string + name: id + in: path + required: true + responses: + '200': + description: Container instance details + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Container' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + delete: + description: 'This endpoint deletes a specific container. The deletion process + happens + + asynchronously. The operation progress can be checked via the returned + + operation object.' + consumes: + - application/json + produces: + - application/json + tags: + - containers + summary: Delete a specific container + operationId: container_delete + parameters: + - type: string + name: id + in: path + required: true + - description: Additional details for the delete operation. + name: details + in: body + schema: + $ref: '#/definitions/ContainerDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + patch: + description: This endpoint allows changing the state of a specific container + instance. + consumes: + - application/json + produces: + - application/json + tags: + - containers + summary: Update the state of a specific container instance + operationId: container_patch + parameters: + - type: string + name: id + in: path + required: true + - name: details + in: body + schema: + $ref: '#/definitions/ContainerPatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/containers/{id}/exec: + post: + description: 'This endpoint is used to run a command in the container. 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.' + consumes: + - application/json + produces: + - application/json + tags: + - containers + summary: Execute a command in a container + operationId: container_exec_post + parameters: + - type: string + name: id + in: path + required: true + - description: Exec request + name: exec + in: body + schema: + $ref: '#/definitions/ContainerExecPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/containers/{id}/logs: + get: + description: 'This endpoint returns a container''s collected log files. If a + container has + + been set to status "error" AMS will automatically collect, logs for further + + inspection.' + produces: + - application/json + tags: + - containers + summary: Get a list of collected log files for the container + operationId: container_logs_get + parameters: + - type: string + name: id + in: path + required: true + responses: + '200': + description: Collected log files + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of collected logs type: array - hooks: - $ref: '#/definitions/ApplicationHooks' - image: - description: Base image id or name to use for the applicaiton - example: btavtegj1qm58qg7ru50 - type: string - inhibit_auto_updates: - description: Whether or not to auto update the application's base image - example: false - type: boolean - instance-type: - description: Instance type to use for the application - example: a3.4 - type: string - manifest_version: - description: Version of the manifest used to create the application - example: "0.1" - type: string - node_selector: - description: List of tags for filtering the nodes to run the application on - example: - - gpu=nvidia - - cpu=intel items: - type: string + type: string + example: "[\n \"/1.0/containers/cilsiomnfpfec9b1kteg/logs/android.log\"\ + ,\n \"/1.0/containers/cilsiomnfpfec9b1kteg/logs/system.log\"\n]" + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/containers/{id}/logs/{name}: + get: + description: This endpoint returns the collected log file as a raw file. + produces: + - application/json + tags: + - containers + summary: Retrieve a specific log file stored for the container + operationId: container_logs_specific_get + parameters: + - type: string + name: id + in: path + required: true + - type: string + description: Name of the log to retrieve + name: name + in: path + required: true + responses: + '200': + description: Raw file + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/containers?recursion=1: + get: + description: This endpoint returns a list of containers. + produces: + - application/json + tags: + - containers + summary: Get a list of containers + operationId: containers_get_recursion1 + parameters: + - type: integer + description: Maximum number of containers to provide + name: limit + in: query + - type: integer + description: Offset at which to start with listing containers + name: offset + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: cilsreunfpfec9b1ktg0 + description: Filter containers by id. This is an exact match for the string. + name: id + in: query + - type: string + example: ams-cilsreunfpfec9b1ktg0 + description: Filter containers by name. This is an exact match for the string. + name: name + in: query + - enum: + - base + - regular + type: string + description: Filter containers by type. + name: type + in: query + - enum: + - created + - prepared + - stopped + - running + - error + - deleted + type: string + description: Filter containers by status. + name: status + in: query + - type: string + example: lxd0 + description: Filter containers by the LXD node name. + name: node + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter containers by the application ID. This is an exact match + for the string. + name: app_id + in: query + - type: string + example: my-app + description: Filter containers by the application name. This is an exact + match for the string. + name: app_name + in: query + - type: integer + example: 0 + description: Filter containers by the application version. + name: app_version + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter containers by the image ID. This is an exact match for + the string. + name: image_id + in: query + - type: integer + example: 0 + description: Filter containers by the image version. + name: image_version + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter containers by tags. + name: tags + in: query + responses: + '200': + description: API endpoints + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of containers type: array - required_permissions: - description: Required android application permissions - example: - - android.permission.WRITE_EXTERNAL_STORAGE - - android.permission.READ_EXTERNAL_STORAGE items: - type: string + $ref: '#/definitions/Container' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/events: + get: + description: 'This endpoint will upgrade the connection to a websocket on which + + notifications will be sent. The client can subscribe to different types of + + events or only listen to the required events.' + produces: + - application/json + tags: + - events + summary: Listen to events for changes in AMS + operationId: events_get + parameters: + - enum: + - all + - operation + - lifecycle + type: string + default: all + description: Type of event. If left empty, the parameter corresponds to + 'all' events. + name: type + in: formData + responses: + '200': + description: 'This api endpoint never returns. This websocket sends out + JSON + + dictionaries of the given format for events' + schema: + $ref: '#/definitions/Event' + default: + $ref: '#/responses/InternalServerError' + /1.0/images: + get: + description: This endpoint returns a list of images available in the cluster. + produces: + - application/json + tags: + - images + summary: Get a list of images + operationId: images_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - resources: - $ref: '#/definitions/ApplicationResourcesPost' - services: - description: |- - List of services exposed by the application that should be expose on the instance - For application version update, changing those values would trigger a new application version creation items: - $ref: '#/definitions/NetworkServiceSpec' + type: string + example: "[\n \"/1.0/images/foo\",\n \"/1.0/images/bar\"\n]" + default: + $ref: '#/responses/InternalServerError' + post: + description: 'This endpoint imports an image into AMS cluster from an image + server using + + its name.' + consumes: + - application/json + produces: + - application/json + tags: + - images + summary: Import an image + operationId: image_post_import + parameters: + - description: Details of the image to create + name: details + in: body + required: true + schema: + $ref: '#/definitions/ImagesPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/images/: + post: + description: 'This endpoint allows the client to upload an image with a new + package of + + format gzip, bzip2 or xz.' + consumes: + - application/octet-stream + produces: + - application/json + tags: + - images + summary: Upload a package to create an image + operationId: image_post_upload + parameters: + - type: string + description: SHA-256 fingerprint of image e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: string + description: 'Json encoded byte string of image details for e.g { "name": + "my-image", "default": false }' + name: X-AMS-Request + in: header + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/images/{id_or_name}: + get: + description: This endpoint gets the information about an image stored in AMS. + consumes: + - application/json + produces: + - application/json + tags: + - images + summary: Get information about an image + operationId: image_get + parameters: + - type: string + description: Id or name of the image to retrieve + name: id_or_name + in: path + required: true + - enum: + - container + - vm + type: string + default: container + description: Type of the image variant to return could be `vm` or `container` + name: type + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Image' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/images/{id}: + delete: + description: This endpoint deletes an image stored in AMS. + consumes: + - application/json + produces: + - application/json + tags: + - images + summary: Delete an image + operationId: image_delete + parameters: + - type: string + description: Id of the image to delete + name: id + in: path + required: true + - description: details for deleting the image + name: details + in: body + schema: + $ref: '#/definitions/ImageDelete' + - enum: + - container + - vm + type: string + default: container + description: Type of the image variant to return could be `vm` or `container` + name: type + in: query + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + patch: + description: 'This endpoint updates an existing image with a new package of + format gzip, + + bzip2 or xz.' + consumes: + - application/octet-stream + produces: + - application/json + tags: + - images + summary: Update an image with a new package to upload + operationId: image_patch_upload + parameters: + - type: string + description: SHA-256 fingerprint of image e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + name: X-AMS-Fingerprint + in: header + - type: string + description: 'Json encoded byte string of image details e.g { "name": "my-image", "default": + false }' + name: X-AMS-Request + in: header + required: true + - type: string + description: Id of the image to update + name: id + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/images/{id}/: + patch: + description: This endpoint updates an image's metadata only but not the package. + consumes: + - application/json + produces: + - application/json + tags: + - images + summary: Update an image's metadata + operationId: image_patch_meta + parameters: + - type: string + description: Id of the image to update + name: id + in: path + required: true + - description: Details of the attributes to update + name: details + in: body + schema: + $ref: '#/definitions/ImagePatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/images/{id}/{version}: + delete: + description: This endpoint deletes a specific version of a stored image. + consumes: + - application/json + produces: + - application/json + tags: + - images + summary: Delete an image version + operationId: image_version_delete + parameters: + - type: string + description: Id or name of the image whose version needs to be deleted + name: id + in: path + required: true + - type: integer + description: Version of the image to delete + name: version + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/images?recursion=1: + get: + description: This endpoint returns a list of images available in the cluster. + produces: + - application/json + tags: + - images + summary: Get the list of images expanded + operationId: images_get_recursion1 + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: type: array - tags: - description: Tags to attach to the application - example: - - created_by=anbox items: - type: string + $ref: '#/definitions/Image' + default: + $ref: '#/responses/InternalServerError' + /1.0/instances: + get: + description: This endpoint returns a list of instance API endpoints. + produces: + - application/json + tags: + - instances + summary: Get a list of instances + operationId: instances_get + parameters: + - type: integer + description: Maximum number of instances to provide + name: limit + in: query + - type: integer + description: Offset at which to start with listing instances + name: offset + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: cilsreunfpfec9b1ktg0 + description: Filter instances by id. This is an exact match for the string. + name: id + in: query + - type: string + example: ams-cilsreunfpfec9b1ktg0 + description: Filter instances by name. This is an exact match for the string. + name: name + in: query + - type: boolean + example: true + description: Filter base instances. The instances which are not base, are + regular instances. + name: base + in: query + - enum: + - vm + - container + type: string + description: Filter instances by type. + name: type + in: query + - enum: + - created + - prepared + - stopped + - running + - error + - deleted + type: string + description: Filter instances by status. + name: status + in: query + - type: string + example: lxd0 + description: Filter instances by the LXD node name. + name: node + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter instances by the application ID. This is an exact match + for the string. + name: app_id + in: query + - 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 + - type: integer + example: 0 + description: Filter instances by the application version. + name: app_version + in: query + - type: string + example: cilshrmnfpfec9b1kte0 + description: Filter instances by the image ID. This is an exact match for + the string. + name: image_id + in: query + - type: integer + example: 0 + description: Filter instances by the image version. + name: image_version + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter instances by tags. + name: tags + in: query + responses: + '200': + description: API endpoints + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of endpoints type: array - video_encoder: - $ref: '#/definitions/VideoEncoderType' - watchdog: - $ref: '#/definitions/ApplicationWatchdog' - type: object - ApplicationResources: - description: ApplicationResources describes resources allocated for an application - properties: - cpus: - description: Number of CPUs required by the application - example: 2 - format: int64 - type: integer - disk-size: - description: Storage size required by the application - example: 3GB - type: string - gpu-slots: - description: Number of GPU slots required by the application - example: 2 - format: int64 - type: integer - memory: - description: Memory to be assigned to the application - example: 3GB - type: string - vpu-slots: - description: Number of VPU slots required by the application - example: 1 - format: int64 - type: integer - type: object - ApplicationResourcesPost: - description: ApplicationResourcesPost represents the fields used to update an application resource - properties: - cpus: - description: Number of CPUs required by the application - example: 2 - format: int64 - type: integer - disk-size: - description: Storage size required by the application - example: 3GB - type: string - gpu-slots: - description: Number of GPU slots required by the application - example: 2 - format: int64 - type: integer - memory: - description: Memory to be assigned to the application - example: 3GB - type: string - vpu-slots: - description: Number of VPU slots required by the application - example: 1 - format: int64 - type: integer - type: object - ApplicationStatus: - description: ApplicationStatus represents the status an application can be in - format: int64 - type: integer - ApplicationVersion: - description: ApplicationVersion describes a single version of an application - properties: - addons: - description: List of addons enabled for the version items: - $ref: '#/definitions/ApplicationAddon' + type: string + example: "[\n \"/1.0/instances/foo\",\n \"/1.0/instances/bar\"\n\ + ]" + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/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.' + consumes: + - application/json + produces: + - application/json + tags: + - instances + summary: Create a new instance + operationId: instances_post + parameters: + - description: Specification of the instance to create + name: details + in: body + schema: + $ref: '#/definitions/InstancesPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + 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.' + consumes: + - application/json + produces: + - application/json + tags: + - instances + summary: Delete multiple instances. + operationId: instances_delete + parameters: + - description: List of instances to delete + name: details + in: body + schema: + $ref: '#/definitions/InstancesDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/instances/{id_or_name}: + get: + description: This endpoint returns information about a specific instance instance. + produces: + - application/json + tags: + - instances + summary: Get information about a specific instance instance. + operationId: instance_get + parameters: + - type: string + name: id_or_name + in: path + required: true + responses: + '200': + description: Instance instance details + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Instance' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/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.' + consumes: + - application/json + produces: + - application/json + tags: + - instances + summary: Delete a specific instance + operationId: instance_delete + parameters: + - type: string + name: id_or_name + in: path + required: true + - description: Additional details for the delete operation. + name: details + in: body + schema: + $ref: '#/definitions/InstanceDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + patch: + description: This endpoint allows changing the state of a specific instance + instance. + consumes: + - application/json + produces: + - application/json + tags: + - instances + summary: Update the state of a specific instance instance + operationId: instance_patch + parameters: + - type: string + name: id_or_name + in: path + required: true + - name: details + in: body + schema: + $ref: '#/definitions/InstancePatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /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.' + consumes: + - application/json + produces: + - application/json + tags: + - instances + summary: Execute a command in a instance + operationId: instance_exec_post + parameters: + - type: string + name: id_or_name + in: path + required: true + - description: Exec request + name: exec + in: body + schema: + $ref: '#/definitions/InstanceExecPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /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.' + produces: + - application/json + tags: + - instances + summary: Get a list of collected log files for the instance + operationId: instance_logs_get + parameters: + - type: string + name: id_or_name + in: path + required: true + responses: + '200': + description: Collected log files + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of collected logs type: array - boot_activity: - description: Name of the boot package for the version - example: com.foo.bar.MainActivity - type: string - bootstrap: - $ref: '#/definitions/ApplicationBootstrap' - created_at: - description: Creation UTC timestamp of the version - example: 1532150640 - format: int64 - type: integer - error_message: - description: Error message in case the application ran into an error - example: '{}' - type: string - extra_data: - additionalProperties: - $ref: '#/definitions/ApplicationExtraData' - description: Extra data to be setup on the instance on application creation - example: {} - type: object - features: - description: List of features supported by the application - example: - - feature1 - - feature2 items: - type: string + type: string + example: "[\n \"/1.0/instances/cilsiomnfpfec9b1kteg/logs/android.log\"\ + ,\n \"/1.0/instances/cilsiomnfpfec9b1kteg/logs/system.log\"\n]" + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/instances/{id_or_name}/logs/{name}: + get: + description: This endpoint returns the collected log file as a raw file. + produces: + - application/json + tags: + - instances + summary: Retrieve a specific log file stored for the instance + operationId: instance_logs_specific_get + parameters: + - type: string + name: id_or_name + in: path + required: true + - type: string + description: Name of the log to retrieve + name: name + in: path + required: true + responses: + '200': + description: Raw file + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/instances?recursion=1: + get: + description: This endpoint returns a list of instances. + produces: + - application/json + tags: + - instances + summary: Get a list of instances + operationId: instances_get_recursion1 + parameters: + - type: integer + description: Maximum number of instances to provide + name: limit + in: query + - type: integer + description: Offset at which to start with listing instances + name: offset + in: query + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + - type: string + example: cilsreunfpfec9b1ktg0 + description: Filter instances by id. This is an exact match for the string. + name: id + in: query + - type: string + example: ams-cilsreunfpfec9b1ktg0 + description: Filter instances by name. This is an exact match for the string. + name: name + in: query + - type: boolean + example: true + description: Filter base instances. The instances which are not base, are + regular instances. + name: base + in: query + - enum: + - vm + - container + type: string + description: Filter instances by type. + name: type + in: query + - enum: + - created + - prepared + - stopped + - running + - error + - deleted + type: string + description: Filter instances by status. + name: status + in: query + - type: string + example: lxd0 + description: Filter instances by the LXD node name. + name: node + in: query + - type: string + example: cilsiomnfpfec9b1kteg + description: Filter instances by the application ID. This is an exact match + for the string. + name: app_id + in: query + - 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 + - type: integer + example: 0 + description: Filter instances by the application version. + name: app_version + in: query + - type: string + example: cilshrmnfpfec9b1kte0 + description: Filter instances by the image ID. This is an exact match for + the string. + name: image_id + in: query + - type: integer + example: 0 + description: Filter instances by the image version. + name: image_version + in: query + - type: string + example: created_by=anbox,foo,bar + description: Filter instances by tags. + name: tags + in: query + responses: + '200': + description: API endpoints + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + description: List of instances type: array - hooks: - $ref: '#/definitions/ApplicationHooks' - manifest_version: - description: Version of the manifest used to create the application - example: "0.1" - type: string - number: - description: Version of the application - example: 0 - format: int64 - type: integer - parent_image_id: - description: Parent image used for the application version - example: btavtegj1qm58qg7ru50 - type: string - parent_image_version: - description: Parent image version to use for the application version - example: 0 - format: int64 - type: integer - published: - description: Whether or not the version is published - example: false - type: boolean - required_permissions: - description: Required android application permissions - example: - - android.permission.WRITE_EXTERNAL_STORAGE - - android.permission.READ_EXTERNAL_STORAGE items: - type: string + $ref: '#/definitions/Instance' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '500': + $ref: '#/responses/InternalServerError' + /1.0/nodes: + get: + description: This endpoint returns a list of available nodes known to AMS. + produces: + - application/json + tags: + - nodes + summary: Get a list of nodes + operationId: nodes_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - services: - description: List of services exposed by the application that should be exposed on the instance items: - $ref: '#/definitions/NetworkServiceSpec' + type: string + example: "[\n \"/1.0/nodes/foo\",\n \"/1.0/nodes/bar\"\n ]" + default: + $ref: '#/responses/InternalServerError' + post: + description: 'This endpoint creates a node in AMS which can be a precreated + (unmanaged) + + LXD node or a managed node created by AMS bootstrapping LXD.' + consumes: + - application/json + produces: + - application/json + tags: + - nodes + summary: Create a node + operationId: node_post + parameters: + - description: AMS Node to create + name: details + in: body + schema: + $ref: '#/definitions/NodesPost' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/nodes/{name}: + get: + description: 'This endpoint returns information about a node in AMS and its + resources from + + the LXD cluster.' + consumes: + - application/json + produces: + - application/json + tags: + - nodes + summary: Get information about a node + operationId: node_get + parameters: + - type: string + description: Name of the node to get + name: name + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Node' + headers: + Etag: + type: string + description: E-Tag of the resource + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + delete: + description: This endpoint deletes a node in AMS and its resources from the + LXD cluster. + consumes: + - application/json + produces: + - application/json + tags: + - nodes + summary: Delete a node + operationId: node_delete + parameters: + - type: string + description: Name of the node to delete + name: name + in: path + required: true + - description: Info required to delete the resource + name: details + in: body + schema: + $ref: '#/definitions/NodeDelete' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + patch: + description: This endpoint updates a node and its resources in the cluster. + consumes: + - application/json + produces: + - application/json + tags: + - nodes + summary: Update a node + operationId: node_patch + parameters: + - type: string + description: Etag of the resource + name: Etag + in: header + - type: string + description: Name of the node to delete + name: name + in: path + required: true + - description: Info required to update the resource + name: details + in: body + schema: + $ref: '#/definitions/NodePatch' + responses: + '202': + description: Success response of the service + schema: + $ref: '#/definitions/OperationResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + '409': + $ref: '#/responses/ErrorAlreadyExists' + default: + $ref: '#/responses/InternalServerError' + /1.0/nodes?recursion=1: + get: + description: This endpoint returns a list of available nodes known to AMS. + produces: + - application/json + tags: + - nodes + summary: Get a list of nodes + operationId: nodes_get_recursion1 + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: type: array - status: - description: Current status of the version - enum: - - initializing - - unknown - - ready - - deleted - - error - example: deleted - type: string - status_code: - $ref: '#/definitions/ImageStatus' - video_encoder: - $ref: '#/definitions/VideoEncoderType' - watchdog: - $ref: '#/definitions/ApplicationWatchdog' - type: object - ApplicationVersionDelete: - description: ApplicationVersionDelete represents the fields used to delete an application version - properties: - force: - description: Whether deletion of the application version should be forced - example: false - type: boolean - type: object - ApplicationVersionPatch: - description: ApplicationVersionPatch represents the fields used to update an application version - properties: - published: - description: Used to publish a specific version of the application - example: true - type: boolean - type: object - ApplicationWatchdog: - description: ApplicationWatchdog describes the fields used to update an application watchdog - properties: - allowed-packages: - description: List of android packages to enable the watchdog for - example: - - com.android.settings items: - type: string + $ref: '#/definitions/Node' + default: + $ref: '#/responses/InternalServerError' + /1.0/operations: + get: + description: 'This endpoint returns a list of URLs for operations that are currently + in + + progress or queued.' + produces: + - application/json + tags: + - operations + summary: Get a list of operations + operationId: operations_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: + description: List of endpoints type: array - disabled: - description: Whether or not to enable the watchdog for the application - example: true - type: boolean - type: object - ApplicationsDelete: - description: ApplicationsDelete represents a list of application to delete together - properties: - force: - description: Whether deletion of the applications should be forced - example: false - type: boolean - ids: - description: IDs or names of the applications to delete - example: - - cilsreunfpfec9b1ktg0 - - cilsreunfpfec9b1ktg1 - - myapp items: - type: string - type: array - type: object - Certificate: - description: Certificate represents an available client certificate - properties: - certificate: - description: Base64 encoded certificate content without the header or the footer - example: MIIFUTCCAzmgAw...xjKoUEEQOzJ9 - type: string - fingerprint: - description: SHA-256 fingerprint of the certificate - example: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - type: string - type: object - CertificatesPost: - description: CertificatesPost represents the fields of a new auth provided certificate - properties: - certificate: - description: Base64 encoded certificate content without the header or the footer - example: MIIFUTCCAzmgAw...xjKoUEEQOzJ9 - type: string - trust-password: - description: TrustPassword is used to register a new client with the service - example: sUp3rs3cr3t - type: string - type: object - CollectionResponse: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - - properties: - total_size: - description: Total Count of the collection - example: 99 - format: int64 - type: integer - type: object - description: Collection Response - ConfigItem: - description: ConfigItem represents a single configuration item - properties: - name: - type: string - value: - type: string - type: object - ConfigPost: - description: ConfigPost contains the field necessary to set or update a config item - properties: - name: - example: application.auto_publish - type: string - value: - example: "false" - type: string - type: object - Container: - description: Container represents a single container - properties: - address: - description: Address is the IP address of the container - example: 192.168.1.74 - type: string - app_id: - description: |- - AppID is the ID of the application the container is created from. Empty if the - container has not been created from an application. - example: cilsiomnfpfec9b1kteg - type: string - app_name: - description: |- - AppName is the name of the application the container is created from. Empty if the - container has not been created from an application. - example: myapp - type: string - app_version: - description: |- - AppVersion is the version of the application the container is created from. Empty if the - container has not been created from an application. - example: 0 - format: int64 - type: integer - architecture: - description: Architecture describes the CPU archtitecture the container is using - example: aarch64 - type: string - config: - description: Config summarizes the configuration the container uses - properties: - boot_activity: - description: BootActivity specifies the Android activity which is started by default - example: com.android.settings/.DevSettings - type: string - boot_package: - description: BootPackage specifies the Android application package name which is started by default - example: com.android.settings - type: string - devmode: - description: DevMode specifies if development mode has been turned on for the container - type: boolean - disable_watchdog: - description: DisableWatchdog defines whether the watchdog is disabled - type: boolean - metrics_server: - description: MetricsServer specifies a metrics server the container will use - example: 10.0.0.45:8086 - type: string - platform: - description: Platform specifies the Anbox platform the container is running with - example: webrtc - type: string - type: object - created_at: - description: CreatedAt specifies the time at which the container was created - example: 1689604498 - format: int64 - type: integer - error_message: - description: ErrorMessage provides an error message when the container status is set to error. - example: container failed to boot - type: string - id: - description: ID of the container - example: cilsreunfpfec9b1ktg0 - type: string - image_id: - description: |- - ImageID is the ID of the image the container is created from. Empty if the - container has not been created from an image. - example: cilshrmnfpfec9b1kte0 - type: string - image_version: - description: |- - ImageVersion is the version of the image the container is created from. Empty if the - container has not been created from an image. - example: 0 - format: int64 - type: integer - name: - description: Name of the container. Typically in the format "ams-". - example: ams-cilsreunfpfec9b1ktg0 - type: string - node: - description: Node the container is running on - example: lxd0 - type: string - public_address: - description: |- - PublicAddress is the external IP address the container is accessible on (in most - cases the IP of the node it is running on) - example: 1.2.3.4 - type: string - resources: - description: Resources specifies the resources allocated for the container - properties: - cpus: - description: CPUs cores assigned to the container - example: 2 - format: int64 - type: integer - disk-size: - description: DiskSize specifies the amount of storage assigned to the container - example: 3GB - type: string - gpu-slots: - description: GPUSlots specifies the number of GPU slots the container got allocated - example: 1 - format: int64 - type: integer - memory: - description: Memory assigned to the container - example: 3GB - type: string - vpu-slots: - description: VPUSlots specifies the number of VPU slots the container - format: int64 - type: integer - type: object - services: - description: Services the container exposes - items: - $ref: '#/definitions/ContainerService' + type: string + example: "[\n \"/1.0/operations/foo\",\n \"/1.0/operations/bar\"\ + \n]" + default: + $ref: '#/responses/InternalServerError' + /1.0/operations/{uuid}: + get: + description: This endpoint gets the information about an operation. + consumes: + - application/json + produces: + - application/json + tags: + - operations + summary: Get the current status of an operation + operationId: operation_get + parameters: + - type: string + description: uuid of the operation + name: uuid + in: path + required: true + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Operation' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + delete: + description: 'This endpoint is used to change the state of cancellable API to + “cancelling” + + rather than actually removing the operation entry.' + consumes: + - application/json + produces: + - application/json + tags: + - operations + summary: Cancel an operation + operationId: operation_delete + parameters: + - type: string + description: uuid of the operation + name: uuid + in: path + required: true + responses: + '202': + description: Success response of the service + schema: + $ref: '#/responses/EmptySyncResponse' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/operations/{uuid}/wait: + get: + description: 'This is a synchronous endpoint for a client to wait until an operation + + reaches a final status.' + consumes: + - application/json + produces: + - application/json + tags: + - operations + summary: Wait for an operation to complete + operationId: operation_wait_get + parameters: + - type: string + description: uuid of the operation + name: uuid + in: path + required: true + - type: integer + description: 'The amount of time (in seconds) to wait until the operation + is considered + + to be timed out. If the value is assigned to -1, the operation will wait + + infinitely until the monitored operation reaches a final status.' + name: timeout + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/Operation' + '400': + $ref: '#/responses/ErrorBadRequest' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/operations/{uuid}/websocket: + get: + description: 'The connection to this endpoint is upgraded into a websocket connection, + + speaking the protocol defined by the operation type. For example, in the + + case of an exec operation, the websocket is the bidirectional pipe for + + stdin/stdout/stderr to flow to and from the process inside the container. + + In the case of migration, it will be the primary interface over which the + + migration information is communicated.' + tags: + - operations + summary: Get the websocket connection to monitor operation + operationId: operation_websocket_get + parameters: + - type: string + description: uuid of the operation + name: uuid + in: path + required: true + - type: string + description: 'This is the secret that was provided when the operation was + created. + + Guests are allowed to connect only if they have the correct secret.' + name: secret + in: query + responses: + '400': + $ref: '#/responses/ErrorBadRequest' + '401': + $ref: '#/responses/ErrorUnauthorized' + '403': + $ref: '#/responses/ErrorForbidden' + '404': + $ref: '#/responses/ErrorNotFound' + default: + $ref: '#/responses/InternalServerError' + /1.0/operations?recursion=1: + get: + description: 'This endpoint returns a list of operations that are currently + in progress + + or queued.' + produces: + - application/json + tags: + - operations + summary: Get a list of expanded operations + operationId: operations_get_recursion1 + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/CollectionResponse' + properties: + metadata: type: array - status: - description: Status of the container - example: running - type: string - status_code: - $ref: '#/definitions/ContainerStatus' - stored_logs: - description: StoredLogs lists log files AMS stores for the container. - example: - - android.log - - system.log items: - type: string + $ref: '#/definitions/Operation' + default: + $ref: '#/responses/InternalServerError' + /1.0/tasks: + get: + description: This endpoint returns a list of tasks in AMS. + produces: + - application/json + tags: + - tasks + summary: Get a list of tasks + operationId: tasks_get + parameters: + - enum: + - 0 + - 1 + type: integer + default: 0 + description: Expand the returned resource definition + name: recursion + in: query + responses: + '200': + description: Success response of the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: type: array - tags: - description: Tags specifies the tags the container has assigned - example: - - foo - - bar items: - type: string - type: array - type: - $ref: '#/definitions/ContainerType' - type: object - ContainerDelete: - description: ContainerDelete describes a request used to delete a container - properties: - force: - description: Whether deletion of the container should be forced - type: boolean + $ref: '#/definitions/Task' + default: + $ref: '#/responses/InternalServerError' + /1.0/version: + get: + description: This endpoint returns the current running version for the service. + produces: + - application/json + tags: + - service + summary: Get the current version for the service + operationId: version_get + responses: + '200': + description: Current config for the service + schema: + type: object + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + properties: + metadata: + $ref: '#/definitions/VersionResponse' + default: + $ref: '#/responses/InternalServerError' +definitions: + Addon: + description: Addon describes a package with additional functionality to be added + to containers + type: object + properties: + name: + description: Name of the addon + type: string + example: my-addon + used_by: + description: List of applications using this addon + type: array + items: + type: string + example: + - app1 + - app2 + versions: + description: List of versions of the addon + type: array + items: + $ref: '#/definitions/AddonVersion' + AddonPatch: + description: AddonPatch allows updating an existing addon with a new version + type: object + AddonVersion: + description: AddonVersion describes a single version of an addon + type: object + properties: + created_at: + description: Creation timestamp of the addon + type: integer + format: int64 + example: 1610641117 + fingerprint: + description: SHA-256 fingerprint of the addon version + type: string + example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261 + size: + description: Size (in bytes) of the addon payload + type: integer + format: int64 + example: 529887868 + version: + description: Version for the addon + type: integer + format: int64 + example: 0 + AddonsPost: + description: AddonsPost is used to create a new addon + type: object + properties: + name: + description: Name of the addon + type: string + example: my-addon + Application: + description: Application represents an AMS application + type: object + properties: + abi: + description: ABI supported by the application + type: string + example: x86_64 + addons: + description: List of addons enabled for the application + type: array + items: + type: string + example: + - ssh + - gms + boot_package: + description: Name of the boot package for the application + type: string + example: com.foo.bar + created_at: + description: Creation UTC timestamp of the application + type: integer + format: int64 + example: 1532150640 + id: + description: ID of the application + type: string + example: btavtegj1qm58qg7ru50 + immutable: + description: Flag to show whether the application can be edited + type: boolean + example: false + inhibit_auto_updates: + description: Whether or not to auto update the application's base image + type: boolean + example: false + instance_type: + description: Instance type required by the application + type: string + example: a2.3 + name: + description: Name of the application + type: string + example: my-app + node_selector: + description: List of tags for filtering the nodes to run the application on + type: array + items: + type: string + example: + - gpu=nvidia + - cpu=intel + parent_image_id: + description: Parent image used for the application + type: string + example: btavtegj1qm58qg7ru50 + published: + description: Whether or not the application is published + type: boolean + example: false + resources: + $ref: '#/definitions/ApplicationResources' + status: + description: Current status of the application + type: string + enum: + - initializing + - unknown + - ready + - deleted + - error + example: deleted + status_code: + $ref: '#/definitions/ApplicationStatus' + tags: + description: Tags to attach to the application + type: array + items: + type: string + example: + - created_by=anbox + versions: + description: List of versions for the application + type: array + items: + $ref: '#/definitions/ApplicationVersion' + vm: + description: Whether the application is based on virtual machines or containers + type: boolean + ApplicationAddon: + description: ApplicationAddon describes a specific version of an addon an application + version uses + type: object + properties: + name: + description: Name of the application addon + type: string + example: ssh + version: + description: Version of the application addon + type: integer + format: int64 + example: 0 + ApplicationBootstrap: + description: ApplicationBootstrap describes the fields used to configure the application + bootstrap + type: object + properties: + keep: + description: List of files to keep after the bootstrap + type: array + items: + type: string + example: + - app.apk + ApplicationDelete: + description: ApplicationDelete represents the fields used to delete an application + type: object + properties: + force: + description: Whether deletion of the application should be forced + type: boolean + example: false + ApplicationExtraData: + description: ApplicationExtraData represents an extra application data + type: object + properties: + owner: + description: Owner and group for the files + type: string + example: root:root + permissions: + description: Unix permissions for the files + type: string + example: '0644' + target: + description: Path to the target file on the android filesystem + type: string + example: /sdcard/Android/obb/com.foo.bar/ + ApplicationHooks: + description: ApplicationHooks describes the fields used to configure the hooks + of an application + type: object + properties: + timeout: + description: Time limit to wait for the hook to complete before timing out + type: string + example: 10m + ApplicationPatch: + description: ApplicationPatch represents the fields a user can modify + type: object + properties: + addons: + description: List of addons enabled for the application + type: array + items: + type: string + example: + - ssh + - gms + boot_activity: + description: Name of the boot package for the version + type: string + example: com.foo.bar.MainActivity + bootstrap: + $ref: '#/definitions/ApplicationBootstrap' + features: + description: List of features supported by the application + type: array + items: + type: string + example: + - feature1 + - feature2 + hooks: + $ref: '#/definitions/ApplicationHooks' + image: + description: Base image id or name to use for the applicaiton + type: string + example: btavtegj1qm58qg7ru50 + inhibit_auto_updates: + description: Whether or not to auto update the application's base image + type: boolean + example: false + instance-type: + description: Instance type to use for the application + type: string + example: a3.4 + manifest_version: + description: Version of the manifest used to create the application + type: string + example: '0.1' + node_selector: + description: List of tags for filtering the nodes to run the application on + type: array + items: + type: string + example: + - gpu=nvidia + - cpu=intel + required_permissions: + description: Required android application permissions + type: array + items: + type: string + example: + - android.permission.WRITE_EXTERNAL_STORAGE + - android.permission.READ_EXTERNAL_STORAGE + resources: + $ref: '#/definitions/ApplicationResourcesPost' + services: + description: 'List of services exposed by the application that should be expose + on the instance + + For application version update, changing those values would trigger a new + application version creation' + type: array + items: + $ref: '#/definitions/NetworkServiceSpec' + tags: + description: Tags to attach to the application + type: array + items: + type: string + example: + - created_by=anbox + video_encoder: + $ref: '#/definitions/VideoEncoderType' + watchdog: + $ref: '#/definitions/ApplicationWatchdog' + ApplicationResources: + description: ApplicationResources describes resources allocated for an application + type: object + properties: + cpus: + description: Number of CPUs required by the application + type: integer + format: int64 + example: 2 + disk-size: + description: Storage size required by the application + type: string + example: 3GB + gpu-slots: + description: Number of GPU slots required by the application + type: integer + format: int64 + example: 2 + memory: + description: Memory to be assigned to the application + type: string + example: 3GB + vpu-slots: + description: Number of VPU slots required by the application + type: integer + format: int64 + example: 1 + ApplicationResourcesPost: + description: ApplicationResourcesPost represents the fields used to update an + application resource + type: object + properties: + cpus: + description: Number of CPUs required by the application + type: integer + format: int64 + example: 2 + disk-size: + description: Storage size required by the application + type: string + example: 3GB + gpu-slots: + description: Number of GPU slots required by the application + type: integer + format: int64 + example: 2 + memory: + description: Memory to be assigned to the application + type: string + example: 3GB + vpu-slots: + description: Number of VPU slots required by the application + type: integer + format: int64 + example: 1 + ApplicationStatus: + description: ApplicationStatus represents the status an application can be in + type: integer + format: int64 + ApplicationVersion: + description: ApplicationVersion describes a single version of an application + type: object + properties: + addons: + description: List of addons enabled for the version + type: array + items: + $ref: '#/definitions/ApplicationAddon' + boot_activity: + description: Name of the boot package for the version + type: string + example: com.foo.bar.MainActivity + bootstrap: + $ref: '#/definitions/ApplicationBootstrap' + created_at: + description: Creation UTC timestamp of the version + type: integer + format: int64 + example: 1532150640 + error_message: + description: Error message in case the application ran into an error + type: string + example: '{}' + extra_data: + description: Extra data to be setup on the instance on application creation type: object - ContainerExecControl: - description: ContainerExecControl represents a message on the container shell "control" socket + additionalProperties: + $ref: '#/definitions/ApplicationExtraData' + example: {} + features: + description: List of features supported by the application + type: array + items: + type: string + example: + - feature1 + - feature2 + hooks: + $ref: '#/definitions/ApplicationHooks' + manifest_version: + description: Version of the manifest used to create the application + type: string + example: '0.1' + number: + description: Version of the application + type: integer + format: int64 + example: 0 + parent_image_id: + description: Parent image used for the application version + type: string + example: btavtegj1qm58qg7ru50 + parent_image_version: + description: Parent image version to use for the application version + type: integer + format: int64 + example: 0 + published: + description: Whether or not the version is published + type: boolean + example: false + required_permissions: + description: Required android application permissions + type: array + items: + type: string + example: + - android.permission.WRITE_EXTERNAL_STORAGE + - android.permission.READ_EXTERNAL_STORAGE + services: + description: List of services exposed by the application that should be exposed + on the instance + type: array + items: + $ref: '#/definitions/NetworkServiceSpec' + status: + description: Current status of the version + type: string + enum: + - initializing + - unknown + - ready + - deleted + - error + example: deleted + status_code: + $ref: '#/definitions/ImageStatus' + video_encoder: + $ref: '#/definitions/VideoEncoderType' + watchdog: + $ref: '#/definitions/ApplicationWatchdog' + ApplicationVersionDelete: + description: ApplicationVersionDelete represents the fields used to delete an + application version + type: object + properties: + force: + description: Whether deletion of the application version should be forced + type: boolean + example: false + ApplicationVersionPatch: + description: ApplicationVersionPatch represents the fields used to update an application + version + type: object + properties: + published: + description: Used to publish a specific version of the application + type: boolean + example: true + ApplicationWatchdog: + description: ApplicationWatchdog describes the fields used to update an application + watchdog + type: object + properties: + allowed-packages: + description: List of android packages to enable the watchdog for + type: array + items: + type: string + example: + - com.android.settings + disabled: + description: Whether or not to enable the watchdog for the application + type: boolean + example: true + ApplicationsDelete: + description: ApplicationsDelete represents a list of application to delete together + type: object + properties: + force: + description: Whether deletion of the applications should be forced + type: boolean + example: false + ids: + description: IDs or names of the applications to delete + type: array + items: + type: string + example: + - cilsreunfpfec9b1ktg0 + - cilsreunfpfec9b1ktg1 + - myapp + Certificate: + description: Certificate represents an available client certificate + type: object + properties: + certificate: + description: Base64 encoded certificate content without the header or the + footer + type: string + example: MIIFUTCCAzmgAw...xjKoUEEQOzJ9 + fingerprint: + description: SHA-256 fingerprint of the certificate + type: string + example: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 + CertificatesPost: + description: CertificatesPost represents the fields of a new auth provided certificate + type: object + properties: + certificate: + description: Base64 encoded certificate content without the header or the + footer + type: string + example: MIIFUTCCAzmgAw...xjKoUEEQOzJ9 + trust-password: + description: TrustPassword is used to register a new client with the service + type: string + example: sUp3rs3cr3t + CollectionResponse: + description: Collection Response + allOf: + - $ref: '#/definitions/NoMetaSyncResponse' + - type: object properties: - args: - additionalProperties: - type: string - description: Arguments to pass to the command - example: - height: 720 - width: 1280 - type: object - command: - description: 'Command to execute. Possible values are: window-resize, signal' - example: window-resize - type: string - signal: - description: Signal to send - format: int64 - type: integer + total_size: + description: Total Count of the collection + type: integer + format: int64 + example: 99 + ConfigItem: + description: ConfigItem represents a single configuration item + type: object + properties: + name: + type: string + value: + type: string + ConfigPost: + description: ConfigPost contains the field necessary to set or update a config + item + type: object + properties: + name: + type: string + example: application.auto_publish + value: + type: string + example: 'false' + Container: + description: Container represents a single container + type: object + properties: + address: + description: Address is the IP address of the container + type: string + example: 192.168.1.74 + app_id: + description: 'AppID is the ID of the application the container is created + from. Empty if the + + container has not been created from an application.' + type: string + example: cilsiomnfpfec9b1kteg + app_name: + description: 'AppName is the name of the application the container is created + from. Empty if the + + container has not been created from an application.' + type: string + example: myapp + app_version: + description: 'AppVersion is the version of the application the container is + created from. Empty if the + + container has not been created from an application.' + type: integer + format: int64 + example: 0 + architecture: + description: Architecture describes the CPU archtitecture the container is + using + type: string + example: aarch64 + config: + description: Config summarizes the configuration the container uses type: object - ContainerExecPost: - description: ContainerExecPost represents an container execution request properties: - command: - description: Command inside the container to execute - example: /bin/ls - items: - type: string - type: array - environment: - additionalProperties: - type: string - description: Environment to setup when the command is executed. - example: - FOO: bar - type: object - height: - description: Height of the terminal. Only required when `interactive` is set to `true`. - format: int64 - type: integer - 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`. - format: int64 - type: integer + 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 container + type: boolean + disable_watchdog: + description: DisableWatchdog defines whether the watchdog is disabled + type: boolean + metrics_server: + description: MetricsServer specifies a metrics server the container will + use + type: string + example: 10.0.0.45:8086 + platform: + description: Platform specifies the Anbox platform the container is running + with + type: string + example: webrtc + created_at: + description: CreatedAt specifies the time at which the container was created + type: integer + format: int64 + example: 1689604498 + error_message: + description: ErrorMessage provides an error message when the container status + is set to error. + type: string + example: container failed to boot + id: + description: ID of the container + type: string + example: cilsreunfpfec9b1ktg0 + image_id: + description: 'ImageID is the ID of the image the container is created from. + Empty if the + + container has not been created from an image.' + type: string + example: cilshrmnfpfec9b1kte0 + image_version: + description: 'ImageVersion is the version of the image the container is created + from. Empty if the + + container has not been created from an image.' + type: integer + format: int64 + example: 0 + name: + description: Name of the container. Typically in the format "ams-". + type: string + example: ams-cilsreunfpfec9b1ktg0 + node: + description: Node the container is running on + type: string + example: lxd0 + public_address: + description: 'PublicAddress is the external IP address the container is accessible + on (in most + + cases the IP of the node it is running on)' + type: string + example: 1.2.3.4 + resources: + description: Resources specifies the resources allocated for the container type: object - ContainerPatch: - description: ContainerPatch describes the fields which can be changed for an existing container properties: - desired_status: - description: Desired status of the container - type: string + cpus: + description: CPUs cores assigned to the container + type: integer + format: int64 + example: 2 + disk-size: + description: DiskSize specifies the amount of storage assigned to the + container + type: string + example: 3GB + gpu-slots: + description: GPUSlots specifies the number of GPU slots the container + got allocated + type: integer + format: int64 + example: 1 + memory: + description: Memory assigned to the container + type: string + example: 3GB + vpu-slots: + description: VPUSlots specifies the number of VPU slots the container + type: integer + format: int64 + services: + description: Services the container exposes + type: array + items: + $ref: '#/definitions/ContainerService' + status: + description: Status of the container + type: string + example: running + status_code: + $ref: '#/definitions/ContainerStatus' + stored_logs: + description: StoredLogs lists log files AMS stores for the container. + type: array + items: + type: string + example: + - android.log + - system.log + tags: + description: Tags specifies the tags the container has assigned + type: array + items: + type: string + example: + - foo + - bar + type: + $ref: '#/definitions/ContainerType' + ContainerDelete: + description: ContainerDelete describes a request used to delete a container + type: object + properties: + force: + description: Whether deletion of the container should be forced + type: boolean + ContainerExecControl: + description: ContainerExecControl represents a message on the container shell + "control" socket + type: object + properties: + args: + description: Arguments to pass to the command type: object - ContainerService: - description: |- - While NetworkServiceSpec defines what the user requests, ContainerService is what is actually - opened on the container. - 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. - example: myservice - type: string - 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. - example: 4000 - format: int64 - type: integer - node_port_end: - description: |- - NodePortEnd, if specified, denotes the end of the port range on the node starting - at NodePort - example: 4010 - format: int64 - type: integer - port: - description: Port is the port the container provides a service on - example: 3000 - format: int64 - type: integer - port_end: - description: PortEnd, if specified, denotes the end of the port range starting at Port - example: 3010 - format: int64 - type: integer - protocols: - description: List of network protocols (tcp, udp) the port should be exposed for - example: - - tcp - - udp - items: - $ref: '#/definitions/NetworkProtocol' - type: array - title: ContainerService describes a single service the container exposes to the outside world. + additionalProperties: + type: string + example: + height: 720 + width: 1280 + command: + description: 'Command to execute. Possible values are: window-resize, signal' + type: string + example: window-resize + signal: + description: Signal to send + type: integer + format: int64 + ContainerExecPost: + description: ContainerExecPost represents an container execution request + type: object + properties: + command: + description: Command inside the container to execute + type: array + items: + type: string + example: /bin/ls + environment: + description: Environment to setup when the command is executed. type: object - ContainerStatus: - description: ContainerStatus represents the status a container can be in + 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 + ContainerPatch: + description: ContainerPatch describes the fields which can be changed for an existing + container + type: object + properties: + desired_status: + description: Desired status of the container + type: string + ContainerService: + description: 'While NetworkServiceSpec defines what the user requests, ContainerService + is what is actually + + opened on the container.' + type: object + title: ContainerService describes a single service the container 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 container a hint what the exposed port is being + used for. This + + allows further tweaks inside the container 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 container provides a service on type: integer - ContainerType: - description: 'Possible values are: regular, base, unknown' - title: ContainerType describes the type of a container. + 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: '#/definitions/NetworkProtocol' + example: + - tcp + - udp + ContainerStatus: + description: ContainerStatus represents the status a container can be in + type: integer + format: int64 + ContainerType: + description: 'Possible values are: regular, base, unknown' + type: string + title: ContainerType describes the type of a container. + ContainersDelete: + description: ContainersDelete represents a list of containers to delete together + type: object + properties: + force: + description: Whether deletion of the containers should be forced + type: boolean + ids: + description: IDs of the containers to delete + type: array + items: + type: string + example: + - cilsreunfpfec9b1ktg0 + - cilsreunfpfec9b1ktg1 + ContainersPost: + description: 'ContainersPost represents the fields required to launch a new container + for + + a specific application' + type: object + properties: + addons: + description: Addons to enable for the container + 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 - ContainersDelete: - description: ContainersDelete represents a list of containers to delete together + 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: - force: - description: Whether deletion of the containers should be forced - type: boolean - ids: - description: IDs of the containers to delete - example: - - cilsreunfpfec9b1ktg0 - - cilsreunfpfec9b1ktg1 - items: - type: string - type: array + 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 container + type: boolean + disable_watchdog: + description: DisableWatchdog defines whether the watchdog is disabled + type: boolean + features: + description: Feature flags to enable for the container. + type: string + example: feature0, feature1 + metrics_server: + description: MetricsServer specifies a metrics server the container will + use + type: string + example: 10.0.0.45:8086 + platform: + description: Platform specifies the Anbox platform the container is running + with + type: string + example: webrtc + cpus: + description: Number of CPU cores the container should get assigned. + type: integer + format: int64 + example: 4 + disk_size: + description: Disk size the container should get allocated in bytes + type: integer + format: int64 + example: 3221225472 + gpu-slots: + description: Number of GPU slots the container should get assigned. + type: integer + format: int64 + example: 1 + 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 + instance_type: + description: 'Instance type to use for the container. + + Example a2.3' + type: string + memory: + description: Memory the container should get assigned in bytes. + type: integer + format: int64 + example: 3221225472 + no_start: + description: Do not start the container after creation. + type: boolean + node: + description: Node to start the container on. If empty node will be automatically + selected. + type: string + example: lxd0 + services: + description: Services to enable for the container + type: array + items: + $ref: '#/definitions/NetworkServiceSpec' + tags: + description: Tags which will be assigned to the container + type: array + items: + type: string + example: + - tag0 + - tag1 + user_data: + description: User data to pass to the container. + type: string + example: '{\"key\":\"value\"}' + vpu-slots: + description: Number of VPU slots the container should get assigned + type: integer + format: int64 + example: 1 + Event: + description: Event defines the structure of an event sent on the events API endpoint + type: object + properties: + metadata: + description: Metadata represents the actual event data + example: '{ "class": "task", "created_at": "2017-07-28T05:02:22.92201407Z", + "description": "Deleting container", "err": "", "id": "bc85137b-b20d-470a-a6ea-daa9a2b8506a", + "may_cancel": false, "metadata": null, "resources": { "containers": [ "/1.0/containers/c0946voj1qm6t2783db0" + ] }, "server_address": "", "status": "Success", "status_code": 200, "updated_at": + "2017-07-28T05:02:22.92201407Z" }' + timestamp: + description: Timestamp (in ISO8601 format) is filled when sending the event + if empty + example: '2017-07-28T05:02:22.92201407Z' + type: + description: 'Type defines the type of event. Listeners can watch specific + + event types' + type: string + enum: + - operation + - lifecycle + Image: + description: Image represents an image available in AMS + type: object + properties: + architecture: + description: CPU architecture supported by the image + type: string + example: x86_64 + default: + description: Flag to show whether the image is used by default if no image + name is provided + type: boolean + example: false + id: + description: ID of the image + type: string + example: btavtegj1qm58qg7ru50 + immutable: + description: Flag to show whether the image can be edited by an AMS instance + or not + type: boolean + example: false + name: + description: Name of the image + type: string + example: my-image + status: + description: Current status of the image + type: string + enum: + - error + - created + - active + - initializing + - unknown + example: active + status_code: + $ref: '#/definitions/ImageStatus' + type: + $ref: '#/definitions/ImageType' + used_by: + description: List of application ids using the image as a base + type: array + items: + type: string + example: + - btavtegj1qm58asf123 + versions: + description: List of versions for the image + type: array + items: + $ref: '#/definitions/ImageVersion' + ImageDelete: + description: ImageDelete describes a request used to delete an image + type: object + properties: + force: + type: boolean + ImagePatch: + description: ImagePatch represents the fields to update an existing image + type: object + properties: + default: + description: Make the image as default + type: boolean + example: true + force_sync: + description: 'ForceSync forces synchronization of the image from the remote + image server + + Examle: true' + type: boolean + ImageStatus: + description: ImageStatus represents the status of an image + type: integer + format: int64 + ImageType: + description: ImageType specifies the type of an image + type: string + ImageVersion: + description: ImageVersion describes a single version of an image + type: object + properties: + created_at: + description: Creation UTC timestamp of the image + type: integer + format: int64 + example: 1610641117 + fingerprint: + description: Fingerprint of the image version + type: string + example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261 + remote_id: + description: Version of the image in the remote server + type: string + example: 1.2.3 + size: + description: Size (in bytes) of the image version + type: integer + format: int64 + example: 529887868 + status: + description: Current status of the image + type: string + enum: + - error + - created + - active + - initializing + - unknown + example: active + status_code: + $ref: '#/definitions/ImageStatus' + version: + description: Version for the image + type: integer + format: int64 + example: 0 + ImagesGet: + description: ImagesGet represents a list of images + type: object + properties: + images: + type: array + items: + $ref: '#/definitions/Image' + ImagesPost: + description: ImagesPost represents the fields to upload a new image + type: object + properties: + default: + description: Make the image as default + type: boolean + example: false + name: + description: Name of the image + type: string + example: my-image + path: + description: Path to store the image + type: string + example: /save/image + type: + $ref: '#/definitions/ImageType' + 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 - ContainersPost: - description: |- - ContainersPost represents the fields required to launch a new container for - a specific application properties: - addons: - description: Addons to enable for the container - example: - - addon0 - - addon1 - items: - type: string - type: array - app_id: - description: ID of the application to use. Can be empty if an image ID is specified instead - example: cilsiomnfpfec9b1kteg - type: string - app_version: - description: Version of the application to use. If not specified, the latest version is used. - example: 0 - format: int64 - type: integer - config: - properties: - boot_activity: - description: BootActivity specifies the Android activity which is started by default - example: com.android.settings/.DevSettings - type: string - boot_package: - description: BootPackage specifies the Android application package name which is started by default - example: com.android.settings - type: string - devmode: - description: DevMode specifies if development mode has been turned on for the container - type: boolean - disable_watchdog: - description: DisableWatchdog defines whether the watchdog is disabled - type: boolean - features: - description: Feature flags to enable for the container. - example: feature0, feature1 - type: string - metrics_server: - description: MetricsServer specifies a metrics server the container will use - example: 10.0.0.45:8086 - type: string - platform: - description: Platform specifies the Anbox platform the container is running with - example: webrtc - type: string - type: object - cpus: - description: Number of CPU cores the container should get assigned. - example: 4 - format: int64 - type: integer - disk_size: - description: Disk size the container should get allocated in bytes - example: 3221225472 - format: int64 + 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 - gpu-slots: - description: Number of GPU slots the container should get assigned. - example: 1 format: int64 + fps: + description: FPS is the frame rate of the virtual display type: integer - image_id: - description: ID of the image to use. Can be empty if an application ID is specified instead. - example: cilshrmnfpfec9b1kte0 - type: string - image_version: - description: Version of the image to use. If not specified, the latest version is used. - example: 0 format: int64 + height: + description: Height is the height of the virtual display type: integer - instance_type: - description: |- - Instance type to use for the container. - Example a2.3 - type: string - memory: - description: Memory the container should get assigned in bytes. - example: 3221225472 format: int64 + width: + description: Width is the width of the virtual display type: integer - no_start: - description: Do not start the container after creation. - type: boolean - node: - description: Node to start the container on. If empty node will be automatically selected. - example: lxd0 - type: string - services: - description: Services to enable for the container - items: - $ref: '#/definitions/NetworkServiceSpec' - type: array - tags: - description: Tags which will be assigned to the container - example: - - tag0 - - tag1 - items: - type: string - type: array - user_data: - description: User data to pass to the container. - example: '{\"key\":\"value\"}' - type: string - vpu-slots: - description: Number of VPU slots the container should get assigned - example: 1 format: int64 - type: integer - type: object - Event: - description: Event defines the structure of an event sent on the events API endpoint - properties: - metadata: - description: Metadata represents the actual event data - example: '{ "class": "task", "created_at": "2017-07-28T05:02:22.92201407Z", "description": "Deleting container", "err": "", "id": "bc85137b-b20d-470a-a6ea-daa9a2b8506a", "may_cancel": false, "metadata": null, "resources": { "containers": [ "/1.0/containers/c0946voj1qm6t2783db0" ] }, "server_address": "", "status": "Success", "status_code": 200, "updated_at": "2017-07-28T05:02:22.92201407Z" }' - timestamp: - description: Timestamp (in ISO8601 format) is filled when sending the event if empty - example: "2017-07-28T05:02:22.92201407Z" - type: - description: |- - Type defines the type of event. Listeners can watch specific - event types - enum: - - operation - - lifecycle - type: string - type: object - Image: - description: Image represents an image available in AMS - properties: - architecture: - description: CPU architecture supported by the image - example: x86_64 - type: string - default: - description: Flag to show whether the image is used by default if no image name is provided - example: false - type: boolean - id: - description: ID of the image - example: btavtegj1qm58qg7ru50 - type: string - immutable: - description: Flag to show whether the image can be edited by an AMS instance or not - example: false - type: boolean - name: - description: Name of the image - example: my-image - type: string - status: - description: Current status of the image - enum: - - error - - created - - active - - initializing - - unknown - example: active - type: string - status_code: - $ref: '#/definitions/ImageStatus' - type: - $ref: '#/definitions/ImageType' - used_by: - description: List of application ids using the image as a base - example: - - btavtegj1qm58asf123 - items: - type: string - type: array - versions: - description: List of versions for the image - items: - $ref: '#/definitions/ImageVersion' - type: array - type: object - ImageDelete: - description: ImageDelete describes a request used to delete an image - properties: - force: - type: boolean - type: object - ImagePatch: - description: ImagePatch represents the fields to update an existing image - properties: - default: - description: Make the image as default - example: true - type: boolean - force_sync: - description: |- - ForceSync forces synchronization of the image from the remote image server - Examle: true - type: boolean - type: object - ImageStatus: - description: ImageStatus represents the status of an image + 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 - ImageType: - description: ImageType specifies the type of an image + format: int64 + example: 0 + name: + description: Name of the instance. Typically in the format "ams-". type: string - ImageVersion: - description: ImageVersion describes a single version of an image - properties: - created_at: - description: Creation UTC timestamp of the image - example: 1610641117 - format: int64 - type: integer - fingerprint: - description: Fingerprint of the image version - example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261 - type: string - remote_id: - description: Version of the image in the remote server - example: 1.2.3 - type: string - size: - description: Size (in bytes) of the image version - example: 529887868 - format: int64 - type: integer - status: - description: Current status of the image - enum: - - error - - created - - active - - initializing - - unknown - example: active - type: string - status_code: - $ref: '#/definitions/ImageStatus' - version: - description: Version for the image - example: 0 - format: int64 - type: integer + 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: '#/definitions/InstanceResources' + services: + description: Services the instance exposes + type: array + items: + $ref: '#/definitions/InstanceService' + status: + description: Status of the instance + type: string + example: running + status_code: + $ref: '#/definitions/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: '#/definitions/InstanceType' + 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 + InstanceExecControl: + description: InstanceExecControl represents a message on the instance shell "control" + socket + type: object + properties: + args: + description: Arguments to pass to the command type: object - ImagesGet: - description: ImagesGet represents a list of images - properties: - images: - items: - $ref: '#/definitions/Image' - type: array + additionalProperties: + type: string + example: + height: 720 + width: 1280 + command: + description: 'Command to execute. Possible values are: window-resize, signal' + type: string + example: window-resize + signal: + description: Signal to send + type: integer + format: int64 + 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 - ImagesPost: - description: ImagesPost represents the fields to upload a new image - properties: - default: - description: Make the image as default - example: false - type: boolean - name: - description: Name of the image - example: my-image - type: string - path: - description: Path to store the image - example: /save/image - type: string - type: - $ref: '#/definitions/ImageType' + 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 + 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 + 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: '#/definitions/NetworkProtocol' + example: + - tcp + - udp + InstanceStatus: + description: InstanceStatus represents the status a instance can be in + type: integer + format: int64 + InstanceType: + description: InstanceType describes the type of an instance (container, vm) + type: string + 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 + 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 - Instance: - description: Instance represents a single instance properties: - address: - description: Address is the IP address of the instance - example: 192.168.1.74 - type: string - 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. - example: cilsiomnfpfec9b1kteg - type: string - 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. - example: myapp - type: string - 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. - example: 0 - format: int64 - type: integer - architecture: - description: Architecture describes the CPU archtitecture the instance is using - example: aarch64 - type: string - base: - description: If this is a base instance or not - type: boolean - config: - description: Config summarizes the configuration the instance uses - properties: - boot_activity: - description: BootActivity specifies the Android activity which is started by default - example: com.android.settings/.DevSettings - type: string - boot_package: - description: BootPackage specifies the Android application package name which is started by default - example: com.android.settings - type: string - 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: - properties: - density: - description: Density is the piel density of the virtual display - format: int64 - type: integer - fps: - description: FPS is the frame rate of the virtual display - format: int64 - type: integer - height: - description: Height is the height of the virtual display - format: int64 - type: integer - width: - description: Width is the width of the virtual display - format: int64 - type: integer - type: object - 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 - example: 10.0.0.45:8086 - type: string - platform: - description: Platform specifies the Anbox platform the instance is running with - example: webrtc - type: string - type: object - created_at: - description: CreatedAt specifies the time at which the instance was created - example: 1689604498 - format: int64 + 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 - error_message: - description: ErrorMessage provides an error message when the instance status is set to error. - example: instance failed to boot - type: string - id: - description: ID of the instance - example: cilsreunfpfec9b1ktg0 - type: string - 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. - example: cilshrmnfpfec9b1kte0 - type: string - 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. - example: 0 format: int64 + fps: + description: FPS is the frame rate of the virtual display type: integer - name: - description: Name of the instance. Typically in the format "ams-". - example: ams-cilsreunfpfec9b1ktg0 - type: string - node: - description: Node the instance is running on - example: lxd0 - type: string - 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) - example: 1.2.3.4 - type: string - resources: - $ref: '#/definitions/InstanceResources' - services: - description: Services the instance exposes - items: - $ref: '#/definitions/InstanceService' - type: array - status: - description: Status of the instance - example: running - type: string - status_code: - $ref: '#/definitions/InstanceStatus' - status_message: - description: StatusMessage describes the current status of the instance - example: '"Waiting for image download"' - type: string - stored_logs: - description: StoredLogs lists log files AMS stores for the instance. - example: - - android.log - - system.log - items: - type: string - type: array - tags: - description: Tags specifies the tags the instance has assigned - example: - - foo - - bar - items: - type: string - type: array - type: - $ref: '#/definitions/InstanceType' - type: object - InstanceDelete: - description: InstanceDelete describes a request used to delete a instance - properties: - force: - description: Whether deletion of the instance should be forced - type: boolean - type: object - InstanceExecControl: - description: InstanceExecControl represents a message on the instance shell "control" socket - properties: - args: - additionalProperties: - type: string - description: Arguments to pass to the command - example: - height: 720 - width: 1280 - type: object - command: - description: 'Command to execute. Possible values are: window-resize, signal' - example: window-resize - type: string - signal: - description: Signal to send format: int64 + height: + description: Height is the height of the virtual display type: integer - type: object - InstanceExecPost: - description: InstanceExecPost represents an instance execution request - properties: - command: - description: Command inside the instance to execute - example: /bin/ls - items: - type: string - type: array - environment: - additionalProperties: - type: string - description: Environment to setup when the command is executed. - example: - FOO: bar - type: object - height: - description: Height of the terminal. Only required when `interactive` is set to `true`. format: int64 + width: + description: Width is the width of the virtual display type: integer - 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`. format: int64 - type: integer - type: object - InstancePatch: - description: InstancePatch describes the fields which can be changed for an existing instance - properties: - desired_status: - description: Desired status of the instance - type: string + 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 - InstanceResources: - description: InstanceResources represents resources assigned to an instance properties: - cpus: - description: CPUs cores assigned to the instance - example: 2 - format: int64 - type: integer - disk-size: - description: DiskSize specifies the amount of storage assigned to the instance in bytes - example: 3221225472 - format: int64 - type: integer - gpu-slots: - description: GPUSlots specifies the number of GPU slots the instance got allocated - example: 1 - format: int64 - type: integer - memory: - description: Memory assigned to the instance in bytes - example: 3221225472 - format: int64 - type: integer - vpu-slots: - description: VPUSlots specifies the number of VPU slots the instance - format: int64 - type: integer + 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: '#/definitions/NetworkServiceSpec' + tags: + description: Tags which will be assigned to the instance + type: array + items: + type: string + example: + - tag0 + - tag1 + type: + $ref: '#/definitions/InstanceType' + user_data: + description: User data to pass to the instance. + type: string + example: '{\"key\":\"value\"}' + NetworkProtocol: + description: NetworkProtocol describes a specific network protocol like TCP or + UDP a ContainerService can use + type: string + 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: '#/definitions/NetworkProtocol' + example: + - tcp + - udp + 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 + Node: + description: Node describes a single node of the underlying LXD cluster AMS manages + type: object + properties: + address: + description: Internal IP address of the node + type: string + format: ipv4 + example: 10.0.0.1 + architecture: + description: CPU architecture of the node + type: string + example: aarch64 + cpu_allocation_rate: + description: CPU allocation rate for the node + type: number + format: float + example: 4 + cpus: + description: Number of CPUs on the node + type: integer + format: int64 + example: 4 + disk_size: + description: Disk size for the node + type: string + example: 'true' + gpu_encoder_slots: + description: Number of GPU encoder slots present on the node + type: integer + format: int64 + example: 0 + gpu_slots: + description: Number of GPU slots present on the node + type: integer + format: int64 + example: 0 + gpus: + description: GPU information for the node + type: array + items: + $ref: '#/definitions/NodeGPU' + is_master: + description: Flag to represent the master node for the AMS cluster + type: boolean + example: true + managed: + description: Flag used to control if AMS can manage the LXD node + type: boolean + example: false + memory: + description: Memory (in GB) of the LXD node + type: string + example: 8GB + memory_allocation_rate: + description: Memory allocation rate for the node + type: number + format: float + example: 2 + name: + description: Name of the node + type: string + example: lxd0 + network_bridge_mtu: + description: MTU for the configured network bridge on LXD + type: integer + format: int64 + example: 1500 + public_address: + description: Public IP address of the node + type: string + format: ipv4 + example: 10.0.0.1 + status: + description: Current status of the node + type: string + example: online + status_code: + $ref: '#/definitions/NodeStatus' + storage_pool: + description: Name of the storage pool configured for the node + type: string + example: default + tags: + description: Tags attached to the node + type: array + items: + type: string + example: + - created_by=anbox + - gpu=nvidia + unscheduable: + description: DEPRECATED Flag in favour of `unschedulable` flag + type: boolean + example: false + unschedulable: + description: Flag used to see if the node is available to schedule containers + type: boolean + example: false + vpus: + description: VPU information for the node + type: array + items: + $ref: '#/definitions/NodeVPU' + NodeDelete: + description: NodeDelete describes a request used to delete a node + type: object + properties: + force: + description: Use this to force deletion of a node from AMS and LXD cluster + type: boolean + example: true + keep_in_cluster: + description: Use this to remove the node from the LXD cluster as well + type: boolean + example: true + NodeGPU: + description: NodeGPU describes a single GPU available on a node + type: object + properties: + allocations: + description: Map of current allocations and containers on the GPU type: object - InstanceService: - description: |- - While NetworkServiceSpec defines what the user requests, InstanceService is what is actually - opened on the instance. - 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. - example: myservice - type: string - 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. - example: 4000 - format: int64 - type: integer - node_port_end: - description: |- - NodePortEnd, if specified, denotes the end of the port range on the node starting - at NodePort - example: 4010 - format: int64 - type: integer - port: - description: Port is the port the instance provides a service on - example: 3000 - format: int64 - type: integer - port_end: - description: PortEnd, if specified, denotes the end of the port range starting at Port - example: 3010 - format: int64 - type: integer - protocols: - description: List of network protocols (tcp, udp) the port should be exposed for - example: - - tcp - - udp - items: - $ref: '#/definitions/NetworkProtocol' - type: array - title: InstanceService describes a single service the instance exposes to the outside world. + additionalProperties: + $ref: '#/definitions/NodeGPUAllocation' + encoder_slots: + description: Number of the encoder slots available on the GPU + type: integer + format: int64 + example: 20 + id: + description: ID of the GPU configured on the node + type: integer + format: uint64 + example: 0 + numa_node: + description: NUMA Node number for the GPU + type: integer + format: uint64 + example: 0 + pci_address: + description: PCI Bus Address used by the GPU + type: string + example: '00:08.0' + render_name: + description: PCI Bus Address used by the GPU + type: string + example: D129 + slots: + description: Number of the GPU slots available + type: integer + format: int64 + example: 20 + NodeGPUAllocation: + description: NodeGPUAllocation describes a single allocation on a GPU + type: object + properties: + encoder_slots: + description: Number of Encoder Slots allocated to the container + type: integer + format: int64 + example: 1 + gpus: + description: List of GPU IDs allocated to the container + type: array + items: + type: integer + format: uint64 + example: + - 0 + - 1 + slots: + description: Number of GPU Slots allocated to the container + type: integer + format: int64 + example: 1 + NodeGPUPatch: + description: NodeGPUPatch allows changing configuration for individual GPUs + type: object + properties: + encoder_slots: + description: Update the number of GPU encoder slots + type: integer + format: int64 + example: 4 + id: + description: ID of the GPU configured on the node + type: integer + format: uint64 + example: 0 + slots: + description: Update the number of the GPU slots available on the Node + type: integer + format: int64 + example: 20 + NodePatch: + description: NodePatch describes a request to update an existing node + type: object + properties: + cpu_allocation_rate: + description: Update the CPU allocation rate for the node + type: number + format: float + example: 4 + cpus: + description: Update the number of CPUs for the node + type: integer + format: int64 + example: 4 + gpu_encoder_slots: + description: Update the number of GPU encoder slots to configure on the node + type: integer + format: int64 + example: 4 + gpu_slots: + description: Update the number of GPU slots to configure on the node + type: integer + format: int64 + example: 2 + gpus: + type: array + items: + $ref: '#/definitions/NodeGPUPatch' + memory: + description: Update the memory (in GB) for the node + type: string + example: 2GB + memory_allocation_rate: + description: Update the memory allocation rate for the node + type: number + format: float + example: 2 + public_address: + description: Update the public IP Address of the node + type: string + format: ipv4 + example: 10.0.0.1 + subnet: + description: Update the subnet info of the node if the subnet of a node is + changed + type: string + format: ipv4 + example: 10.0.0.1/24 + tags: + description: Update the tags of the node + type: array + items: + type: string + example: + - created_by=anbox + - gpu=nvidia + unscheduable: + description: DEPRECATED Flag in favour of `unschedulable` flag + type: boolean + example: false + unschedulable: + description: Flag used to remove the node from scheduler and not schedule + containers on it + type: boolean + example: true + NodeStatus: + description: NodeStatus describes the current status of a node + type: integer + format: int64 + NodeVPU: + description: NodeVPU describes a single independent VPU available on a node + type: object + properties: + allocations: + description: Map of current allocations on the VPU type: object - InstanceStatus: - description: InstanceStatus represents the status a instance can be in + additionalProperties: + $ref: '#/definitions/NodeVPUAllocation' + id: + description: ID of the VPU + type: integer + format: uint64 + model: + description: Model name of the VPU + type: string + numa_node: + description: NUMA node the card sits on + type: integer + format: uint64 + slots: + description: Number of slots available on the VPU + type: integer format: int64 + type: + description: 'Type of the VPU. Valid values are: unknown, netint' + type: string + NodeVPUAllocation: + description: NodeVPUAllocation describes a single allocation for a VPU + type: object + properties: + ids: + description: VPU IDs the allocation is for + type: array + items: + type: integer + format: uint64 + slots: + description: Number of slots used by this allocation type: integer - InstanceType: - description: InstanceType describes the type of an instance (container, vm) + format: int64 + NodesPost: + description: NodesPost describes a request to create a new node on AMS + type: object + properties: + address: + description: Internal IP address of the node type: string - InstancesDelete: - description: InstancesDelete represents a list of instances to delete together - properties: - force: - description: Whether deletion of the instances should be forced - type: boolean - ids: - description: IDs of the instances to delete - example: - - cilsreunfpfec9b1ktg0 - - cilsreunfpfec9b1ktg1 - items: - type: string - type: array + format: ipv4 + example: 10.0.0.1 + cpu_allocation_rate: + description: CPU allocation rate for the node + type: number + format: float + example: 4 + cpus: + description: Number of CPUs on the node + type: integer + format: int64 + example: 4 + gpu_encoder_slots: + description: Number of GPU encoder slots to configure on the node + type: integer + format: int64 + example: 4 + gpu_slots: + description: Number of GPU slots to configure on the node + type: integer + format: int64 + example: 2 + memory: + description: Memory (in GB) of the node + type: string + example: 8GB + memory_allocation_rate: + description: Memory allocation rate for the node + type: number + format: float + example: 2 + name: + description: Name of the node + type: string + example: lxd0 + network_acl_name: + description: Name of the network ACL to create on the LXD node + type: string + example: ams0 + network_bridge_mtu: + description: MTU for the configured network bridge on LXD + type: integer + format: int64 + example: 1500 + network_name: + description: Name of the network bridge to create on the LXD node + type: string + example: amsbr0 + network_subnet: + description: CIDR of the subnet to configure for the network bridge on LXD + type: string + format: ipv4 + example: 10.0.0.0/24 + public_address: + description: Public IP address of the node + type: string + format: ipv4 + example: 10.0.0.1 + storage_device: + description: Storage device to use for configuring LXD storage pools + type: string + example: /dev/sdb + storage_pool: + description: Name of the storage pool to use for configuring the LXD node + type: string + example: default + tags: + description: Tags to attach to the node + type: array + items: + type: string + example: + - created_by=anbox + - gpu=nvidia + trust_password: + description: Trust password for the LXD instance + type: string + example: sUp3rs3cr3t + unmanaged: + description: Flag used to control if AMS can manage the LXD node + type: boolean + example: false + 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 - InstancesPost: - description: |- - InstancesPost represents the fields required to launch a new instance for - a specific application - properties: - addons: - description: Addons to enable for the instance - example: - - addon0 - - addon1 - items: - type: string - type: array - app_id: - description: ID of the application to use. Can be empty if an image ID is specified instead - example: cilsiomnfpfec9b1kteg - type: string - app_version: - description: Version of the application to use. If not specified, the latest version is used. - example: 0 - format: int64 - type: integer - config: - properties: - boot_activity: - description: BootActivity specifies the Android activity which is started by default - example: com.android.settings/.DevSettings - type: string - boot_package: - description: BootPackage specifies the Android application package name which is started by default - example: com.android.settings - type: string - 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 - properties: - density: - description: Density is the piel density of the virtual display - format: int64 - type: integer - fps: - description: FPS is the frame rate of the virtual display - format: int64 - type: integer - height: - description: Height is the height of the virtual display - format: int64 - type: integer - width: - description: Width is the width of the virtual display - format: int64 - type: integer - type: object - 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. - example: feature0, feature1 - type: string - metrics_server: - description: MetricsServer specifies a metrics server the instance will use - example: 10.0.0.45:8086 - type: string - platform: - description: Platform specifies the Anbox platform the instance is running with - example: webrtc - type: string - type: object - image_id: - description: ID of the image to use. Can be empty if an application ID is specified instead. - example: cilshrmnfpfec9b1kte0 - type: string - image_version: - description: Version of the image to use. If not specified, the latest version is used. - example: 0 - format: int64 - type: integer - 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. - example: lxd0 - type: string - resources: - description: Resources specifies the resources allocated for the instance - properties: - cpus: - description: Number of CPU cores the instance should get assigned. - example: 4 - format: int64 - type: integer - disk_size: - description: Disk size the instance should get allocated in bytes - example: 3221225472 - format: int64 - type: integer - gpu-slots: - description: Number of GPU slots the instance should get assigned. - example: 1 - format: int64 - type: integer - memory: - description: Memory the instance should get assigned in bytes. - example: 3221225472 - format: int64 - type: integer - vpu-slots: - description: Number of VPU slots the instance should get assigned - example: 1 - format: int64 - type: integer - type: object - services: - description: Services to enable for the instance - items: - $ref: '#/definitions/NetworkServiceSpec' - type: array - tags: - description: Tags which will be assigned to the instance - example: - - tag0 - - tag1 - items: - type: string - type: array - type: - $ref: '#/definitions/InstanceType' - user_data: - description: User data to pass to the instance. - example: '{\"key\":\"value\"}' - type: string + additionalProperties: {} + example: {} + resources: + description: 'Dictionnary of resource types (containers, snapshots, images) + + and affected resources' type: object - NetworkProtocol: - description: NetworkProtocol describes a specific network protocol like TCP or UDP a ContainerService can use + 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 - NetworkServiceSpec: - description: NetworkServiceSpec is used to define the user defined network services that should be opened on a container - 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 - example: 3000 - format: int64 - type: integer - port_end: - description: |- - PortEnd is the end of the port range set for a service. If empty, only a - single port is opened - example: 3010 - format: int64 - type: integer - protocols: - description: List of network protocols (tcp, udp) the port should be exposed for - example: - - tcp - - udp - items: - $ref: '#/definitions/NetworkProtocol' - type: array - type: object - NoMetaSyncResponse: - description: Swagger Synchronous response without metadata field - properties: - error_code: - description: Error code for the operation - example: 0 - format: int64 - type: integer - status: - description: Status of requested operation - example: Success - type: string - status_code: - description: Status code of the request - example: 200 - format: int64 - type: integer - type: - description: Type of operation response - example: sync - type: string - type: object - Node: - description: Node describes a single node of the underlying LXD cluster AMS manages - properties: - address: - description: Internal IP address of the node - example: 10.0.0.1 - format: ipv4 - type: string - architecture: - description: CPU architecture of the node - example: aarch64 - type: string - cpu_allocation_rate: - description: CPU allocation rate for the node - example: 4 - format: float - type: number - cpus: - description: Number of CPUs on the node - example: 4 - format: int64 - type: integer - disk_size: - description: Disk size for the node - example: "true" - type: string - gpu_encoder_slots: - description: Number of GPU encoder slots present on the node - example: 0 - format: int64 - type: integer - gpu_slots: - description: Number of GPU slots present on the node - example: 0 - format: int64 - type: integer - gpus: - description: GPU information for the node - items: - $ref: '#/definitions/NodeGPU' - type: array - is_master: - description: Flag to represent the master node for the AMS cluster - example: true - type: boolean - managed: - description: Flag used to control if AMS can manage the LXD node - example: false - type: boolean - memory: - description: Memory (in GB) of the LXD node - example: 8GB - type: string - memory_allocation_rate: - description: Memory allocation rate for the node - example: 2 - format: float - type: number - name: - description: Name of the node - example: lxd0 - type: string - network_bridge_mtu: - description: MTU for the configured network bridge on LXD - example: 1500 - format: int64 - type: integer - public_address: - description: Public IP address of the node - example: 10.0.0.1 - format: ipv4 - type: string - status: - description: Current status of the node - example: online - type: string - status_code: - $ref: '#/definitions/NodeStatus' - storage_pool: - description: Name of the storage pool configured for the node - example: default - type: string - tags: - description: Tags attached to the node - example: - - created_by=anbox - - gpu=nvidia - items: - type: string - type: array - unscheduable: - description: DEPRECATED Flag in favour of `unschedulable` flag - example: false - type: boolean - unschedulable: - description: Flag used to see if the node is available to schedule containers - example: false - type: boolean - vpus: - description: VPU information for the node - items: - $ref: '#/definitions/NodeVPU' - type: array - type: object - NodeDelete: - description: NodeDelete describes a request used to delete a node - properties: - force: - description: Use this to force deletion of a node from AMS and LXD cluster - example: true - type: boolean - keep_in_cluster: - description: Use this to remove the node from the LXD cluster as well - example: true - type: boolean - type: object - NodeGPU: - description: NodeGPU describes a single GPU available on a node - properties: - allocations: - additionalProperties: - $ref: '#/definitions/NodeGPUAllocation' - description: Map of current allocations and containers on the GPU - type: object - encoder_slots: - description: Number of the encoder slots available on the GPU - example: 20 - format: int64 - type: integer - id: - description: ID of the GPU configured on the node - example: 0 - format: uint64 - type: integer - numa_node: - description: NUMA Node number for the GPU - example: 0 - format: uint64 - type: integer - pci_address: - description: PCI Bus Address used by the GPU - example: "00:08.0" - type: string - render_name: - description: PCI Bus Address used by the GPU - example: D129 - type: string - slots: - description: Number of the GPU slots available - example: 20 - format: int64 - type: integer - type: object - NodeGPUAllocation: - description: NodeGPUAllocation describes a single allocation on a GPU - properties: - encoder_slots: - description: Number of Encoder Slots allocated to the container - example: 1 - format: int64 - type: integer - gpus: - description: List of GPU IDs allocated to the container - example: - - 0 - - 1 - items: - format: uint64 - type: integer - type: array - slots: - description: Number of GPU Slots allocated to the container - example: 1 - format: int64 - type: integer - type: object - NodeGPUPatch: - description: NodeGPUPatch allows changing configuration for individual GPUs - properties: - encoder_slots: - description: Update the number of GPU encoder slots - example: 4 - format: int64 - type: integer - id: - description: ID of the GPU configured on the node - example: 0 - format: uint64 - type: integer - slots: - description: Update the number of the GPU slots available on the Node - example: 20 - format: int64 - type: integer - type: object - NodePatch: - description: NodePatch describes a request to update an existing node - properties: - cpu_allocation_rate: - description: Update the CPU allocation rate for the node - example: 4 - format: float - type: number - cpus: - description: Update the number of CPUs for the node - example: 4 - format: int64 - type: integer - gpu_encoder_slots: - description: Update the number of GPU encoder slots to configure on the node - example: 4 - format: int64 - type: integer - gpu_slots: - description: Update the number of GPU slots to configure on the node - example: 2 - format: int64 - type: integer - gpus: - items: - $ref: '#/definitions/NodeGPUPatch' - type: array - memory: - description: Update the memory (in GB) for the node - example: 2GB - type: string - memory_allocation_rate: - description: Update the memory allocation rate for the node - example: 2 - format: float - type: number - public_address: - description: Update the public IP Address of the node - example: 10.0.0.1 - format: ipv4 - type: string - subnet: - description: Update the subnet info of the node if the subnet of a node is changed - example: 10.0.0.1/24 - format: ipv4 - type: string - tags: - description: Update the tags of the node - example: - - created_by=anbox - - gpu=nvidia - items: - type: string - type: array - unscheduable: - description: DEPRECATED Flag in favour of `unschedulable` flag - example: false - type: boolean - unschedulable: - description: Flag used to remove the node from scheduler and not schedule containers on it - example: true - type: boolean - type: object - NodeStatus: - description: NodeStatus describes the current status of a node - format: int64 + format: ipv4 + status: + description: String version of the operation status + type: string + example: Running + status_code: + $ref: '#/definitions/StatusCode' + updated_at: + description: When the operation was updated + type: string + format: date-time + OperationResponse: + description: Operation + type: object + properties: + metadata: + $ref: '#/definitions/Operation' + operation: + type: string + example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1 + status: + type: string + example: Operation created + status_code: type: integer - NodeVPU: - description: NodeVPU describes a single independent VPU available on a node - properties: - allocations: - additionalProperties: - $ref: '#/definitions/NodeVPUAllocation' - description: Map of current allocations on the VPU - type: object - id: - description: ID of the VPU - format: uint64 - type: integer - model: - description: Model name of the VPU - type: string - numa_node: - description: NUMA node the card sits on - format: uint64 - type: integer - slots: - description: Number of slots available on the VPU - format: int64 - type: integer - type: - description: 'Type of the VPU. Valid values are: unknown, netint' - type: string - type: object - NodeVPUAllocation: - description: NodeVPUAllocation describes a single allocation for a VPU - properties: - ids: - description: VPU IDs the allocation is for - items: - format: uint64 - type: integer - type: array - slots: - description: Number of slots used by this allocation - format: int64 - type: integer - type: object - NodesPost: - description: NodesPost describes a request to create a new node on AMS - properties: - address: - description: Internal IP address of the node - example: 10.0.0.1 - format: ipv4 - type: string - cpu_allocation_rate: - description: CPU allocation rate for the node - example: 4 - format: float - type: number - cpus: - description: Number of CPUs on the node - example: 4 - format: int64 - type: integer - gpu_encoder_slots: - description: Number of GPU encoder slots to configure on the node - example: 4 - format: int64 - type: integer - gpu_slots: - description: Number of GPU slots to configure on the node - example: 2 - format: int64 - type: integer - memory: - description: Memory (in GB) of the node - example: 8GB - type: string - memory_allocation_rate: - description: Memory allocation rate for the node - example: 2 - format: float - type: number - name: - description: Name of the node - example: lxd0 - type: string - network_acl_name: - description: Name of the network ACL to create on the LXD node - example: ams0 - type: string - network_bridge_mtu: - description: MTU for the configured network bridge on LXD - example: 1500 - format: int64 - type: integer - network_name: - description: Name of the network bridge to create on the LXD node - example: amsbr0 - type: string - network_subnet: - description: CIDR of the subnet to configure for the network bridge on LXD - example: 10.0.0.0/24 - format: ipv4 - type: string - public_address: - description: Public IP address of the node - example: 10.0.0.1 - format: ipv4 - type: string - storage_device: - description: Storage device to use for configuring LXD storage pools - example: /dev/sdb - type: string - storage_pool: - description: Name of the storage pool to use for configuring the LXD node - example: default - type: string - tags: - description: Tags to attach to the node - example: - - created_by=anbox - - gpu=nvidia - items: - type: string - type: array - trust_password: - description: Trust password for the LXD instance - example: sUp3rs3cr3t - type: string - unmanaged: - description: Flag used to control if AMS can manage the LXD node - example: false - type: boolean - type: object - Operation: - description: Operation represents a background operation - properties: - class: - description: Class of the operation - enum: - - task - - websocket - - token - example: task - type: string - created_at: - description: When the operation was created - format: date-time - type: string - description: - description: Human readable description of the operation - example: updating addon 3apqo5te - type: string - err: - description: The error string if the operation failed - type: string - id: - description: UUID of the operation - example: c6832c58-0867-467e-b245-2962d6527876 - type: string - may_cancel: - description: Whether this operation can be canceled (DELETE over REST) - example: false - type: boolean - metadata: - additionalProperties: {} - description: Metadata related to the operation and affected resources - example: {} - type: object - resources: - additionalProperties: - items: - type: string - type: array - description: |- - Dictionnary of resource types (containers, snapshots, images) - and affected resources - example: - applications: - - /1.0/applications/my-app - type: object - server_address: - description: The address of the server where the operation ran - format: ipv4 - type: string - status: - description: String version of the operation status - example: Running - type: string - status_code: - $ref: '#/definitions/StatusCode' - updated_at: - description: When the operation was updated - format: date-time - type: string - type: object - OperationResponse: - description: Operation - properties: - metadata: - $ref: '#/definitions/Operation' - operation: - example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1 - type: string - status: - example: Operation created - type: string - status_code: - example: 100 - format: int64 - type: integer - type: - example: async - type: string - type: object - ServiceStatus: - description: ServiceStatus represents the status of the AMS service - properties: - api_extensions: - description: List of supported features for the service version running - example: - - addon_restore_hook - - container_logs - - registry - items: - type: string - type: array - api_status: - description: Shows the API stability status - example: stable - type: string - api_version: - description: API version for the service - example: "1.0" - type: string - auth: - description: Used to see if the client is trusted. Can be `trusted` or `untrusted`. - example: untrusted - type: string - auth_methods: - description: Authentication method used for the requests. - example: 2waySSL - items: - type: string - type: array - cluster_id: - description: ID of the subcluster the AMS instance is part of - example: cilsreunfpfec9b1ktg0 - type: string - cluster_name: - description: Name of the subcluster the AMS instance is part of - example: prod0 - type: string - type: object - StatusCode: - description: StatusCode represents a valid REST operation format: int64 - type: integer - Task: - description: Task is the scheduling unit AMS uses for container launches - properties: - id: - description: ID of the task - example: c055dl0j1qm027422feg - type: string - object_id: - description: ID of the object that the task is operating on - example: c055dl0j1qm027422fe0 - type: string - object_type: - description: Type of the object that the task is operating on - example: container - type: string - status: - description: Status of the task - enum: - - created - - prepared - - started - - running - - stopped - - shutdown - - completed - - error - - deleted - - unknown - example: running - type: string - type: object - VersionGet: - description: VersionGet is the JSON response from the API version request method - properties: - version: - type: string - type: object - VersionResponse: - description: VersionResponse shows the version for the running service - properties: - version: - description: Version of the service - example: 1.18.2 - type: string - type: object - VideoEncoderType: - description: VideoEncoderType describes the type of a video encoder is used by an application + example: 100 + type: type: string -info: - description: |- - The Anbox Management Service (AMS) external REST API is the REST API used by - all AMS clients. Note that internal endpoints are not included in this - documentation. - - The AMS API is available over both a local unix+http and a remote https API. - Authentication for local users relies on group membership and access to the - unix socket. For remote users, the default authentication method is TLS client - certificates. - title: AMS external REST API - version: "1.0" -paths: - /1.0/: - get: - description: |- - This endpoint returns the service status and its supported API extensions. - It also returns whether the connection is trusted or not. - operationId: service_get - produces: - - application/json - responses: - "200": - description: Current config for the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/ServiceStatus' - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get the status and features supported by the service - tags: - - service - /1.0/addons: - get: - description: This endpoint returns a list of addons in AMS. - operationId: addons_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/addons/foo", - "/1.0/addons/bar" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of addons - tags: - - addons - post: - consumes: - - application/octet-stream - description: |- - This enpoint creates a new addon by uploading a package with the addon - manifest and hooks. The package format must be bzip2 or zip archive. - - Required Extensions: - `zip_archive_support`: To use the zip format, the server must have the extension. - operationId: addons_post - parameters: - - description: SHA-256 fingerprint of package e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: 'JSON encoded byte string of addon details e.g { "name": "my-addon" }' - in: header - name: X-AMS-Request - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Create a new addon - tags: - - addons - /1.0/addons/{name}: - delete: - consumes: - - application/json - description: This endpoint deletes an addon stored in AMS. - operationId: addon_delete - parameters: - - description: Name of the addon to delete - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete an addon - tags: - - addons - get: - consumes: - - application/json - description: This endpoint gets the information of an addon stored in AMS. - operationId: addon_get - parameters: - - description: Name of the addon to retrieve - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Addon' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get an addon - tags: - - addons - patch: - consumes: - - application/octet-stream - description: |- - This endpoint updates an addon's metadata and creates a new addon version - for it. - operationId: addon_patch - parameters: - - description: SHA-256 fingerprint of addon payload e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: Json encoded byte string of addon details e.g {} - in: header - name: X-AMS-Request - required: true - type: string - - description: Name of the addon to update - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update an addon with a new package - tags: - - addons - /1.0/addons/{name}/{version}: - delete: - consumes: - - application/json - description: This endpoint deletes a specific version of an addon. - operationId: addon_version_delete - parameters: - - description: Name of the addon whose version needs to be deleted - in: path - name: name - required: true - type: string - - description: Version of the addon to delete - in: path - name: version - required: true - type: integer - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete an addon version - tags: - - addons - /1.0/addons?recursion=1: - get: - description: This endpoint returns a list of available addons in the cluster. - operationId: addons_get_recursion1 - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - items: - $ref: '#/definitions/Addon' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of addons expanded - tags: - - addons - /1.0/applications: - delete: - consumes: - - application/json - description: |- - This endpoint deletes multiple applications. If the deletion of a single application - fails the operation is aborted and an error is returned. - operationId: applications_delete - parameters: - - description: List of applications to delete - in: body - name: details - schema: - $ref: '#/definitions/ApplicationsDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Delete multiple applications - tags: - - applications - get: - description: This endpoint returns a list of available applications. - operationId: applications_get - parameters: - - default: 0 - description: Index to start listing the records - in: query - name: offset - type: integer - - default: -1 - description: Limit the number of returned records - in: query - name: limit - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter applications by id. This is an exact match for the string. - example: btavtegj1qm58qg7ru50 - in: query - name: id - type: string - - description: Filter applications by name. This is an exact match for the string. - example: my-app - in: query - name: name - type: string - - description: Filter applications by their instance_type. - example: a2.3 - in: query - name: instance_type - type: string - - description: Filter applications by status. - enum: - - initializing - - ready - - error - - deleted - example: initializing - in: query - name: status - type: string - - description: Filter applications by their boot package. - example: com.foo.bar - in: query - name: boot_package - type: string - - description: Filter immutable applications. - example: false - in: query - name: immutable - type: boolean - - description: Filter applications with automatic updates enabled. - example: false - in: query - name: inhibit_auto_updates - type: boolean - - description: Filter published applications. - example: false - in: query - name: published - type: boolean - - description: Filter applications by their attached addon names. - example: gms,ssh - in: query - name: addons - type: string - - description: Filter applications by their supported ABI architecture. - example: x86_64 - in: query - name: abi - type: string - - description: Filter applications by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/applications/foo", - "/1.0/applications/bar" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of applications - tags: - - applications - post: - consumes: - - application/octet-stream - description: |- - This endpoint creates a new application in AMS using a manifest file. The - payload to upload must be a tarball compressed with bzip2 or a zip archive. - Also it must contain a **manifest.yaml** file which declares the basic - information for the creation of the application. - - Required Extensions: - `zip_archive_support`: To use the zip format, the server must have the extension. - To support the following syntax in the application **manifest.yaml** file, the - server requires the corresponding extensions: - Manifest Key | Required Extension | - ---------------- | -----------------------------------| - resources | application_resource_customization | - watchdog | application_watchdog_settings | - services | application_services_configuration | - version | application_manifest_version | - video-encoder | application_gpu_encoder | - operationId: application_post - parameters: - - default: false - description: Whether the application is based on a virtual machine or a container - in: query - name: vm - type: boolean - - description: SHA-256 fingerprint of the payload e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: A tarball or zip file - in: formData - name: upfile - required: true - type: file - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Create a new application - tags: - - applications - /1.0/applications/{id}: - delete: - consumes: - - application/json - description: This endpoint deletes an application and its versions from AMS. - operationId: application_delete - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete an application - tags: - - applications - get: - consumes: - - application/json - description: This endpoint gets the information about an application stored in AMS. - operationId: application_get - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Application' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get information about an application - tags: - - applications - patch: - consumes: - - application/octet-stream - description: |- - This endpoint updates an application with a new package of format bzip2 or - zip by uploading a new package to replace/update the existing package. - - Required Extensions: - `zip_archive_support`: To use the zip format, the server must have the extension. - operationId: application_patch_upload - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - - description: SHA-256 fingerprint of application e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: A tarball or zip file - in: formData - name: upfile - required: true - type: file - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update an application with a new package - tags: - - applications - /1.0/applications/{id}/: - patch: - consumes: - - application/json - description: |- - This endpoint updates an applications's metadata only but not the package. - Changing the following fields will lead to the creation of a new application - version: - - SUPPORTED UPDATE FIELD | WILL CREATE A NEW APPLICATION VERSION | - ------------------------- | ----------------------------------------- | - image | no | - instance-type | no | - tags | no | - addons | no | - resources | no | - inhibit_auto_updates | no | - services | yes | - watchdog | yes | - boot_activity | yes | - required_permissions | yes | - video_encoder | yes | - manifest_version | yes | - - Required Extensions: - `application_partial_updates`: To use those fields that would create a new - application version on application update. - operationId: application_patch_meta - parameters: - - description: Id of the application to update - in: path - name: id - required: true - type: string - - description: Details of the attributes to update - in: body - name: details - schema: - $ref: '#/definitions/ApplicationPatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update an applications's metadata - tags: - - applications - /1.0/applications/{id}/{version}: - delete: - consumes: - - application/json - description: This endpoint deletes a specific version of an application. - operationId: application_version_delete - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - - description: Version of the application - in: path - name: version - required: true - type: integer - - description: Details for the application version to delete - in: body - name: details - schema: - $ref: '#/definitions/ApplicationVersionDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete a version of an application - tags: - - applications - get: - consumes: - - application/json - description: This endpoint gets the information of a specific version of an application. - operationId: application_version_get - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - - description: Version of the application - in: path - name: version - required: true - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - X-AMS-ManifestSha256: - description: SHA-256 of the version manifest file - type: string - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get information about an application's specific version - tags: - - applications - patch: - consumes: - - application/json - description: |- - This endpoint updates the information of a specific version of an application. - - Required Extensions: - `application_image_export`: The use of this API requires this extension - operationId: application_version_patch - parameters: - - description: Id of the application - in: path - name: id - required: true - type: string - - description: Version of the application - in: path - name: version - required: true - type: integer - - description: Details for the application version to update - in: body - name: details - schema: - $ref: '#/definitions/ApplicationVersionPatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update a specific version of an application - tags: - - applications - /1.0/applications/{id}/{version}/manifest: - get: - consumes: - - application/json - description: |- - This endpoint gets the application manifest file of one specific application - version. - - Required Extensions: - `application_manifest_download`: The use of this API requires this extension - operationId: application_version_manifest_get - parameters: - - description: Id of the application to retrieve - in: path - name: id - required: true - type: string - - description: Version of the application to retrieve - in: path - name: version - required: true - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - X-AMS-ManifestSha256: - description: SHA-256 of the manifest file - type: string - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get the manifest for a specific version of an application - tags: - - applications - /1.0/applications/{id}/manifest: - get: - consumes: - - application/json - description: |- - This endpoint gets the latest application manifest file. - - Required Extensions: - `application_manifest_download`: The use of this API requires this extension - operationId: application_manifest_get - parameters: - - description: Id of the application to retrieve - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - X-AMS-ManifestSha256: - description: SHA-256 of the manifest file - type: string - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get an application's manifest - tags: - - applications - /1.0/applications?recursion=1: - get: - description: This endpoint returns a list of available applications in the cluster. - operationId: applications_get_recursion1 - parameters: - - default: 0 - description: Index to start listing the records - in: query - name: offset - type: integer - - default: -1 - description: Limit the number of returned records - in: query - name: limit - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter applications by id. This is an exact match for the string. - example: btavtegj1qm58qg7ru50 - in: query - name: id - type: string - - description: Filter applications by name. This is an exact match for the string. - example: my-app - in: query - name: name - type: string - - description: Filter applications by their instance_type. - example: a2.3 - in: query - name: instance_type - type: string - - description: Filter applications by status. - enum: - - initializing - - ready - - error - - deleted - example: initializing - in: query - name: status - type: string - - description: Filter applications by their boot package. - example: com.foo.bar - in: query - name: boot_package - type: string - - description: Filter immutable applications. - example: false - in: query - name: immutable - type: boolean - - description: Filter applications with automatic updates enabled. - example: false - in: query - name: inhibit_auto_updates - type: boolean - - description: Filter published applications. - example: false - in: query - name: published - type: boolean - - description: Filter applications by their attached addon names. - example: gms,ssh - in: query - name: addons - type: string - - description: Filter applications by their supported ABI architecture. - example: x86_64 - in: query - name: abi - type: string - - description: Filter applications by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - items: - $ref: '#/definitions/Application' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of applications with expanded object definitions - tags: - - applications - /1.0/certificates: - get: - description: This endpoint returns a list of certificates of trusted clients - operationId: certificates_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/certificates/b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", - "/1.0/certificates/a52c80e8337d3e08a52e52c6aa25ecfac473eae34a4880ed0088b9dbc2fagcd5" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of certificates - tags: - - certificates - post: - consumes: - - application/json - description: |- - This endpoint adds a new trusted client to the service by adding a new - client certificate. - operationId: certificates_post - parameters: - - description: Details of the certificate to create - in: body - name: details - required: true - schema: - $ref: '#/definitions/CertificatesPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "403": - $ref: '#/responses/ErrorForbidden' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Add a new client certificate - tags: - - certificates - /1.0/certificates/{fingerprint}: - delete: - consumes: - - application/json - description: |- - This endpoint deletes a client's trusted certificate from the service's - trust store. - operationId: certificate_delete - parameters: - - description: SHA-256 fingerprint of the certificate - in: path - name: fingerprint - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete a client's trusted certificate - tags: - - certificates - get: - consumes: - - application/json - description: |- - The endpoint gets the information of a trusted client's certificate and its - fingerprint. - operationId: certificate_get - parameters: - - description: SHA-256 fingerprint of the certificate to retrieve - in: path - name: fingerprint - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Certificate' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get the information about a certificate - tags: - - certificates - /1.0/certificates?recursion=1: - get: - description: This endpoint returns a list of certificates of trusted clients. - operationId: certificates_get_recursion1 - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - items: - $ref: '#/definitions/Certificate' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of expanded certificates - tags: - - certificates - /1.0/config: - get: - description: This endpoint shows the current configuration values for the service. - operationId: config_get - produces: - - application/json - responses: - "200": - description: Current config for the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - properties: - config: - description: Configuration of the service - properties: - agent.api.fingerprint: - default: "" - description: Fingerprint of certificate in the AMS trust store which is trusted when communicating with the stream agent - example: fd42316b32df - type: string - agent.api.token: - default: "" - description: Token to be used for API authentication with stream agent - example: foobar - type: string - agent.api.url: - default: "" - description: URL for stream agent API endpoint - example: https://foo.bar:9001 - type: string - application.addons: - default: "" - description: Enable addons globally for applications - example: my-addon - type: string - application.auto_publish: - default: true - description: Automatically publish the latest version for an application - type: boolean - application.auto_update: - default: true - description: Automatically update the images and applications to the latest versions - type: boolean - application.default_abi: - default: "" - description: Set a default support ABI architecture globally - example: arm64-v8a - type: string - application.max_published_versions: - default: 3 - description: Set the maximum number of application versions to publish - example: 3 - format: int32 - type: integer - container.apt_mirror: - default: "" - description: APT mirror to use for downloading dependencies inside the container - example: http://ports.ubuntu.com/ubuntu-ports - type: string - container.default_platform: - default: "null" - description: Platform to be forwarded to the container for running audio/video operations - enum: - - "null" - - webrtc - - swrast - example: webrtc - type: string - container.features: - default: "" - description: Enable additional android features - example: enable_virtual_keyboard,foo - type: string - container.security_updates: - default: true - description: Enable/disable security update for containers - type: boolean - core.debug_address: - default: "" - description: Address used to expose debug information on - example: https://127.0.0.1:9090 - type: string - core.proxy_http: - default: "" - description: Proxy variables inside container - example: http://my-proxy:8000 - type: string - core.proxy_https: - default: "" - description: Proxy variables inside container - example: http://my-proxy:8000 - type: string - core.proxy_ignore_hosts: - default: "" - description: Proxy variables inside container - example: localhost,127.0.0.1 - type: string - core.trust_password: - default: "" - description: |- - Trust password used to add remote clients. - AMS does not expose the actual password - but only the fact that it is set or not. - example: sUp3rS3cR3t - type: string - cpu.limit_mode: - default: scheduler - description: CPU limiting strategies used for a container - enum: - - scheduler - - pinning - example: scheduler - type: string - gpu.allocation_mode: - default: single - description: GPU allocation mode - enum: - - all - - single - example: single - type: string - gpu.type: - default: none - description: GPU type. Can be `none`, `nvidia`, `intel` or `amd` - enum: - - none - - nvidia - - amd - - intel - example: none - type: string - images.allow_insecure: - default: false - description: Allow insecure TLS for accessing image registry - type: boolean - images.auth: - default: "" - description: Auth token required to access the image registry - example: user:password - type: string - images.update_interval: - default: 5m - description: Interval used to check for image updates - example: 5m - type: string - images.url: - default: https://images.anbox-cloud.io/stable/ - description: Image registry URL - example: https://images.anbox-cloud.io/stable/ - type: string - images.version_lockstep: - default: true - description: Lock latest image version to align with latest AMS version - type: boolean - instance.apt_mirror: - default: "" - description: APT mirror to use for downloading dependencies inside the instance - example: http://ports.ubuntu.com/ubuntu-ports - type: string - instance.default_platform: - default: "null" - description: Platform to be forwarded to the instance for running audio/video operations - enum: - - "null" - - webrtc - - swrast - example: webrtc - type: string - instance.features: - default: "" - description: Enable additional android features - example: enable_virtual_keyboard,foo - type: string - instance.security_updates: - default: true - description: Enable/disable security update for instance - type: boolean - load_balancer.url: - default: "" - description: Set host URL for AMS to loadbalancer's URL - example: https://load-balanced-ams.com - type: string - node.queue_size: - default: 100 - description: Queue size for internal AMS workers - example: 100 - format: int32 - type: integer - node.workers_per_queue: - default: 4 - description: Number of internal workers for AMS - example: 4 - format: int32 - type: integer - registry.filter: - default: "" - description: Tag filters used for selecting applications when interacting with the registry - example: foo,bar - type: string - registry.fingerprint: - default: "" - description: Fingerprint used to verify the ceritifcate of the application registry - example: my-registry-fingerprint - type: string - registry.mode: - default: pull - description: Mode used to interact with the registry - enum: - - push - - pull - - manual - example: pull - type: string - registry.update_interval: - default: 1h - description: Interval used for checking for updates to applications - example: 1h - type: string - registry.url: - default: "" - description: Application registry URL - example: https://foo.bar/ - type: string - scheduler.strategy: - default: spread - description: Container scheduling startegy - enum: - - spread - - binpack - example: spread - type: string - type: object - type: object - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get the current configuration of the service - tags: - - config - patch: - consumes: - - application/json - description: This endpoint updates the configuration items for the service. - operationId: config_patch - parameters: - - description: Configuration items to change - in: body - name: details - schema: - $ref: '#/definitions/ConfigPost' - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Update service configuration - tags: - - config - /1.0/containers: - delete: - consumes: - - application/json - description: |- - This endpoint deletes all specified containers. If the deletion of a single - container fails, the operation is aborted and an error is returned. - operationId: containers_delete - parameters: - - description: List of containers to delete - in: body - name: details - schema: - $ref: '#/definitions/ContainersDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Delete multiple containers. - tags: - - containers - get: - description: This endpoint returns a list of container API endpoints. - operationId: containers_get - parameters: - - description: Maximum number of containers to provide - in: query - name: limit - type: integer - - description: Offset at which to start with listing containers - in: query - name: offset - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter containers by id. This is an exact match for the string. - example: cilsreunfpfec9b1ktg0 - in: query - name: id - type: string - - description: Filter containers by name. This is an exact match for the string. - example: ams-cilsreunfpfec9b1ktg0 - in: query - name: name - type: string - - description: Filter containers by type. - enum: - - base - - regular - in: query - name: type - type: string - - description: Filter containers by status. - enum: - - created - - prepared - - stopped - - running - - error - - deleted - in: query - name: status - type: string - - description: Filter containers by the LXD node name. - example: lxd0 - in: query - name: node - type: string - - description: Filter containers by the application ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: app_id - type: string - - description: Filter containers by the application name. This is an exact match for the string. - example: my-app - in: query - name: app_name - type: string - - description: Filter containers by the application version. - example: 0 - in: query - name: app_version - type: integer - - description: Filter containers by the image ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: image_id - type: string - - description: Filter containers by the image version. - example: 0 - in: query - name: image_version - type: integer - - description: Filter containers by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: API endpoints - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/containers/foo", - "/1.0/containers/bar" - ] - items: - type: string - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of containers - tags: - - containers - post: - consumes: - - application/json - description: |- - This endpoint creates a new container instance with the provided specification. - If AMS cannot fullfil the resource requirements for creating the instance, - the request will fail. - operationId: containers_post - parameters: - - description: Specification of the container to create - in: body - name: details - schema: - $ref: '#/definitions/ContainersPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Create a new container instance - tags: - - containers - /1.0/containers/{id}: - delete: - consumes: - - application/json - description: |- - This endpoint deletes a specific container. The deletion process happens - asynchronously. The operation progress can be checked via the returned - operation object. - operationId: container_delete - parameters: - - in: path - name: id - required: true - type: string - - description: Additional details for the delete operation. - in: body - name: details - schema: - $ref: '#/definitions/ContainerDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Delete a specific container - tags: - - containers - get: - description: This endpoint returns information about a specific container instance. - operationId: container_get - parameters: - - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: Container instance details - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Container' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get information about a specific container instance. - tags: - - containers - patch: - consumes: - - application/json - description: This endpoint allows changing the state of a specific container instance. - operationId: container_patch - parameters: - - in: path - name: id - required: true - type: string - - in: body - name: details - schema: - $ref: '#/definitions/ContainerPatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Update the state of a specific container instance - tags: - - containers - /1.0/containers/{id}/exec: - post: - consumes: - - application/json - description: |- - This endpoint is used to run a command in the container. 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. - operationId: container_exec_post - parameters: - - in: path - name: id - required: true - type: string - - description: Exec request - in: body - name: exec - schema: - $ref: '#/definitions/ContainerExecPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Execute a command in a container - tags: - - containers - /1.0/containers/{id}/logs: - get: - description: |- - This endpoint returns a container's collected log files. If a container has - been set to status "error" AMS will automatically collect, logs for further - inspection. - operationId: container_logs_get - parameters: - - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: Collected log files - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of collected logs - example: |- - [ - "/1.0/containers/cilsiomnfpfec9b1kteg/logs/android.log", - "/1.0/containers/cilsiomnfpfec9b1kteg/logs/system.log" - ] - items: - type: string - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of collected log files for the container - tags: - - containers - /1.0/containers/{id}/logs/{name}: - get: - description: This endpoint returns the collected log file as a raw file. - operationId: container_logs_specific_get - parameters: - - in: path - name: id - required: true - type: string - - description: Name of the log to retrieve - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Raw file - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Retrieve a specific log file stored for the container - tags: - - containers - /1.0/containers?recursion=1: - get: - description: This endpoint returns a list of containers. - operationId: containers_get_recursion1 - parameters: - - description: Maximum number of containers to provide - in: query - name: limit - type: integer - - description: Offset at which to start with listing containers - in: query - name: offset - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter containers by id. This is an exact match for the string. - example: cilsreunfpfec9b1ktg0 - in: query - name: id - type: string - - description: Filter containers by name. This is an exact match for the string. - example: ams-cilsreunfpfec9b1ktg0 - in: query - name: name - type: string - - description: Filter containers by type. - enum: - - base - - regular - in: query - name: type - type: string - - description: Filter containers by status. - enum: - - created - - prepared - - stopped - - running - - error - - deleted - in: query - name: status - type: string - - description: Filter containers by the LXD node name. - example: lxd0 - in: query - name: node - type: string - - description: Filter containers by the application ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: app_id - type: string - - description: Filter containers by the application name. This is an exact match for the string. - example: my-app - in: query - name: app_name - type: string - - description: Filter containers by the application version. - example: 0 - in: query - name: app_version - type: integer - - description: Filter containers by the image ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: image_id - type: string - - description: Filter containers by the image version. - example: 0 - in: query - name: image_version - type: integer - - description: Filter containers by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: API endpoints - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of containers - items: - $ref: '#/definitions/Container' - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of containers - tags: - - containers - /1.0/events: - get: - description: |- - This endpoint will upgrade the connection to a websocket on which - notifications will be sent. The client can subscribe to different types of - events or only listen to the required events. - operationId: events_get - parameters: - - default: all - description: Type of event. If left empty, the parameter corresponds to 'all' events. - enum: - - all - - operation - - lifecycle - in: formData - name: type - type: string - produces: - - application/json - responses: - "200": - description: |- - This api endpoint never returns. This websocket sends out JSON - dictionaries of the given format for events - schema: - $ref: '#/definitions/Event' - default: - $ref: '#/responses/InternalServerError' - summary: Listen to events for changes in AMS - tags: - - events - /1.0/images: - get: - description: This endpoint returns a list of images available in the cluster. - operationId: images_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/images/foo", - "/1.0/images/bar" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of images - tags: - - images - post: - consumes: - - application/json - description: |- - This endpoint imports an image into AMS cluster from an image server using - its name. - operationId: image_post_import - parameters: - - description: Details of the image to create - in: body - name: details - required: true - schema: - $ref: '#/definitions/ImagesPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Import an image - tags: - - images - /1.0/images/: - post: - consumes: - - application/octet-stream - description: |- - This endpoint allows the client to upload an image with a new package of - format gzip, bzip2 or xz. - operationId: image_post_upload - parameters: - - description: SHA-256 fingerprint of image e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: 'Json encoded byte string of image details for e.g { "name": "my-image", "default": false }' - in: header - name: X-AMS-Request - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Upload a package to create an image - tags: - - images - /1.0/images/{id_or_name}: - get: - consumes: - - application/json - description: This endpoint gets the information about an image stored in AMS. - operationId: image_get - parameters: - - description: Id or name of the image to retrieve - in: path - name: id_or_name - required: true - type: string - - default: container - description: Type of the image variant to return could be `vm` or `container` - enum: - - container - - vm - in: query - name: type - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Image' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get information about an image - tags: - - images - /1.0/images/{id}: - delete: - consumes: - - application/json - description: This endpoint deletes an image stored in AMS. - operationId: image_delete - parameters: - - description: Id of the image to delete - in: path - name: id - required: true - type: string - - description: details for deleting the image - in: body - name: details - schema: - $ref: '#/definitions/ImageDelete' - - default: container - description: Type of the image variant to return could be `vm` or `container` - enum: - - container - - vm - in: query - name: type - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete an image - tags: - - images - patch: - consumes: - - application/octet-stream - description: |- - This endpoint updates an existing image with a new package of format gzip, - bzip2 or xz. - operationId: image_patch_upload - parameters: - - description: SHA-256 fingerprint of image e.g b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 - in: header - name: X-AMS-Fingerprint - type: string - - description: 'Json encoded byte string of image details e.g { "name": "my-image", "default": false }' - in: header - name: X-AMS-Request - required: true - type: string - - description: Id of the image to update - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update an image with a new package to upload - tags: - - images - /1.0/images/{id}/: - patch: - consumes: - - application/json - description: This endpoint updates an image's metadata only but not the package. - operationId: image_patch_meta - parameters: - - description: Id of the image to update - in: path - name: id - required: true - type: string - - description: Details of the attributes to update - in: body - name: details - schema: - $ref: '#/definitions/ImagePatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Update an image's metadata - tags: - - images - /1.0/images/{id}/{version}: - delete: - consumes: - - application/json - description: This endpoint deletes a specific version of a stored image. - operationId: image_version_delete - parameters: - - description: Id or name of the image whose version needs to be deleted - in: path - name: id - required: true - type: string - - description: Version of the image to delete - in: path - name: version - required: true - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Delete an image version - tags: - - images - /1.0/images?recursion=1: - get: - description: This endpoint returns a list of images available in the cluster. - operationId: images_get_recursion1 - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - items: - $ref: '#/definitions/Image' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get the list of images expanded - tags: - - images - /1.0/instances: - delete: - consumes: - - application/json - description: |- - This endpoint deletes all specified instances. If the deletion of a single - instance fails, the operation is aborted and an error is returned. - operationId: instances_delete - parameters: - - description: List of instances to delete - in: body - name: details - schema: - $ref: '#/definitions/InstancesDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Delete multiple instances. - tags: - - instances - get: - description: This endpoint returns a list of instance API endpoints. - operationId: instances_get - parameters: - - description: Maximum number of instances to provide - in: query - name: limit - type: integer - - description: Offset at which to start with listing instances - in: query - name: offset - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter instances by id. This is an exact match for the string. - example: cilsreunfpfec9b1ktg0 - in: query - name: id - type: string - - description: Filter instances by name. This is an exact match for the string. - example: ams-cilsreunfpfec9b1ktg0 - in: query - name: name - type: string - - description: Filter base instances. The instances which are not base, are regular instances. - example: true - in: query - name: base - type: boolean - - description: Filter instances by type. - enum: - - vm - - container - in: query - name: type - type: string - - description: Filter instances by status. - enum: - - created - - prepared - - stopped - - running - - error - - deleted - in: query - name: status - type: string - - description: Filter instances by the LXD node name. - example: lxd0 - in: query - name: node - type: string - - description: Filter instances by the application ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: app_id - type: string - - description: Filter instances by the application name. This is an exact match for the string. - example: my-app - in: query - name: app_name - type: string - - description: Filter instances by the application version. - example: 0 - in: query - name: app_version - type: integer - - description: Filter instances by the image ID. This is an exact match for the string. - example: cilshrmnfpfec9b1kte0 - in: query - name: image_id - type: string - - description: Filter instances by the image version. - example: 0 - in: query - name: image_version - type: integer - - description: Filter instances by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: API endpoints - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/instances/foo", - "/1.0/instances/bar" - ] - items: - type: string - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of instances - tags: - - instances - post: - consumes: - - application/json - 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. - operationId: instances_post - parameters: - - description: Specification of the instance to create - in: body - name: details - schema: - $ref: '#/definitions/InstancesPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Create a new instance - tags: - - instances - /1.0/instances/{id_or_name}: - delete: - consumes: - - application/json - description: |- - This endpoint deletes a specific instance. The deletion process happens - asynchronously. The operation progress can be checked via the returned - operation object. - operationId: instance_delete - parameters: - - in: path - name: id_or_name - required: true - type: string - - description: Additional details for the delete operation. - in: body - name: details - schema: - $ref: '#/definitions/InstanceDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Delete a specific instance - tags: - - instances - get: - description: This endpoint returns information about a specific instance instance. - operationId: instance_get - parameters: - - in: path - name: id_or_name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Instance instance details - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Instance' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get information about a specific instance instance. - tags: - - instances - patch: - consumes: - - application/json - description: This endpoint allows changing the state of a specific instance instance. - operationId: instance_patch - parameters: - - in: path - name: id_or_name - required: true - type: string - - in: body - name: details - schema: - $ref: '#/definitions/InstancePatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Update the state of a specific instance instance - tags: - - instances - /1.0/instances/{id_or_name}/exec: - post: - consumes: - - application/json - 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. - operationId: instance_exec_post - parameters: - - in: path - name: id_or_name - required: true - type: string - - description: Exec request - in: body - name: exec - schema: - $ref: '#/definitions/InstanceExecPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Execute a command in a instance - tags: - - instances - /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. - operationId: instance_logs_get - parameters: - - in: path - name: id_or_name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Collected log files - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of collected logs - example: |- - [ - "/1.0/instances/cilsiomnfpfec9b1kteg/logs/android.log", - "/1.0/instances/cilsiomnfpfec9b1kteg/logs/system.log" - ] - items: - type: string - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of collected log files for the instance - tags: - - instances - /1.0/instances/{id_or_name}/logs/{name}: - get: - description: This endpoint returns the collected log file as a raw file. - operationId: instance_logs_specific_get - parameters: - - in: path - name: id_or_name - required: true - type: string - - description: Name of the log to retrieve - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Raw file - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Retrieve a specific log file stored for the instance - tags: - - instances - /1.0/instances?recursion=1: - get: - description: This endpoint returns a list of instances. - operationId: instances_get_recursion1 - parameters: - - description: Maximum number of instances to provide - in: query - name: limit - type: integer - - description: Offset at which to start with listing instances - in: query - name: offset - type: integer - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - - description: Filter instances by id. This is an exact match for the string. - example: cilsreunfpfec9b1ktg0 - in: query - name: id - type: string - - description: Filter instances by name. This is an exact match for the string. - example: ams-cilsreunfpfec9b1ktg0 - in: query - name: name - type: string - - description: Filter base instances. The instances which are not base, are regular instances. - example: true - in: query - name: base - type: boolean - - description: Filter instances by type. - enum: - - vm - - container - in: query - name: type - type: string - - description: Filter instances by status. - enum: - - created - - prepared - - stopped - - running - - error - - deleted - in: query - name: status - type: string - - description: Filter instances by the LXD node name. - example: lxd0 - in: query - name: node - type: string - - description: Filter instances by the application ID. This is an exact match for the string. - example: cilsiomnfpfec9b1kteg - in: query - name: app_id - type: string - - description: Filter instances by the application name. This is an exact match for the string. - example: my-app - in: query - name: app_name - type: string - - description: Filter instances by the application version. - example: 0 - in: query - name: app_version - type: integer - - description: Filter instances by the image ID. This is an exact match for the string. - example: cilshrmnfpfec9b1kte0 - in: query - name: image_id - type: string - - description: Filter instances by the image version. - example: 0 - in: query - name: image_version - type: integer - - description: Filter instances by tags. - example: created_by=anbox,foo,bar - in: query - name: tags - type: string - produces: - - application/json - responses: - "200": - description: API endpoints - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - description: List of instances - items: - $ref: '#/definitions/Instance' - type: array - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "500": - $ref: '#/responses/InternalServerError' - summary: Get a list of instances - tags: - - instances - /1.0/nodes: - get: - description: This endpoint returns a list of available nodes known to AMS. - operationId: nodes_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/nodes/foo", - "/1.0/nodes/bar" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of nodes - tags: - - nodes - post: - consumes: - - application/json - description: |- - This endpoint creates a node in AMS which can be a precreated (unmanaged) - LXD node or a managed node created by AMS bootstrapping LXD. - operationId: node_post - parameters: - - description: AMS Node to create - in: body - name: details - schema: - $ref: '#/definitions/NodesPost' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Create a node - tags: - - nodes - /1.0/nodes/{name}: - delete: - consumes: - - application/json - description: This endpoint deletes a node in AMS and its resources from the LXD cluster. - operationId: node_delete - parameters: - - description: Name of the node to delete - in: path - name: name - required: true - type: string - - description: Info required to delete the resource - in: body - name: details - schema: - $ref: '#/definitions/NodeDelete' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Delete a node - tags: - - nodes - get: - consumes: - - application/json - description: |- - This endpoint returns information about a node in AMS and its resources from - the LXD cluster. - operationId: node_get - parameters: - - description: Name of the node to get - in: path - name: name - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - headers: - Etag: - description: E-Tag of the resource - type: string - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Node' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Get information about a node - tags: - - nodes - patch: - consumes: - - application/json - description: This endpoint updates a node and its resources in the cluster. - operationId: node_patch - parameters: - - description: Etag of the resource - in: header - name: Etag - type: string - - description: Name of the node to delete - in: path - name: name - required: true - type: string - - description: Info required to update the resource - in: body - name: details - schema: - $ref: '#/definitions/NodePatch' - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/definitions/OperationResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - "409": - $ref: '#/responses/ErrorAlreadyExists' - default: - $ref: '#/responses/InternalServerError' - summary: Update a node - tags: - - nodes - /1.0/nodes?recursion=1: - get: - description: This endpoint returns a list of available nodes known to AMS. - operationId: nodes_get_recursion1 - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - items: - $ref: '#/definitions/Node' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of nodes - tags: - - nodes - /1.0/operations: - get: - description: |- - This endpoint returns a list of URLs for operations that are currently in - progress or queued. - operationId: operations_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - description: List of endpoints - example: |- - [ - "/1.0/operations/foo", - "/1.0/operations/bar" - ] - items: - type: string - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of operations - tags: - - operations - /1.0/operations/{uuid}: - delete: - consumes: - - application/json - description: |- - This endpoint is used to change the state of cancellable API to “cancelling” - rather than actually removing the operation entry. - operationId: operation_delete - parameters: - - description: uuid of the operation - in: path - name: uuid - required: true - type: string - produces: - - application/json - responses: - "202": - description: Success response of the service - schema: - $ref: '#/responses/EmptySyncResponse' - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Cancel an operation - tags: - - operations - get: - consumes: - - application/json - description: This endpoint gets the information about an operation. - operationId: operation_get - parameters: - - description: uuid of the operation - in: path - name: uuid - required: true - type: string - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Operation' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get the current status of an operation - tags: - - operations - /1.0/operations/{uuid}/wait: - get: - consumes: - - application/json - description: |- - This is a synchronous endpoint for a client to wait until an operation - reaches a final status. - operationId: operation_wait_get - parameters: - - description: uuid of the operation - in: path - name: uuid - required: true - type: string - - description: |- - The amount of time (in seconds) to wait until the operation is considered - to be timed out. If the value is assigned to -1, the operation will wait - infinitely until the monitored operation reaches a final status. - in: query - name: timeout - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/Operation' - type: object - "400": - $ref: '#/responses/ErrorBadRequest' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Wait for an operation to complete - tags: - - operations - /1.0/operations/{uuid}/websocket: - get: - description: |- - The connection to this endpoint is upgraded into a websocket connection, - speaking the protocol defined by the operation type. For example, in the - case of an exec operation, the websocket is the bidirectional pipe for - stdin/stdout/stderr to flow to and from the process inside the container. - In the case of migration, it will be the primary interface over which the - migration information is communicated. - operationId: operation_websocket_get - parameters: - - description: uuid of the operation - in: path - name: uuid - required: true - type: string - - description: |- - This is the secret that was provided when the operation was created. - Guests are allowed to connect only if they have the correct secret. - in: query - name: secret - type: string - responses: - "400": - $ref: '#/responses/ErrorBadRequest' - "401": - $ref: '#/responses/ErrorUnauthorized' - "403": - $ref: '#/responses/ErrorForbidden' - "404": - $ref: '#/responses/ErrorNotFound' - default: - $ref: '#/responses/InternalServerError' - summary: Get the websocket connection to monitor operation - tags: - - operations - /1.0/operations?recursion=1: - get: - description: |- - This endpoint returns a list of operations that are currently in progress - or queued. - operationId: operations_get_recursion1 - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/CollectionResponse' - properties: - metadata: - items: - $ref: '#/definitions/Operation' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of expanded operations - tags: - - operations - /1.0/tasks: - get: - description: This endpoint returns a list of tasks in AMS. - operationId: tasks_get - parameters: - - default: 0 - description: Expand the returned resource definition - enum: - - 0 - - 1 - in: query - name: recursion - type: integer - produces: - - application/json - responses: - "200": - description: Success response of the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - items: - $ref: '#/definitions/Task' - type: array - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get a list of tasks - tags: - - tasks - /1.0/version: - get: - description: This endpoint returns the current running version for the service. - operationId: version_get - produces: - - application/json - responses: - "200": - description: Current config for the service - schema: - allOf: - - $ref: '#/definitions/NoMetaSyncResponse' - properties: - metadata: - $ref: '#/definitions/VersionResponse' - type: object - default: - $ref: '#/responses/InternalServerError' - summary: Get the current version for the service - tags: - - service + example: async + ServiceStatus: + description: ServiceStatus represents the status of the AMS service + type: object + properties: + api_extensions: + description: List of supported features for the service version running + type: array + items: + type: string + example: + - addon_restore_hook + - container_logs + - registry + api_status: + description: Shows the API stability status + type: string + example: stable + api_version: + description: API version for the service + type: string + example: '1.0' + auth: + description: Used to see if the client is trusted. Can be `trusted` or `untrusted`. + type: string + example: untrusted + auth_methods: + description: Authentication method used for the requests. + type: array + items: + type: string + example: 2waySSL + cluster_id: + description: ID of the subcluster the AMS instance is part of + type: string + example: cilsreunfpfec9b1ktg0 + cluster_name: + description: Name of the subcluster the AMS instance is part of + type: string + example: prod0 + StatusCode: + description: StatusCode represents a valid REST operation + type: integer + format: int64 + Task: + description: Task is the scheduling unit AMS uses for container launches + type: object + properties: + id: + description: ID of the task + type: string + example: c055dl0j1qm027422feg + object_id: + description: ID of the object that the task is operating on + type: string + example: c055dl0j1qm027422fe0 + object_type: + description: Type of the object that the task is operating on + type: string + example: container + status: + description: Status of the task + type: string + enum: + - created + - prepared + - started + - running + - stopped + - shutdown + - completed + - error + - deleted + - unknown + example: running + VersionGet: + description: VersionGet is the JSON response from the API version request method + type: object + properties: + version: + type: string + VersionResponse: + description: VersionResponse shows the version for the running service + type: object + properties: + version: + description: Version of the service + type: string + example: 1.18.2 + VideoEncoderType: + description: VideoEncoderType describes the type of a video encoder is used by + an application + type: string responses: - EmptySyncResponse: - description: Empty sync response - schema: - properties: - metadata: - example: '{}' - status: - example: Success - type: string - status_code: - example: 200 - format: int64 - type: integer - type: - example: sync - type: string - type: object - ErrorAlreadyExists: - description: Already Exists - schema: - properties: - error: - example: already exists - type: string - error_code: - example: 409 - format: int64 - type: integer - type: - example: error - type: string - type: object - ErrorBadRequest: - description: Bad Request - schema: - properties: - error: - example: bad request - type: string - error_code: - example: 400 - format: int64 - type: integer - metadata: - example: '{}' - type: - example: error - type: string - type: object - ErrorForbidden: - description: Forbidden - schema: - properties: - error: - example: Not Authorized - type: string - error_code: - example: 403 - format: int64 - type: integer - type: - example: error - type: string - type: object - ErrorNotFound: - description: Not found - schema: - properties: - error: - example: not found - type: string - error_code: - example: 404 - format: int64 - type: integer - type: - example: error - type: string - type: object - ErrorServiceUnavailable: - description: Service Unavailable - schema: - properties: - error: - example: service unavailable - type: string - error_code: - example: 503 - format: int64 - type: integer - type: - example: error - type: string - type: object - ErrorUnauthorized: - description: Unauthorized - schema: - properties: - error: - example: missing secret - type: string - error_code: - example: 401 - format: int64 - type: integer - type: - example: error - type: string - type: object - InternalServerError: - description: Internal Server Error - schema: - properties: - error: - example: internal server error - type: string - error_code: - example: 500 - format: int64 - type: integer - metadata: - example: '{}' - type: - example: error - type: string - type: object -swagger: "2.0" \ No newline at end of file + EmptySyncResponse: + description: Empty sync response + schema: + type: object + properties: + metadata: + example: '{}' + status: + type: string + example: Success + status_code: + type: integer + format: int64 + example: 200 + type: + type: string + example: sync + ErrorAlreadyExists: + description: Already Exists + schema: + type: object + properties: + error: + type: string + example: already exists + error_code: + type: integer + format: int64 + example: 409 + type: + type: string + example: error + ErrorBadRequest: + description: Bad Request + 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 + ErrorForbidden: + description: Forbidden + schema: + type: object + properties: + error: + type: string + example: Not Authorized + error_code: + type: integer + format: int64 + example: 403 + type: + type: string + example: error + ErrorNotFound: + description: Not found + schema: + type: object + properties: + error: + type: string + example: not found + error_code: + type: integer + format: int64 + example: 404 + type: + type: string + example: error + ErrorServiceUnavailable: + description: Service Unavailable + schema: + type: object + properties: + error: + type: string + example: service unavailable + error_code: + type: integer + format: int64 + example: 503 + type: + type: string + example: error + ErrorUnauthorized: + description: Unauthorized + schema: + type: object + properties: + error: + type: string + example: missing secret + error_code: + type: integer + format: int64 + example: 401 + type: + type: string + example: error + InternalServerError: + description: Internal Server Error + 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