asyncapi: 2.0.0 info: title: T-Rex Websocket API version: 1.0.1 description: This serves as the documentation for websocket connections made between the T-Rex and the gateway. servers: local: url: localhost/session description: local protocol: wss development: url: dev-sec-gw.cloud.fiskerinc.com/session description: dev protocol: wss stage: url: stg-sec-gw.cloud.fiskerinc.com/session description: stage protocol: wss preproduction: url: sec-gw.cloud.fiskerinc.com/session description: preprod protocol: wss production: url: sec-gw.cec-prd.fiskerinc.com/session description: prod protocol: wss production-eu: url: sec-gw.cec-euprd.fiskerinc.com/session description: prod-eu protocol: wss channels: config: subscribe: message: $ref: '#/components/messages/config' filekeys: subscribe: message: $ref: '#/components/messages/filekeys' remote_command: subscribe: message: $ref: '#/components/messages/remote_command' update_manifest: subscribe: message: $ref: '#/components/messages/update_manifest' canbus(pub): publish: message: $ref: '#/components/messages/canbus(pub)' car_state: publish: message: $ref: '#/components/messages/car_state' car_update_status: publish: message: $ref: '#/components/messages/car_update_status' get_filekeys: publish: message: $ref: '#/components/messages/get_filekeys' error: publish: message: $ref: '#/components/messages/error(pub)' subscribe: message: $ref: '#/components/messages/error(sub)' components: messages: config: description: Message containing configuration information. Passed down upon connection to gateway. payload: type: object required: - handler - data properties: handler: type: string const: config data: $ref: './schema/trex/RXMessage.json#/$defs/Config' filekeys: description: A message containing file keys for OTA update flow. Triggered by publishing 'get_filekeys' message. payload: type: object required: - handler - data properties: handler: type: string const: filekeys data: $ref: './schema/trex/RXMessage.json#/$defs/FileKeyResponse' remote_command: description: A message containing remote car command payload: type: object required: - handler - data properties: handler: type: string const: remote_command data: $ref: './schema/trex/RXMessage.json#/$defs/RemoteCommand' update_manifest: description: Manifest describing an OTA update. payload: type: object required: - handler - data properties: handler: type: string const: update_manifest data: $ref: './schema/trex/RXMessage.json#/$defs/UpdateManifest' canbus(pub): description: CAN message batch. payload: type: object required: - handler - data properties: handler: type: string const: canbus data: type: array items: $ref: './schema/trex/TXMessage.json#/$defs/CanFrame' car_state: description: Current car state, describes ECU versions etc. payload: type: object required: - handler - data properties: handler: type: string const: car_state data: $ref: './schema/trex/TXMessage.json#/$defs/CarStateUpdate' car_update_status: description: Update status for an OTA update. payload: type: object required: - handler - data properties: handler: type: string const: car_update_status data: $ref: './schema/trex/TXMessage.json#/$defs/CarUpdateProgress' get_filekeys: description: Request file keys to decrypt OTA update. payload: type: object required: - handler - data properties: handler: type: string const: get_filekeys data: $ref: './schema/trex/TXMessage.json#/$defs/FileKeysRequest' error(pub): description: Report an error. payload: type: object required: - handler - data properties: handler: type: string const: error data: $ref: './schema/trex/TXMessage.json#/$defs/Error' error(sub): description: Generic error message payload: type: object required: - handler - data properties: handler: type: string description: expects the string "error" const: error data: $ref: './schema/trex/RXMessage.json#/$defs/ErrorModel'