Warning, /webapps/ocs-fileserver/docs/ocs-fileserver-API.md is written in an unsupported language. File is not indexed.
0001 # ocs-fileserver-API 0002 0003 0004 ## Client registration 0005 0006 To use the ocs-fileserver-API, 0007 client application should be register into ocs-fileserver. 0008 And get Client ID and Secret Key for authentication. 0009 0010 However, ocs-fileserver does not serves a register page. 0011 So registration process is manually as a part of ocs-fileserver development. 0012 0013 Please see: {project}/api_application/configs/clients.ini 0014 0015 0016 ## Data relationship 0017 0018 To store a data into ocs-fileserver and make a data relationship, 0019 some metadata like User ID in client service side has been required. 0020 0021 If need keep data relationship, 0022 client application should be update the metadata stored in ocs-fileserver 0023 when the metadata in client service side changed. 0024 0025 0026 ---- 0027 0028 0029 ## API base URI 0030 0031 API base URI: https://dl.opendesktop.org/api/ 0032 0033 0034 ## General request parameters 0035 0036 These request parameters are possible to use on all API call. 0037 0038 Parameter | Required | Value | Default | Description 0039 ----------|----------|-------|---------|------------ 0040 format | - | xml/json | xml | Response data format. 0041 callback | - | callback_name | - | If format=json, will make response data into JSONP. 0042 ignore_status_code | - | 0/1 | 0 | Ignore HTTP status code and send back 200 code always. 0043 0044 0045 ## HTTP method override 0046 0047 The ocs-fileserver-API has supported GET, PUT, DELETE and POST methods, 0048 and those methods are possible to override by 0049 POST with "X-HTTP-Method-Override" header or "method" parameter. 0050 0051 HTTP method | HTTP header | Required | Value | Default | Description 0052 ------------|-------------|----------|-------|---------|------------ 0053 POST | X-HTTP-Method-Override | - | GET/PUT/DELETE | - | HTTP method override. 0054 0055 HTTP method | Parameter | Required | Value | Default | Description 0056 ------------|-----------|----------|-------|---------|------------ 0057 POST | method | - | GET/PUT/DELETE | - | HTTP method override. 0058 0059 0060 ## Response data 0061 0062 HTTP status code will present response status, 0063 and response data contain "status" field. 0064 0065 Available data format: XML/JSON/JSONP 0066 0067 Available/Reserved status value: success/error/failure/unknown 0068 0069 Example of XML data (application/xml): 0070 0071 <?xml version="1.0" encoding="UTF-8"?> 0072 <response> 0073 <status>success</status> 0074 </response> 0075 0076 Example of JSON data (application/json): 0077 0078 {"status":"success"} 0079 0080 Example of JSONP data (text/javascript): 0081 0082 callback_name({"status":"success"}) 0083 0084 0085 ## Error exception 0086 0087 HTTP status code will present response status, 0088 and response data contain "message" field and "errors" field, if possible. 0089 0090 Example of error: 0091 0092 <?xml version="1.0" encoding="UTF-8"?> 0093 <response> 0094 <status>error</status> 0095 <message>Validation error</message> 0096 <errors> 0097 <owner_id>Required</owner_id> 0098 </errors> 0099 </response> 0100 0101 0102 ---- 0103 0104 0105 ## Profiles 0106 0107 ### Get index of profiles 0108 0109 Request: GET {baseURI}/profiles/index 0110 0111 Parameter | Required | Value | Default | Description 0112 ----------|----------|-------|---------|------------ 0113 status | - | active/inactive/all | active | Profile status. 0114 client_id | - | Client ID | - | Client ID. 0115 owner_id | - | User ID | - | User ID. 0116 search | - | Search term | - | 3 or more strings. 0117 ids | - | ID,ID,ID | - | Profile ID list as comma-separated list. 0118 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0119 sort | - | name/newest | name | Sort order. 0120 perpage | - | 1-100 | 20 | How many results retrieve per request. 0121 page | - | 1-n | 1 | Page number of pagination. 0122 0123 ### Get profile 0124 0125 Request: GET {baseURI}/profiles/profile 0126 0127 Parameter | Required | Value | Default | Description 0128 ----------|----------|-------|---------|------------ 0129 id | Yes | Profile ID | - | Profile ID. 0130 0131 ### Add/Update profile 0132 0133 Request: POST {baseURI}/profiles/profile 0134 0135 Parameter | Required | Value | Default | Description 0136 ----------|----------|-------|---------|------------ 0137 client_id | Yes | Client ID | - | Client ID. 0138 secret | Yes | Secret key | - | Secret key. 0139 owner_id | Yes | User ID | - | User ID. 0140 name | Yes | Name | - | User screen name. 0141 email | - | Email address | - | Additional information. 0142 homepage | - | Homepage address | - | Additional information. 0143 image | - | Image address | - | Additional information. 0144 description | - | Description | - | Additional information. 0145 0146 ### Update profile 0147 0148 Request: PUT {baseURI}/profiles/profile 0149 0150 Parameter | Required | Value | Default | Description 0151 ----------|----------|-------|---------|------------ 0152 client_id | Yes | Client ID | - | Client ID. 0153 secret | Yes | Secret key | - | Secret key. 0154 id | Yes | Profile ID | - | Profile ID. 0155 name | - | Name | - | User screen name. 0156 email | - | Email address | - | Additional information. 0157 homepage | - | Homepage address | - | Additional information. 0158 image | - | Image address | - | Additional information. 0159 description | - | Description | - | Additional information. 0160 0161 ### Delete profile 0162 0163 Request: DELETE {baseURI}/profiles/profile 0164 0165 Parameter | Required | Value | Default | Description 0166 ----------|----------|-------|---------|------------ 0167 client_id | Yes | Client ID | - | Client ID. 0168 secret | Yes | Secret key | - | Secret key. 0169 id | Yes | Profile ID | - | Profile ID. 0170 0171 0172 ## Collections 0173 0174 Collection has represent a directory. 0175 0176 ### Get index of collections 0177 0178 Request: GET {baseURI}/collections/index 0179 0180 Parameter | Required | Value | Default | Description 0181 ----------|----------|-------|---------|------------ 0182 status | - | active/inactive/all | active | Collection status. 0183 client_id | - | Client ID | - | Client ID. 0184 owner_id | - | User ID | - | User ID. 0185 category | - | Category | - | Category. 0186 tags | - | Tag,Tag,Tag | - | Tag list as comma-separated list. 0187 content_id | - | Content ID | - | Content ID. 0188 search | - | Search term | - | 3 or more strings. 0189 ids | - | ID,ID,ID | - | Collection ID list as comma-separated list. 0190 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0191 downloaded_timeperiod_begin | - | Datetime | 1970-01-01 00:00:00 | Begin of the downloaded time period. 0192 downloaded_timeperiod_end | - | Datetime | Current datetime | End of the downloaded time period. 0193 sort | - | name/newest/recent/frequent | name | Sort order. 0194 perpage | - | 1-100 | 20 | How many results retrieve per request. 0195 page | - | 1-n | 1 | Page number of pagination. 0196 0197 ### Get collection 0198 0199 Request: GET {baseURI}/collections/collection 0200 0201 Parameter | Required | Value | Default | Description 0202 ----------|----------|-------|---------|------------ 0203 id | Yes | Collection ID | - | Collection ID. 0204 0205 ### Add collection 0206 0207 Request: POST {baseURI}/collections/collection 0208 0209 Parameter | Required | Value | Default | Description 0210 ----------|----------|-------|---------|------------ 0211 client_id | Yes | Client ID | - | Client ID. 0212 secret | Yes | Secret key | - | Secret key. 0213 owner_id | Yes | User ID | - | User ID. 0214 title | - | Title | Auto generated name | Additional information. 0215 description | - | Description | - | Additional information. 0216 category | - | Category | - | Additional information. 0217 tags | - | Tag,Tag,Tag | - | Additional information. Tag list as comma-separated list. 0218 version | - | Version number | - | Additional information. 0219 content_id | - | Content ID | - | Additional information. 0220 content_page | - | Content page address | - | Additional information. 0221 0222 ### Update collection 0223 0224 Request: PUT {baseURI}/collections/collection 0225 0226 Parameter | Required | Value | Default | Description 0227 ----------|----------|-------|---------|------------ 0228 client_id | Yes | Client ID | - | Client ID. 0229 secret | Yes | Secret key | - | Secret key. 0230 id | Yes | Collection ID | - | Collection ID. 0231 title | - | Title | - | Additional information. 0232 description | - | Description | - | Additional information. 0233 category | - | Category | - | Additional information. 0234 tags | - | Tag,Tag,Tag | - | Additional information. Tag list as comma-separated list. 0235 version | - | Version number | - | Additional information. 0236 content_id | - | Content ID | - | Additional information. 0237 content_page | - | Content page address | - | Additional information. 0238 0239 ### Delete collection 0240 0241 Request: DELETE {baseURI}/collections/collection 0242 0243 Parameter | Required | Value | Default | Description 0244 ----------|----------|-------|---------|------------ 0245 client_id | Yes | Client ID | - | Client ID. 0246 secret | Yes | Secret key | - | Secret key. 0247 id | Yes | Collection ID | - | Collection ID. 0248 0249 ### Download collection (Disabled) 0250 0251 Request: GET {baseURI}/collections/download 0252 0253 Parameter | Required | Value | Default | Description 0254 ----------|----------|-------|---------|------------ 0255 id | Yes | Collection ID | - | Collection ID. 0256 0257 Response: gzip data (application/x-gzip) 0258 0259 0260 ## Files 0261 0262 ### Get index of files 0263 0264 Request: GET {baseURI}/files/index 0265 0266 Parameter | Required | Value | Default | Description 0267 ----------|----------|-------|---------|------------ 0268 origin_id | - | Original file ID | - | Original file ID. 0269 status | - | active/inactive/all | active | File status. 0270 client_id | - | Client ID | - | Client ID. 0271 owner_id | - | User ID | - | User ID. 0272 collection_id | - | Collection ID | - | Collection ID. 0273 collection_status | - | active/inactive/all | active | Collection status. 0274 collection_category | - | Collection category | - | Collection category. 0275 collection_tags | - | Tag,Tag,Tag | - | Collection tag list as comma-separated list. 0276 collection_content_id | - | Collection content ID | - | Collection content ID. 0277 types | - | audio/mpeg,video/mpeg,video/mp4 | - | File type list as comma-separated list. 0278 category | - | Category | - | Category. 0279 tags | - | Tag,Tag,Tag | - | Tag list as comma-separated list. 0280 ocs_compatibility | - | compatible/incompatible/all | all | OCS compatibility. 0281 content_id | - | Content ID | - | Content ID. 0282 search | - | Search term | - | 3 or more strings. 0283 ids | - | ID,ID,ID | - | File ID list as comma-separated list. 0284 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0285 downloaded_timeperiod_begin | - | Datetime | 1970-01-01 00:00:00 | Begin of the downloaded time period. 0286 downloaded_timeperiod_end | - | Datetime | Current datetime | End of the downloaded time period. 0287 sort | - | name/newest/recent/frequent | name | Sort order. 0288 perpage | - | 1-100 | 20 | How many results retrieve per request. 0289 page | - | 1-n | 1 | Page number of pagination. 0290 0291 ### Get file 0292 0293 Request: GET {baseURI}/files/file 0294 0295 Parameter | Required | Value | Default | Description 0296 ----------|----------|-------|---------|------------ 0297 id | Yes | File ID | - | File ID. 0298 0299 ### Add file 0300 0301 When a file has been added without specific collection_id, 0302 a new collection created automatically 0303 and append the file to the new collection. 0304 0305 Request: POST {baseURI}/files/file 0306 0307 Enctype: multipart/form-data 0308 0309 Parameter | Required | Value | Default | Description 0310 ----------|----------|-------|---------|------------ 0311 client_id | Yes | Client ID | - | Client ID. 0312 secret | Yes | Secret key | - | Secret key. 0313 owner_id | Yes | User ID | - | User ID. 0314 file | Yes | FILE | - | Upload file. 0315 collection_id | - | Collection ID | Auto created collection's ID | Append to specific collection. 0316 title | - | Title | Upload file name | Additional information. 0317 description | - | Description | - | Additional information. 0318 category | - | Category | - | Additional information. 0319 tags | - | Tag,Tag,Tag | - | Additional information. Tag list as comma-separated list. 0320 version | - | Version number | - | Additional information. 0321 ocs_compatible | - | 0/1 | 1 | Additional information. 0322 content_id | - | Content ID | - | Additional information. 0323 content_page | - | Content page address | - | Additional information. 0324 0325 Special parameters for hive files importing (Deprecated): 0326 0327 Parameter | Required | Value | Default | Description 0328 ----------|----------|-------|---------|------------ 0329 local_file_path | - | Path/to/local/file | - | File path of local file. 0330 local_file_name | - | File name | - | File name. 0331 downloaded_count | - | 0-n | - | Download counter. 0332 0333 ### Update file 0334 0335 If a new file uploaded, 0336 old file has removed and replace to the new file with new file id. 0337 0338 Request: PUT {baseURI}/files/file 0339 0340 Enctype: multipart/form-data 0341 0342 Parameter | Required | Value | Default | Description 0343 ----------|----------|-------|---------|------------ 0344 client_id | Yes | Client ID | - | Client ID. 0345 secret | Yes | Secret key | - | Secret key. 0346 id | Yes | File ID | - | File ID. 0347 file | - | FILE | - | Upload file. 0348 title | - | Title | - | Additional information. 0349 description | - | Description | - | Additional information. 0350 category | - | Category | - | Additional information. 0351 tags | - | Tag,Tag,Tag | - | Additional information. Tag list as comma-separated list. 0352 version | - | Version number | - | Additional information. 0353 ocs_compatible | - | 0/1 | 1 | Additional information. 0354 content_id | - | Content ID | - | Additional information. 0355 content_page | - | Content page address | - | Additional information. 0356 0357 ### Delete file 0358 0359 Request: DELETE {baseURI}/files/file 0360 0361 Parameter | Required | Value | Default | Description 0362 ----------|----------|-------|---------|------------ 0363 client_id | Yes | Client ID | - | Client ID. 0364 secret | Yes | Secret key | - | Secret key. 0365 id | Yes | File ID | - | File ID. 0366 0367 ### Download file 0368 0369 If request URI ended with .zsync, 0370 the response is zsync data of uploaded data. 0371 0372 Request: GET {baseURI}/files/download 0373 0374 Parameter | Required | Value | Default | Description 0375 ----------|----------|-------|---------|------------ 0376 id | Yes | File ID | - | File ID. 0377 as | - | self/origin/latest | - | Downloads file as of specific version. 0378 u | - | User ID | - | User ID. 0379 0380 Response: Uploaded data or zsync data or redirect to external URI 0381 0382 Special parameters for security reason: 0383 0384 Parameter | Required | Value | Default | Description 0385 ----------|----------|-------|---------|------------ 0386 s | - | Hash | - | Hash. 0387 t | - | Timestamp | - | Timestamp. 0388 o | - | 1 | - | Option for OCS-API. 0389 0390 0391 ## Favorites 0392 0393 ### Get index of favorites 0394 0395 Request: GET {baseURI}/favorites/index 0396 0397 Parameter | Required | Value | Default | Description 0398 ----------|----------|-------|---------|------------ 0399 client_id | - | Client ID | - | Client ID. 0400 user_id | - | User ID | - | User ID. 0401 owner_id | - | User ID | - | User ID. 0402 collection_id | - | Collection ID | - | Collection ID. 0403 file_id | - | File ID | - | File ID. 0404 ids | - | ID,ID,ID | - | Favorite ID list as comma-separated list. 0405 perpage | - | 1-100 | 20 | How many results retrieve per request. 0406 page | - | 1-n | 1 | Page number of pagination. 0407 0408 ### Get favorite 0409 0410 Request: GET {baseURI}/favorites/favorite 0411 0412 Parameter | Required | Value | Default | Description 0413 ----------|----------|-------|---------|------------ 0414 id | Yes | Favorite ID | - | Favorite ID. 0415 0416 ### Add/Get favorite 0417 0418 Request: POST {baseURI}/favorites/favorite 0419 0420 Parameter | Required | Value | Default | Description 0421 ----------|----------|-------|---------|------------ 0422 client_id | Yes | Client ID | - | Client ID. 0423 secret | Yes | Secret key | - | Secret key. 0424 user_id | Yes | User ID | - | User ID. 0425 owner_id | - | User ID | - | User ID. Add to favorite. 0426 collection_id | - | Collection ID | - | Collection ID. Add to favorite. 0427 file_id | - | File ID | - | File ID. Add to favorite. 0428 0429 ### Delete favorite 0430 0431 Request: DELETE {baseURI}/favorites/favorite 0432 0433 Parameter | Required | Value | Default | Description 0434 ----------|----------|-------|---------|------------ 0435 client_id | Yes | Client ID | - | Client ID. 0436 secret | Yes | Secret key | - | Secret key. 0437 id | Yes | Favorite ID | - | Favorite ID. 0438 0439 0440 ## Owners 0441 0442 ### Delete owner 0443 0444 Request: DELETE {baseURI}/owners/owner 0445 0446 Parameter | Required | Value | Default | Description 0447 ----------|----------|-------|---------|------------ 0448 client_id | Yes | Client ID | - | Client ID. 0449 secret | Yes | Secret key | - | Secret key. 0450 id | Yes | User ID | - | User ID. 0451 0452 0453 ## Media 0454 0455 ### Get index of genres in media 0456 0457 Request: GET {baseURI}/media/genres 0458 0459 Parameter | Required | Value | Default | Description 0460 ----------|----------|-------|---------|------------ 0461 client_id | - | Client ID | - | Client ID. 0462 owner_id | - | User ID | - | User ID. 0463 collection_id | - | Collection ID | - | Collection ID. 0464 collection_category | - | Collection category | - | Collection category. 0465 collection_tags | - | Tag,Tag,Tag | - | Collection tag list as comma-separated list. 0466 collection_content_id | - | Collection content ID | - | Collection content ID. 0467 file_id | - | File ID | - | File ID. 0468 file_types | - | audio/mpeg,video/mpeg,video/mp4 | - | File type list as comma-separated list. 0469 file_category | - | File category | - | File category. 0470 file_tags | - | Tag,Tag,Tag | - | File tag list as comma-separated list. 0471 file_ocs_compatibility | - | compatible/incompatible/all | all | OCS compatibility. 0472 file_content_id | - | File content ID | - | File content ID. 0473 artist_id | - | Artist ID | - | Artist ID. 0474 album_id | - | Album ID | - | Album ID. 0475 genre | - | Genre | - | Genre. 0476 search | - | Search term | - | 3 or more strings. 0477 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0478 sort | - | name/newest | name | Sort order. 0479 perpage | - | 1-100 | 20 | How many results retrieve per request. 0480 page | - | 1-n | 1 | Page number of pagination. 0481 0482 ### Get index of owners in media 0483 0484 Request: GET {baseURI}/media/owners 0485 0486 Parameter | Required | Value | Default | Description 0487 ----------|----------|-------|---------|------------ 0488 client_id | - | Client ID | - | Client ID. 0489 owner_id | - | User ID | - | User ID. 0490 collection_id | - | Collection ID | - | Collection ID. 0491 collection_category | - | Collection category | - | Collection category. 0492 collection_tags | - | Tag,Tag,Tag | - | Collection tag list as comma-separated list. 0493 collection_content_id | - | Collection content ID | - | Collection content ID. 0494 file_id | - | File ID | - | File ID. 0495 file_types | - | audio/mpeg,video/mpeg,video/mp4 | - | File type list as comma-separated list. 0496 file_category | - | File category | - | File category. 0497 file_tags | - | Tag,Tag,Tag | - | File tag list as comma-separated list. 0498 file_ocs_compatibility | - | compatible/incompatible/all | all | OCS compatibility. 0499 file_content_id | - | File content ID | - | File content ID. 0500 artist_id | - | Artist ID | - | Artist ID. 0501 album_id | - | Album ID | - | Album ID. 0502 genre | - | Genre | - | Genre. 0503 search | - | Search term | - | 3 or more strings. 0504 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0505 sort | - | name/newest | name | Sort order. 0506 perpage | - | 1-100 | 20 | How many results retrieve per request. 0507 page | - | 1-n | 1 | Page number of pagination. 0508 0509 ### Get index of collections in media 0510 0511 Request: GET {baseURI}/media/collections 0512 0513 Parameter | Required | Value | Default | Description 0514 ----------|----------|-------|---------|------------ 0515 client_id | - | Client ID | - | Client ID. 0516 owner_id | - | User ID | - | User ID. 0517 collection_id | - | Collection ID | - | Collection ID. 0518 collection_category | - | Collection category | - | Collection category. 0519 collection_tags | - | Tag,Tag,Tag | - | Collection tag list as comma-separated list. 0520 collection_content_id | - | Collection content ID | - | Collection content ID. 0521 file_id | - | File ID | - | File ID. 0522 file_types | - | audio/mpeg,video/mpeg,video/mp4 | - | File type list as comma-separated list. 0523 file_category | - | File category | - | File category. 0524 file_tags | - | Tag,Tag,Tag | - | File tag list as comma-separated list. 0525 file_ocs_compatibility | - | compatible/incompatible/all | all | OCS compatibility. 0526 file_content_id | - | File content ID | - | File content ID. 0527 artist_id | - | Artist ID | - | Artist ID. 0528 album_id | - | Album ID | - | Album ID. 0529 genre | - | Genre | - | Genre. 0530 search | - | Search term | - | 3 or more strings. 0531 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0532 sort | - | name/newest | name | Sort order. 0533 perpage | - | 1-100 | 20 | How many results retrieve per request. 0534 page | - | 1-n | 1 | Page number of pagination. 0535 0536 ### Get index of media 0537 0538 Request: GET {baseURI}/media/index 0539 0540 Parameter | Required | Value | Default | Description 0541 ----------|----------|-------|---------|------------ 0542 client_id | - | Client ID | - | Client ID. 0543 owner_id | - | User ID | - | User ID. 0544 collection_id | - | Collection ID | - | Collection ID. 0545 collection_category | - | Collection category | - | Collection category. 0546 collection_tags | - | Tag,Tag,Tag | - | Collection tag list as comma-separated list. 0547 collection_content_id | - | Collection content ID | - | Collection content ID. 0548 file_id | - | File ID | - | File ID. 0549 file_types | - | audio/mpeg,video/mpeg,video/mp4 | - | File type list as comma-separated list. 0550 file_category | - | File category | - | File category. 0551 file_tags | - | Tag,Tag,Tag | - | File tag list as comma-separated list. 0552 file_ocs_compatibility | - | compatible/incompatible/all | all | OCS compatibility. 0553 file_content_id | - | File content ID | - | File content ID. 0554 artist_id | - | Artist ID | - | Artist ID. 0555 album_id | - | Album ID | - | Album ID. 0556 genre | - | Genre | - | Genre. 0557 search | - | Search term | - | 3 or more strings. 0558 ids | - | ID,ID,ID | - | Media ID list as comma-separated list. 0559 favoritesby | - | User ID | - | If this parameter has been set, must be set client_id. 0560 played_timeperiod_begin | - | Datetime | 1970-01-01 00:00:00 | Begin of the played time period. 0561 played_timeperiod_end | - | Datetime | Current datetime | End of the played time period. 0562 sort | - | name/newest/track/recent/frequent | name | Sort order. 0563 perpage | - | 1-100 | 20 | How many results retrieve per request. 0564 page | - | 1-n | 1 | Page number of pagination. 0565 0566 ### Get media 0567 0568 Request: GET {baseURI}/media/media 0569 0570 Parameter | Required | Value | Default | Description 0571 ----------|----------|-------|---------|------------ 0572 id | Yes | Media ID | - | Media ID. 0573 0574 ### Get media stream 0575 0576 Request: GET {baseURI}/media/stream 0577 0578 Parameter | Required | Value | Default | Description 0579 ----------|----------|-------|---------|------------ 0580 id | Yes | Media ID | - | Media ID. 0581 0582 Response: Audio/Video data 0583 0584 ### Get collection thumbnail 0585 0586 Request: GET {baseURI}/media/collectionthumbnail 0587 0588 Parameter | Required | Value | Default | Description 0589 ----------|----------|-------|---------|------------ 0590 id | - | Collection ID | - | Collection ID. 0591 0592 Response: JPEG data (image/jpeg) 0593 0594 ### Add/Update collection thumbnail 0595 0596 Request: POST {baseURI}/media/collectionthumbnail 0597 0598 Enctype: multipart/form-data 0599 0600 Parameter | Required | Value | Default | Description 0601 ----------|----------|-------|---------|------------ 0602 client_id | Yes | Client ID | - | Client ID. 0603 secret | Yes | Secret key | - | Secret key. 0604 id | Yes | Collection ID | - | Collection ID. 0605 file | Yes | FILE | - | Upload JPEG or PNG file. 0606 0607 ### Get album thumbnail 0608 0609 Request: GET {baseURI}/media/albumthumbnail 0610 0611 Parameter | Required | Value | Default | Description 0612 ----------|----------|-------|---------|------------ 0613 id | - | Album ID | - | Album ID. 0614 0615 Response: JPEG data (image/jpeg) 0616 0617 ### Add/Update album thumbnail 0618 0619 Request: POST {baseURI}/media/albumthumbnail 0620 0621 Enctype: multipart/form-data 0622 0623 Parameter | Required | Value | Default | Description 0624 ----------|----------|-------|---------|------------ 0625 client_id | Yes | Client ID | - | Client ID. 0626 secret | Yes | Secret key | - | Secret key. 0627 id | Yes | Album ID | - | Album ID. 0628 file | Yes | FILE | - | Upload JPEG or PNG file. 0629 0630 0631 ## External 0632 0633 ### Get external resource 0634 0635 Call external API over ocs-fileserver-API. 0636 0637 Request: POST {baseURI}/external/resource 0638 0639 Parameter | Required | Value | Default | Description 0640 ----------|----------|-------|---------|------------ 0641 uri | Yes | URI | - | External API URI. 0642 type | - | xml/json | xml | Resource data format.