openapi: 3.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 Events API version: '1.0' tags: - name: Events paths: /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.' tags: - Events summary: Listen to events for changes in AMS operationId: events_get responses: '200': description: 'This api endpoint never returns. This websocket sends out JSON dictionaries of the given format for events' content: application/json: schema: $ref: '#/components/schemas/Event' default: $ref: '#/components/responses/InternalServerError' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: type: type: string enum: - all - operation - lifecycle default: all description: Type of event. If left empty, the parameter corresponds to 'all' events. components: schemas: 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 responses: InternalServerError: description: Internal Server Error content: application/json: schema: type: object properties: error: type: string example: internal server error error_code: type: integer format: int64 example: 500 metadata: example: '{}' type: type: string example: error