This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
api_v1.json
155 lines (155 loc) · 3.79 KB
/
api_v1.json
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{
"openapi": "3.0.3",
"info": {
"version": "v1",
"title": "CWA-Data data donation API",
"license": {
"name": "Apache 2.0"
}
},
"paths": {
"/version/{version}/{mobile-os}/otp": {
"post": {
"summary": "Post one-time-passcode (OTP)",
"tags": [
"send otp"
],
"parameters": [
{
"name": "version",
"in": "path",
"description": "API version",
"required": true,
"schema": {
"$ref": "#/components/schemas/version"
}
},
{
"name": "mobile-os",
"in": "path",
"description": "Mobile operating system",
"required": true,
"schema": {
"$ref": "#/components/schemas/mobile-os"
}
}
],
"requestBody": {
"content": {
"application/x-protobuf": {
"schema": {
"$ref": "#/components/schemas/EDUSOneTimePasswordRequest"
},
"example": "<BINARY DATA>"
}
}
},
"responses": {
"200": {
"description": "OTP was valid and is now marked as used - it's redeemed",
"content": {
"application/json": {
"examples": {
"expirationDate": {
"value": "{\n \"expirationDate\": \"2021-02-16T08:34:00+00:00\"\n}"
}
}
}
}
},
"400": {
"description": "TBD"
},
"401": {
"description": "TBD"
},
"403": {
"description": "TBD"
},
"500": {
"description": "server errros while processing the request"
}
}
}
},
"/version/{version}/{mobile-os}/dat": {
"post": {
"summary": "Data donation",
"tags": [
"send data"
],
"parameters": [
{
"name": "version",
"in": "path",
"description": "API version",
"required": true,
"schema": {
"$ref": "#/components/schemas/version"
}
},
{
"name": "mobile-os",
"in": "path",
"description": "Mobile operating system",
"required": true,
"schema": {
"$ref": "#/components/schemas/mobile-os"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PPADataRequest"
},
"example": "<BINARY DATA>"
}
}
},
"responses": {
"204": {
"description": "PPAC succeeded and the request was syntactically valid"
},
"400": {
"description": "TBD"
},
"401": {
"description": "TBD"
},
"403": {
"description": "TBD"
},
"500": {
"description": "server errros while processing the request"
}
}
}
}
},
"components": {
"schemas": {
"version": {
"type": "string",
"description": "A string of form 'v[\\d+]'",
"example": "v1"
},
"mobile-os": {
"type": "string",
"description": "Either 'ios' or 'android'",
"example": "ios"
},
"EDUSOneTimePasswordRequest": {
"type": "string",
"format": "binary",
"description": "TBD"
},
"PPADataRequest": {
"type": "string",
"format": "binary",
"description": "TBD"
}
}
}
}