-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapiary.apib
268 lines (240 loc) · 8.24 KB
/
apiary.apib
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
HOST: http://api.babelroom.com/api/v1/
--- BabelRoom API ---
---
Welcome to the our API documentation.
All comments can be written in (support [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax)
Refer to the introduction on the [http://code.google.com/p/babelroom/wiki/RESTAPI wiki]
---
Retrieve user data associated with active cookie session. The empty set is returned if there is no valid active cookie session.
GET login
< 200
< Content-Type: application/json; charset=utf-8
{}
+++++
< 200
< Content-Type: application/json; charset=utf-8
{"user": {"id":3, "email_address":"[email protected]", "email":"[email protected]", "name":"API", "last_name":"Test"}}
Login. If successful set a new cookie session.
POST login
> Content-Type: application/json; charset=utf-8
{"login":"[email protected]", "password":"default"}
< 200
< Content-Type: application/json; charset=utf-8
{"user": {"id":3, "email_address":"[email protected]", "email":"[email protected]", "name":"API", "last_name":"Test"}}
+++++
< 200
< Content-Type: application/json; charset=utf-8
{}
Logout. Destroy the currently active cookie session
DELETE login
< 200
< Content-Type: application/json; charset=utf-8
{}
Logout. Synonymous with DELETE login
POST logout
< 200
< Content-Type: application/json; charset=utf-8
{}
Retrieve the superset of context for the currently logged in user, the specified conference and any associated invitation.
The conference uri is appended to the end of the REST resource path /api/v1/invitation
GET invitation/apitest
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
< 200
< Content-Type: application/json; charset=utf-8
{"data": {
"user_id":3,
"email_address":"[email protected]",
"email":"[email protected]",
"first_name":"API",
"last_name":"Test",
"origin_id":"37",
"conference_id":3,
"conference_name":"API Test Conference",
"conference_config":"<internal data>",
"conference_introduction":"API Test Conference",
"conference_uri":"apitest",
"conference_access_config":null,
"conference_skin_id":1,
"invitation_id":2,
"pin":"444444",
"myAccessInfo":"<internal data>",
"connection_salt":"<internal>",
"user_name":"API Test",
"is_host":true,
"is_live":false,
"conference_estream_id":"<internal>"
}
}
Add the current user as a conference participant
The conference uri is appended to the end of the REST resource path /api/v1/add_self
POST add_self/apitest
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
> Content-Type: application/json; charset=utf-8
{
"user": {
"name" => "API",
"last_name" => "Test",
"email" => "[email protected]",
"origin_data" => "Origin System Name",
"origin_id" => 37,
"phone" => "650.555.1212",
},
"invitation": {
},
"avatar_url": "http://example.com/path/to/my/avatar"
}
< 200
< Content-Type: application/json; charset=utf-8
{}
Add another user as a conference participant
The conference uri is appended to the end of the REST resource path /api/v1/add_participant
POST add_participant/apitest
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
> Content-Type: application/json; charset=utf-8
{
"user": {
"name" => "API",
"last_name" => "Test",
"email" => "[email protected]",
"origin_data" => "Origin System Name",
"origin_id" => 37,
"phone" => "650.555.1212",
},
"invitation": {
"role":"Host",
},
"avatar_url": "http://example.com/path/to/my/avatar",
"return_token":true
}
< 200
< Content-Type: application/json; charset=utf-8
{}
--
Server
APIs for server version and status.
--
Server status. This is mainly for use by automated server monitoring tools.
GET status
< 200
< Content-Type: application/json; charset=utf-8
{
"status": "OK"
}
Server version.
GET version
< 200
< Content-Type: application/json; charset=utf-8
{
"major": "2",
"minor": "37",
"commit": "201",
"stamp": "2.37.201"
}
Remove files
DELETE files
< 200
< Content-Type: application/json; charset=utf-8
{}
--
General Purpose Resources
These resources are automatically generated from
[https://github.com/babelroom/clouds/blob/master/gen/schema/main.sch](https://github.com/babelroom/clouds/blob/master/gen/schema/main.sch)
--
Get user data
Retrieve specified columns only by appending query string 'c' parameter, e.g. ?c=name,email_address,last_name,company,email,origin_data,origin_id
Access required to execute this API will be documented shortly.
GET users/3
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
< 200
< Content-Type: application/json; charset=utf-8
{"name": "First","email_address": "[email protected]","last_name": "Last","company": "Fastbuck, Inc.","email": "[email protected]","origin_data": "Origin System (optional)","origin_id": 37}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}
Get conference data
Retrieve specified columns only by appending query string 'c' parameter, e.g. ?c=name,uri,introduction,access_config,origin_data,origin_id
Access required to execute this API will be documented shortly.
GET conferences/3
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
< 200
< Content-Type: application/json; charset=utf-8
{"name": "My Conference","uri": "myuri","introduction": "My summary, introduction or description","access_config": "{}","origin_data": "Origin data (optional)","origin_id": 37}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}
Create a new conference
Access required to execute this API will be documented shortly.
POST conferences
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
> Content-Type: application/json; charset=utf-8
{"name": "My Conference","introduction": "My summary, introduction or description","access_config": "{}","origin_data": "Origin data (optional)","origin_id": 37}
< 201
< Content-Type: application/json; charset=utf-8
{}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}
Update an existing conference
Access required to execute this API will be documented shortly.
PUT /conferences/3
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
> Content-Type: application/json; charset=utf-8
{"name": "My Conference","introduction": "My summary, introduction or description","access_config": "{}","origin_data": "Origin data (optional)","origin_id": 37}
< 200
< Content-Type: application/json; charset=utf-8
{}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}
Delete a conference
Access required to execute this API will be documented shortly.
DELETE conferences/3
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
< 200
< Content-Type: application/json; charset=utf-8
{}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}
Create a new avatar for the current user
Access required to execute this API will be documented shortly.
POST /avatar
> Authorization: Basic N2NiNTI0ZmI2NGViNGUyNmQxYjIzM2QyZjI5M2QxMGM6
> Content-Type: application/json; charset=utf-8
{"upload_url": "http://files.example.com/file/my_master_avatar.png"}
< 201
< Content-Type: application/json; charset=utf-8
{}
+++++
< 401
< Content-Type: application/json; charset=utf-8
{"error":{"code": 401,"text": "HTTP Basic Auth or Cookie Session Required" }}
+++++
< 403
< Content-Type: application/json; charset=utf-8
{"error":{"code":403,"text":"Access Denied"}}