SHOW:
|
|
- or go back to the newest paste.
1 | ---------------------------------------------------------------------------------------------------------- | |
2 | GET Dir call for samba_available = false shares: | |
3 | ---------------------------------------------------------------------------------------------------------- | |
4 | Request: | |
5 | ---------- | |
6 | GET /api/2.1/rest/dir/PriGPublicShare?owner=admin&pw=&show_is_linked=true HTTP/1.1 | |
7 | Host: 10.104.128.173 | |
8 | Cache-Control: no-cache | |
9 | ||
10 | Response: | |
11 | ---------- | |
12 | <?xml version="1.0" encoding="utf-8"?> | |
13 | <dir> | |
14 | <entry> | |
15 | <is_dir>false</is_dir> | |
16 | <size>319984</size> | |
17 | <path>/PriGPublicShare</path> | |
18 | <name>folder.JPG</name> | |
19 | <mtime>1330206581</mtime> | |
20 | <is_linked>false</is_linked> | |
21 | </entry> | |
22 | <entry> | |
23 | <is_dir>false</is_dir> | |
24 | <size>3713005</size> | |
25 | <path>/PriGPublicShare</path> | |
26 | <name>IMG_0170.JPG</name> | |
27 | <mtime>1320517270</mtime> | |
28 | <is_linked>false</is_linked> | |
29 | </entry> | |
30 | <entry> | |
31 | <is_dir>false</is_dir> | |
32 | <size>3754927</size> | |
33 | <path>/PriGPublicShare</path> | |
34 | <name>IMG.JPG</name> | |
35 | <mtime>1320517276</mtime> | |
36 | <is_linked>false</is_linked> | |
37 | </entry> | |
38 | </dir> | |
39 | ||
40 | ---------------------------------------------------------------------------------------------------------- | |
41 | GET Dir call for samba_available = true shares: | |
42 | ---------------------------------------------------------------------------------------------------------- | |
43 | Request: | |
44 | ---------- | |
45 | GET /api/2.1/rest/dir/Priyanka?owner=admin&pw=&show_is_linked=true HTTP/1.1 | |
46 | Host: 10.104.128.173 | |
47 | Cache-Control: no-cache | |
48 | ||
49 | Response: | |
50 | ---------- | |
51 | <?xml version="1.0" encoding="utf-8"?> | |
52 | <dir> | |
53 | <entry> | |
54 | <is_dir>false</is_dir> | |
55 | <size>3754927</size> | |
56 | <path>/Priyanka</path> | |
57 | <name>IMG.JPG</name> | |
58 | <mtime>1320517276</mtime> | |
59 | <is_linked>true</is_linked> | |
60 | </entry> | |
61 | <entry> | |
62 | <is_dir>true</is_dir> | |
63 | <path>/Priyanka</path> | |
64 | <name>Audiobooks</name> | |
65 | <mtime>1413498339</mtime> | |
66 | <is_linked>false</is_linked> | |
67 | </entry> | |
68 | </dir> | |
69 | -------------------------------------------------------------------------------------------------------------------------------------- | |
70 | Call POST hmac to get auth code | |
71 | -------------------------------------------------------------------------------------------------------------------------------------- | |
72 | Request: | |
73 | ---------- | |
74 | POST /api/2.1/rest/hmac/Public?device_user_id=974321 HTTP/1.1 | |
75 | Host: 10.104.128.173 | |
76 | Cache-Control: no-cache | |
77 | ||
78 | Response: | |
79 | ---------- | |
80 | <?xml version="1.0" encoding="utf-8"?> | |
81 | <hmac> | |
82 | <hmac>eyJkZXZpY2VfdXNlcl9pZCI6Ijk3NDMyMSIsInBhdGgiOiJcL1B1YmxpYyIsImhtYWMiOiIwN2YxODMyODNhZDFjMWE2YTZkODczYWUzMmE1ZjVmOGI0Yzc5NWIwMzg1ZGI2OTNkZjY4ZDU2MGM0NzFiOTExIn0=</hmac> | |
83 | </hmac> | |
84 | -------------------------------------------------------------------------------------------------------------------------------------- | |
85 | Call POST shares to create Private share | |
86 | -------------------------------------------------------------------------------------------------------------------------------------- | |
87 | Request: | |
88 | ---------- | |
89 | POST /api/2.1/rest/shares?owner=admin&pw= HTTP/1.1 | |
90 | Host: 10.104.128.173 | |
91 | Cache-Control: no-cache | |
92 | ||
93 | Content-Disposition: form-data; name="share_name" | |
94 | priyankaprivateshare | |
95 | Content-Disposition: form-data; name="public_access" | |
96 | false | |
97 | Content-Disposition: form-data; name="samba_available" | |
98 | false | |
99 | Content-Disposition: form-data; name="target_path" | |
100 | Content-Disposition: form-data; name="share_access_locked" | |
101 | true | |
102 | Content-Disposition: form-data; name="grant_share_access" | |
103 | true | |
104 | ||
105 | Response: | |
106 | ---------- | |
107 | <?xml version="1.0" encoding="utf-8"?> | |
108 | <shares> | |
109 | <status>success</status> | |
110 | </shares> | |
111 | ||
112 | -------------------------------------------------------------------------------------------------------------------------------------- | |
113 | Call POST shares to create Public share | |
114 | -------------------------------------------------------------------------------------------------------------------------------------- | |
115 | Request: | |
116 | ---------- | |
117 | POST /api/2.1/rest/shares?owner=admin&pw= HTTP/1.1 | |
118 | Host: 10.104.128.173 | |
119 | Cache-Control: no-cache | |
120 | ||
121 | Content-Disposition: form-data; name="share_name" | |
122 | PriGPublicShare | |
123 | Content-Disposition: form-data; name="public_access" | |
124 | false | |
125 | Content-Disposition: form-data; name="samba_available" | |
126 | false | |
127 | Content-Disposition: form-data; name="target_path" | |
128 | Content-Disposition: form-data; name="share_access_locked" | |
129 | false | |
130 | Content-Disposition: form-data; name="grant_share_access" | |
131 | true | |
132 | ||
133 | Response: | |
134 | ---------- | |
135 | <?xml version="1.0" encoding="utf-8"?> | |
136 | <shares> | |
137 | <status>success</status> | |
138 | </shares> | |
139 | -------------------------------------------------------------------------------------------------------------------------------------- | |
140 | Call POST shares to create Collaborative share | |
141 | -------------------------------------------------------------------------------------------------------------------------------------- | |
142 | Request: | |
143 | ---------- | |
144 | POST /api/2.1/rest/shares?owner=admin&pw= HTTP/1.1 | |
145 | Host: 10.104.128.173 | |
146 | Cache-Control: no-cache | |
147 | ||
148 | Content-Disposition: form-data; name="share_name" | |
149 | PriGCollabShare | |
150 | Content-Disposition: form-data; name="public_access" | |
151 | false | |
152 | Content-Disposition: form-data; name="samba_available" | |
153 | false | |
154 | Content-Disposition: form-data; name="target_path" | |
155 | Content-Disposition: form-data; name="share_access_locked" | |
156 | false | |
157 | Content-Disposition: form-data; name="grant_share_access" | |
158 | true | |
159 | Content-Disposition: form-data; name="target_path" | |
160 | /Public/Playlists/ | |
161 | Response: | |
162 | ---------- | |
163 | <?xml version="1.0" encoding="utf-8"?> | |
164 | <shares> | |
165 | <status>success</status> | |
166 | </shares> | |
167 | -------------------------------------------------------------------------------------------------------------------------------------- | |
168 | Call GET shares to check shares | |
169 | -------------------------------------------------------------------------------------------------------------------------------------- | |
170 | Request: | |
171 | ---------- | |
172 | GET /api/2.1/rest/shares?owner=admin&pw= HTTP/1.1 | |
173 | Host: 10.104.128.173 | |
174 | Cache-Control: no-cache | |
175 | ||
176 | Response: | |
177 | ---------- | |
178 | <?xml version="1.0" encoding="utf-8"?> | |
179 | <shares> | |
180 | <share> | |
181 | <share_name>Public</share_name> | |
182 | <description>Public Share</description> | |
183 | <size>95009338</size> | |
184 | <remote_access>true</remote_access> | |
185 | <public_access>true</public_access> | |
186 | <media_serving>none</media_serving> | |
187 | <volume_id>1</volume_id> | |
188 | <dynamic_volume>false</dynamic_volume> | |
189 | <samba_available>true</samba_available> | |
190 | <share_access_locked>false</share_access_locked> | |
191 | <target_path></target_path> | |
192 | </share> | |
193 | <share> | |
194 | <share_name>SmartWare</share_name> | |
195 | <description>SmartWare</description> | |
196 | <size>4096</size> | |
197 | <remote_access>true</remote_access> | |
198 | <public_access>true</public_access> | |
199 | <media_serving>none</media_serving> | |
200 | <volume_id>1</volume_id> | |
201 | <dynamic_volume>false</dynamic_volume> | |
202 | <samba_available>true</samba_available> | |
203 | <share_access_locked>false</share_access_locked> | |
204 | <target_path></target_path> | |
205 | </share> | |
206 | <share> | |
207 | <share_name>TimeMachineBackup</share_name> | |
208 | <description>TimeMachine</description> | |
209 | <size>4096</size> | |
210 | <remote_access>true</remote_access> | |
211 | <public_access>true</public_access> | |
212 | <media_serving>none</media_serving> | |
213 | <volume_id>1</volume_id> | |
214 | <dynamic_volume>false</dynamic_volume> | |
215 | <samba_available>true</samba_available> | |
216 | <share_access_locked>false</share_access_locked> | |
217 | <target_path></target_path> | |
218 | </share> | |
219 | <share> | |
220 | <share_name>Test10</share_name> | |
221 | <description></description> | |
222 | <size>45056</size> | |
223 | <remote_access>true</remote_access> | |
224 | <public_access>true</public_access> | |
225 | <media_serving>none</media_serving> | |
226 | <volume_id>1</volume_id> | |
227 | <dynamic_volume>false</dynamic_volume> | |
228 | <samba_available>true</samba_available> | |
229 | <share_access_locked>false</share_access_locked> | |
230 | <target_path></target_path> | |
231 | </share> | |
232 | <share> | |
233 | <share_name>ravi</share_name> | |
234 | <description></description> | |
235 | <size>4096</size> | |
236 | <remote_access>true</remote_access> | |
237 | <public_access>true</public_access> | |
238 | <media_serving>none</media_serving> | |
239 | <volume_id>1</volume_id> | |
240 | <dynamic_volume>false</dynamic_volume> | |
241 | <samba_available>true</samba_available> | |
242 | <share_access_locked>false</share_access_locked> | |
243 | <target_path></target_path> | |
244 | </share> | |
245 | <share> | |
246 | <share_name>raviShare</share_name> | |
247 | <description></description> | |
248 | <size>0</size> | |
249 | <remote_access>true</remote_access> | |
250 | <public_access>false</public_access> | |
251 | <media_serving>none</media_serving> | |
252 | <volume_id>1</volume_id> | |
253 | <dynamic_volume>false</dynamic_volume> | |
254 | <samba_available>true</samba_available> | |
255 | <share_access_locked>false</share_access_locked> | |
256 | <target_path></target_path> | |
257 | </share> | |
258 | <share> | |
259 | <share_name>publicshare</share_name> | |
260 | <description></description> | |
261 | <size>0</size> | |
262 | <remote_access>true</remote_access> | |
263 | <public_access>false</public_access> | |
264 | <media_serving>none</media_serving> | |
265 | <volume_id>1</volume_id> | |
266 | <dynamic_volume>false</dynamic_volume> | |
267 | <samba_available>true</samba_available> | |
268 | <share_access_locked>false</share_access_locked> | |
269 | <target_path></target_path> | |
270 | </share> | |
271 | <share> | |
272 | <share_name>publicshare2</share_name> | |
273 | <description></description> | |
274 | <size>0</size> | |
275 | <remote_access>true</remote_access> | |
276 | <public_access>false</public_access> | |
277 | <media_serving>none</media_serving> | |
278 | <volume_id>1</volume_id> | |
279 | <dynamic_volume>false</dynamic_volume> | |
280 | <samba_available>true</samba_available> | |
281 | <share_access_locked>false</share_access_locked> | |
282 | <target_path></target_path> | |
283 | </share> | |
284 | <share> | |
285 | <share_name>publicshare3</share_name> | |
286 | <description></description> | |
287 | <size>0</size> | |
288 | <remote_access>true</remote_access> | |
289 | <public_access>false</public_access> | |
290 | <media_serving>none</media_serving> | |
291 | <volume_id>1</volume_id> | |
292 | <dynamic_volume>false</dynamic_volume> | |
293 | <samba_available>true</samba_available> | |
294 | <share_access_locked>false</share_access_locked> | |
295 | <target_path></target_path> | |
296 | </share> | |
297 | <share> | |
298 | <share_name>PublicLS</share_name> | |
299 | <description></description> | |
300 | <size>0</size> | |
301 | <remote_access>true</remote_access> | |
302 | <public_access>false</public_access> | |
303 | <media_serving>none</media_serving> | |
304 | <volume_id>1</volume_id> | |
305 | <dynamic_volume>false</dynamic_volume> | |
306 | <samba_available>false</samba_available> | |
307 | <share_access_locked>true</share_access_locked> | |
308 | <target_path></target_path> | |
309 | </share> | |
310 | <share> | |
311 | <share_name>priyankaprivateshare</share_name> | |
312 | <description></description> | |
313 | <size>0</size> | |
314 | <remote_access>true</remote_access> | |
315 | <public_access>false</public_access> | |
316 | <media_serving>none</media_serving> | |
317 | <volume_id>1</volume_id> | |
318 | <dynamic_volume>false</dynamic_volume> | |
319 | <samba_available>false</samba_available> | |
320 | <share_access_locked>true</share_access_locked> | |
321 | <target_path></target_path> | |
322 | </share> | |
323 | <share> | |
324 | <share_name>priyankaprivateshare1</share_name> | |
325 | <description></description> | |
326 | <size>0</size> | |
327 | <remote_access>true</remote_access> | |
328 | <public_access>false</public_access> | |
329 | <media_serving>none</media_serving> | |
330 | <volume_id>1</volume_id> | |
331 | <dynamic_volume>false</dynamic_volume> | |
332 | <samba_available>false</samba_available> | |
333 | <share_access_locked>true</share_access_locked> | |
334 | <target_path></target_path> | |
335 | </share> | |
336 | <share> | |
337 | <share_name>PriGPublicShare</share_name> | |
338 | <description></description> | |
339 | <size>0</size> | |
340 | <remote_access>true</remote_access> | |
341 | <public_access>false</public_access> | |
342 | <media_serving>none</media_serving> | |
343 | <volume_id>1</volume_id> | |
344 | <dynamic_volume>false</dynamic_volume> | |
345 | <samba_available>false</samba_available> | |
346 | <share_access_locked>false</share_access_locked> | |
347 | <target_path></target_path> | |
348 | </share> | |
349 | <share> | |
350 | <share_name>PriGPublicShare1</share_name> | |
351 | <description></description> | |
352 | <size>0</size> | |
353 | <remote_access>true</remote_access> | |
354 | <public_access>false</public_access> | |
355 | <media_serving>none</media_serving> | |
356 | <volume_id>1</volume_id> | |
357 | <dynamic_volume>false</dynamic_volume> | |
358 | <samba_available>false</samba_available> | |
359 | <share_access_locked>false</share_access_locked> | |
360 | <target_path></target_path> | |
361 | </share> | |
362 | <share> | |
363 | <share_name>PriGPublicShare2</share_name> | |
364 | <description></description> | |
365 | <size>0</size> | |
366 | <remote_access>true</remote_access> | |
367 | <public_access>false</public_access> | |
368 | <media_serving>none</media_serving> | |
369 | <volume_id>1</volume_id> | |
370 | <dynamic_volume>false</dynamic_volume> | |
371 | <samba_available>false</samba_available> | |
372 | <share_access_locked>false</share_access_locked> | |
373 | <target_path></target_path> | |
374 | </share> | |
375 | <share> | |
376 | <share_name>PriGCollabShare</share_name> | |
377 | <description/> | |
378 | <size>0</size> | |
379 | <remote_access>true</remote_access> | |
380 | <public_access>false</public_access> | |
381 | <media_serving>none</media_serving> | |
382 | <volume_id>1</volume_id> | |
383 | <dynamic_volume>false</dynamic_volume> | |
384 | <samba_available>false</samba_available> | |
385 | <share_access_locked>false</share_access_locked> | |
386 | <target_path>/Public/Playlists</target_path> | |
387 | </share> | |
388 | </shares> | |
389 | ||
390 | -------------------------------------------------------------------------------------------------------------------------------------- | |
391 | Call PUT links for public share | |
392 | -------------------------------------------------------------------------------------------------------------------------------------- | |
393 | Request: | |
394 | ---------- | |
395 | PUT /api/2.1/rest/links?owner=admin&pw= HTTP/1.1 | |
396 | Host: 10.104.128.173 | |
397 | Content-Type: application/json | |
398 | Cache-Control: no-cache | |
399 | ||
400 | {"links": [{"target_path": "/Public/ABC.mp3", "link_path": "/PriGPublicShare/ABC1.mp3"}]} | |
401 | ||
402 | Response: | |
403 | ---------- | |
404 | <?xml version="1.0" encoding="utf-8"?> | |
405 | <links> | |
406 | <status>Success</status> | |
407 | </links> | |
408 | -------------------------------------------------------------------------------------------------------------------------------------- | |
409 | Call PUT links for private share | |
410 | -------------------------------------------------------------------------------------------------------------------------------------- | |
411 | Request: | |
412 | ---------- | |
413 | PUT /api/2.1/rest/links?owner=admin&pw= HTTP/1.1 | |
414 | Host: 10.104.128.173 | |
415 | Content-Type: application/json | |
416 | Cache-Control: no-cache | |
417 | ||
418 | {"links": [{"target_path": "/Public/ABC.mp3", "link_path": "/priyankaprivateshare/ABC1.mp3"}]} | |
419 | ||
420 | Response: | |
421 | ---------- | |
422 | <?xml version="1.0" encoding="utf-8"?> | |
423 | <links> | |
424 | <status>Success</status> | |
425 | </links> | |
426 | ||
427 | -------------------------------------------------------------------------------------------------------------------------------------- | |
428 | Call GET links for link_path | |
429 | -------------------------------------------------------------------------------------------------------------------------------------- | |
430 | Request: | |
431 | ---------- | |
432 | GET /api/2.1/rest/links//PriGPublicShare/ABC1.mp3?owner=admin&pw= HTTP/1.1 | |
433 | Host: 10.104.128.173 | |
434 | Cache-Control: no-cache | |
435 | ||
436 | Response: | |
437 | ---------- | |
438 | <?xml version="1.0" encoding="utf-8"?> | |
439 | <links> | |
440 | <link> | |
441 | <link_path>/PriGPublicShare/ABC1.mp3</link_path> | |
442 | <target_path>/Public/ABC.mp3</target_path> | |
443 | <owner> | |
444 | <username>root</username> | |
445 | </owner> | |
446 | </link> | |
447 | </links> | |
448 | ||
449 | -------------------------------------------------------------------------------------------------------------------------------------- | |
450 | Call GET links for target_path | |
451 | -------------------------------------------------------------------------------------------------------------------------------------- | |
452 | Request: | |
453 | ---------- | |
454 | GET /api/2.1/rest/links?target_path=/Public/ABC.mp3&owner=admin&pw= HTTP/1.1 | |
455 | Host: 10.104.128.173 | |
456 | Cache-Control: no-cache | |
457 | Response: | |
458 | ---------- | |
459 | <?xml version="1.0" encoding="utf-8"?> | |
460 | <links> | |
461 | <link> | |
462 | <link_path>/priyankaprivateshare1/ABC1.mp3</link_path> | |
463 | <target_path>/Public/ABC.mp3</target_path> | |
464 | <owner> | |
465 | <username>root</username> | |
466 | </owner> | |
467 | </link> | |
468 | <link> | |
469 | <link_path>/PriGPublicShare/ABC1.mp3</link_path> | |
470 | <target_path>/Public/ABC.mp3</target_path> | |
471 | <owner> | |
472 | <username>root</username> | |
473 | </owner> | |
474 | </link> | |
475 | </links> | |
476 | -------------------------------------------------------------------------------------------------------------------------------------- | |
477 | Call DELETE links without request body | |
478 | -------------------------------------------------------------------------------------------------------------------------------------- | |
479 | Request: | |
480 | ---------- | |
481 | DELETE /api/2.1/rest/links//PriGPublicShare/ABC1.mp3?owner=admin&pw= HTTP/1.1 | |
482 | Host: 10.104.128.173 | |
483 | Cache-Control: no-cache | |
484 | ||
485 | Response: | |
486 | ---------- | |
487 | <?xml version="1.0" encoding="utf-8"?> | |
488 | <links> | |
489 | <status>Success</status> | |
490 | </links> | |
491 | -------------------------------------------------------------------------------------------------------------------------------------- | |
492 | Call DELETE links without request body | |
493 | -------------------------------------------------------------------------------------------------------------------------------------- | |
494 | Request: | |
495 | ---------- | |
496 | DELETE /api/2.1/rest/links?owner=admin&pw= HTTP/1.1 | |
497 | Host: 10.104.128.173 | |
498 | Content-Type: application/json | |
499 | Cache-Control: no-cache | |
500 | ||
501 | { "links": [ {"link_path": "/priyankaprivateshare1/ABC1.mp3"} ] } | |
502 | ||
503 | Response: | |
504 | ---------- | |
505 | <?xml version="1.0" encoding="utf-8"?> | |
506 | <links> | |
507 | <status>Success</status> | |
508 | </links> |