forked from canonical/iot-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasyncapi.yaml
122 lines (105 loc) · 3.87 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
asyncapi: 2.0.0
info:
title:
version: '1'
description: |
This is the asynchronous API between the iot-agent and other snaps on the device. It includes a partial
snapd interface for authorized clients.
channels:
v1.snapd.v2.assertions.get:
description: |
Reference: https://snapcraft.io/docs/snapd-api#heading--assertions for GET /v2/assertions/[assertionType]
publish:
message:
$ref: "#/components/messages/assertionsRequest"
x-responses:
$ref: "#/components/messages/assertionsResponse"
v1.snapd.v2.snaps.get:
description: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for GET /v2/snaps.
publish:
message:
$ref: "#/components/messages/snapsRequest"
x-responses:
$ref: "#/components/messages/snapsResponse"
v1.snapd.v2.apps.post:
description: |
Reference https://snapcraft.io/docs/snapd-api#heading--apps for POST /v2/apps.
publish:
message:
$ref: "#/components/messages/appsRequest"
x-responses:
$ref: "#/components/messages/appsResponse"
v1.snapd.v2.snaps.{snap}.post:
description: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for POST /v2/snaps/[name]. This currently only supports an action for switch.
publish:
message:
$ref: "#/components/messages/snapsSnapRequest"
x-responses:
$ref: "#/components/messages/snapsSnapResponse"
parameters:
snap:
$ref: "#/components/parameters/snap"
iot.agent.mqtt.connection.status:
description: |
Request the current status of iot-agent's connection to the DMS mqtt server
publish:
message:
$ref: "#/components/messages/iotagentmqttconnectionstatusrequest"
x-responses:
$ref: "#/components/messages/iotagentmqttconnectionstatus"
components:
messages:
appsRequest:
summary: |
Reference https://snapcraft.io/docs/snapd-api#heading--apps for POST /v2/apps
payload:
$ref: "./schemas/schemas.json#/definitions/appsRequest"
appsResponse:
summary: |
Reference https://snapcraft.io/docs/snapd-api#heading--apps for POST /v2/apps
payload:
$ref: "./schemas/schemas.json#/definitions/appsResponse"
assertionsRequest:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--assertions for GET /v2/assertions/[assertionType]
payload:
$ref: "./schemas/schemas.json#/definitions/assertionsRequest"
assertionsResponse:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--assertions for GET /v2/assertions/[assertionType]
payload:
$ref: "./schemas/schemas.json#/definitions/assertionsResponse"
iotagentmqttconnectionstatusrequest:
payload:
$ref: "./schemas/schemas.json#/definitions/mqttConnectionStatusRequest"
iotagentmqttconnectionstatus:
payload:
$ref: "./schemas/schemas.json#/definitions/mqttConnectionStatus"
snapsRequest:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for GET /v2/snaps.
payload:
$ref: "#/components/schemas/empty"
snapsResponse:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for GET /v2/snaps.
payload:
$ref: "./schemas/schemas.json#/definitions/snapsResponse"
snapsSnapRequest:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for POST /v2/snaps/[name].
payload:
$ref: "./schemas/schemas.json#/definitions/snapsSnapRequest"
snapsSnapResponse:
summary: |
Reference: https://snapcraft.io/docs/snapd-api#heading--snaps for POST /v2/snaps/[name].
payload:
$ref: "./schemas/schemas.json#/definitions/asyncResponse"
schemas:
empty:
type: object
parameters:
snap:
type: string