-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathteam_devices.stone
359 lines (281 loc) · 10.9 KB
/
team_devices.stone
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
namespace team
import common
#
# Structs for devices/list_member_devices
#
struct ListMemberDevicesArg
team_member_id String
"The team's member id."
include_web_sessions Boolean = true
"Whether to list web sessions of the team's member."
include_desktop_clients Boolean = true
"Whether to list linked desktop devices of the team's member."
include_mobile_clients Boolean = true
"Whether to list linked mobile devices of the team's member."
example default
team_member_id="dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
struct DeviceSession
session_id String
"The session id."
ip_address String?
"The IP address of the last activity from this session."
country String?
"The country from which the last activity from this session was made."
created common.DropboxTimestamp?
"The time this session was created."
updated common.DropboxTimestamp?
"The time of the last activity from this session."
# TODO(gal) - for mobile, camera uploads don't count for updated activity (See T25556
# for more context). This needs to be documented somewhere.
struct ActiveWebSession extends DeviceSession
"Information on active web sessions."
user_agent String
"Information on the hosting device."
os String
"Information on the hosting operating system."
browser String
"Information on the browser used for this web session."
expires common.DropboxTimestamp?
"The time this session expires."
example default
session_id = "dbwsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
ip_address = "3.3.3.3"
country = "United States"
created = "2015-05-12T15:50:38Z"
updated = "2015-05-12T15:51:22Z"
user_agent = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1"
os = "Windows"
browser = "Chrome"
expires = "2015-05-13T15:51:22Z"
union DesktopPlatform
windows
"Official Windows Dropbox desktop client."
mac
"Official Mac Dropbox desktop client."
linux
"Official Linux Dropbox desktop client."
struct DesktopClientSession extends DeviceSession
"Information about linked Dropbox desktop client sessions."
host_name String
"Name of the hosting desktop."
client_type DesktopPlatform
"The Dropbox desktop client type."
client_version String
"The Dropbox client version."
platform String
"Information on the hosting platform."
is_delete_on_unlink_supported Boolean
"Whether it's possible to delete all of the account files upon unlinking."
example default
session_id= "dbdsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
ip_address = "3.3.3.3"
country = "United States"
created = "2015-05-12T15:50:38Z"
updated = "2015-05-12T15:51:22Z"
host_name = "Home_desktop"
client_type = mac
client_version = "3.9.19"
platform = "Mac OS X 10.10.3"
is_delete_on_unlink_supported = true
union MobileClientPlatform
iphone
"Official Dropbox iPhone client."
ipad
"Official Dropbox iPad client."
android
"Official Dropbox Android client."
windows_phone
"Official Dropbox Windows phone client."
blackberry
"Official Dropbox Blackberry client."
struct MobileClientSession extends DeviceSession
"Information about linked Dropbox mobile client sessions."
device_name String
"The device name."
client_type MobileClientPlatform
"The mobile application type."
client_version String?
"The dropbox client version."
os_version String?
"The hosting OS version."
last_carrier String?
"last carrier used by the device."
example default
session_id = "dbmsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
ip_address = "3.3.3.3"
country = "United States"
created = "2015-05-12T15:50:38Z"
updated = "2015-05-12T15:51:22Z"
device_name = "Iphone 6"
client_type = iphone
client_version = "3.9.5"
os_version = "8.4"
last_carrier = "Verizon"
struct ListMemberDevicesResult
active_web_sessions List(ActiveWebSession)?
"List of web sessions made by this team member."
desktop_client_sessions List(DesktopClientSession)?
"List of desktop clients used by this team member."
mobile_client_sessions List(MobileClientSession)?
"List of mobile client used by this team member."
union ListMemberDevicesError
member_not_found
"Member not found."
#
# Route: devices/list_member_devices
#
route devices/list_member_devices(ListMemberDevicesArg, ListMemberDevicesResult, ListMemberDevicesError)
"List all device sessions of a team's member."
attrs
auth = "team"
scope = "sessions.list"
#
# Structs for devices/list_members_devices
#
struct ListMembersDevicesArg
cursor String?
"At the first call to the :route:`devices/list_members_devices` the cursor shouldn't be passed.
Then, if the result of the call includes a cursor, the following requests should include the
received cursors in order to receive the next sub list of team devices."
include_web_sessions Boolean = true
"Whether to list web sessions of the team members."
include_desktop_clients Boolean = true
"Whether to list desktop clients of the team members."
include_mobile_clients Boolean = true
"Whether to list mobile clients of the team members."
struct MemberDevices
"Information on devices of a team's member."
team_member_id String
"The member unique Id."
web_sessions List(ActiveWebSession)?
"List of web sessions made by this team member."
desktop_clients List(DesktopClientSession)?
"List of desktop clients by this team member."
mobile_clients List(MobileClientSession)?
"List of mobile clients by this team member."
example default
team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU"
struct ListMembersDevicesResult
devices List(MemberDevices)
"The devices of each member of the team."
has_more Boolean
"If true, then there are more devices available. Pass the
cursor to :route:`devices/list_members_devices` to retrieve the rest."
cursor String?
"Pass the cursor into :route:`devices/list_members_devices` to receive the next
sub list of team's devices."
union ListMembersDevicesError
reset
"Indicates that the cursor has been invalidated. Call
:route:`devices/list_members_devices` again with an empty cursor to obtain a new cursor."
#
# Route: devices/list_members_devices
#
route devices/list_members_devices(ListMembersDevicesArg, ListMembersDevicesResult, ListMembersDevicesError)
"List all device sessions of a team.
Permission : Team member file access."
attrs
auth = "team"
scope = "sessions.list"
#
# Structs for devices/revoke_device_session
#
struct DeviceSessionArg
session_id String
"The session id."
team_member_id String
"The unique id of the member owning the device."
example default
session_id = "1234faaf0678bcde"
team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU"
struct RevokeDesktopClientArg extends DeviceSessionArg
delete_on_unlink Boolean = false
"Whether to delete all files of the account (this is possible only if supported by
the desktop client and will be made the next time the client access the account)."
example default
session_id = "1234faaf0678bcde"
team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU"
union_closed RevokeDeviceSessionArg
web_session DeviceSessionArg
"End an active session."
desktop_client RevokeDesktopClientArg
"Unlink a linked desktop device."
mobile_client DeviceSessionArg
"Unlink a linked mobile device."
example default
web_session = default
union RevokeDeviceSessionError
device_session_not_found
"Device session not found."
member_not_found
"Member not found."
#
# Route: devices/revoke_device_session
#
route devices/revoke_device_session(RevokeDeviceSessionArg, Void, RevokeDeviceSessionError)
"Revoke a device session of a team's member."
attrs
auth = "team"
scope = "sessions.modify"
#
# structs for devices/revoke_device_session_batch
#
struct RevokeDeviceSessionBatchArg
revoke_devices List(RevokeDeviceSessionArg)
example default
revoke_devices = [default]
struct RevokeDeviceSessionStatus
success Boolean
"Result of the revoking request."
error_type RevokeDeviceSessionError?
"The error cause in case of a failure."
struct RevokeDeviceSessionBatchResult
revoke_devices_status List(RevokeDeviceSessionStatus)
union RevokeDeviceSessionBatchError
""
#
# Route: devices/revoke_device_session_batch
#
route devices/revoke_device_session_batch(RevokeDeviceSessionBatchArg, RevokeDeviceSessionBatchResult, RevokeDeviceSessionBatchError)
"Revoke a list of device sessions of team members."
attrs
auth = "team"
scope = "sessions.modify"
#
# Deprecated endpoints
#
struct ListTeamDevicesArg
cursor String?
"At the first call to the :route:`devices/list_team_devices` the cursor shouldn't be passed.
Then, if the result of the call includes a cursor, the following requests should include the
received cursors in order to receive the next sub list of team devices."
include_web_sessions Boolean = true
"Whether to list web sessions of the team members."
include_desktop_clients Boolean = true
"Whether to list desktop clients of the team members."
include_mobile_clients Boolean = true
"Whether to list mobile clients of the team members."
example default
cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
struct ListTeamDevicesResult
devices List(MemberDevices)
"The devices of each member of the team."
has_more Boolean
"If true, then there are more devices available. Pass the
cursor to :route:`devices/list_team_devices` to retrieve the rest."
cursor String?
"Pass the cursor into :route:`devices/list_team_devices` to receive the next
sub list of team's devices."
example default
devices = [default]
has_more = false
union ListTeamDevicesError
reset
"Indicates that the cursor has been invalidated. Call
:route:`devices/list_team_devices` again with an empty cursor to obtain a new cursor."
route devices/list_team_devices(ListTeamDevicesArg, ListTeamDevicesResult, ListTeamDevicesError) deprecated by devices/list_members_devices
"List all device sessions of a team.
Permission : Team member file access."
attrs
auth = "team"
scope = "sessions.list"