forked from canonical/iot-devicetwin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasyncapi.yaml
76 lines (73 loc) · 2.36 KB
/
asyncapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
asyncapi: 2.0.0
info:
title: Device Management Service Agent API
version: '0.0.1'
description: |
This is the asynchronous API between an on-device agent and the Device Management Service controlling it
channels:
devices/health/{deviceClientId}:
description: |
The health of the device, published periodically
publish:
message:
$ref: '#/components/messages/health'
parameters:
deviceClientId:
$ref: '#/components/parameters/deviceClientId'
devices/pub/{deviceClientId}:
description: |
Responses to actions
publish:
message:
oneOf:
- $ref: '#/components/messages/publishDevice'
- $ref: '#/components/messages/publishDeviceVersion'
- $ref: '#/components/messages/publishResponse'
- $ref: '#/components/messages/publishSnap'
- $ref: '#/components/messages/publishSnaps'
parameters:
deviceClientId:
$ref: '#/components/parameters/deviceClientId'
devices/sub/{deviceClientId}:
description: |
Device actions from the device management service
publish:
message:
$ref: '#/components/messages/subscribeAction'
parameters:
deviceClientId:
$ref: '#/components/parameters/deviceClientId'
components:
messages:
health:
summary: The health of the device
payload:
$ref: './schemas/schemas.json#/definitions/health'
subscribeAction:
summary: An action from the device management service for the device to take
payload:
$ref: './schemas/schemas.json#/definitions/subscribeAction'
publishDevice:
summary: The device info response
payload:
$ref: './schemas/schemas.json#/definitions/publishDevice'
publishDeviceVersion:
summary: The device version info response
payload:
$ref: './schemas/schemas.json#/definitions/publishDeviceVersion'
publishResponse:
summary: The generic publish response
payload:
$ref: './schemas/schemas.json#/definitions/publishResponse'
publishSnap:
summary: The publishSnap response
payload:
$ref: './schemas/schemas.json#/definitions/publishSnap'
publishSnaps:
summary: The publishSnaps response
payload:
$ref: './schemas/schemas.json#/definitions/publishSnaps'
parameters:
deviceClientId:
schema:
type: string