Get list of files associated with meeting - nokia-wroclaw/innovativeproject-meetingdataexchange GitHub Wiki

URL:

{serverAddress}/api/files/list/$meetingid/$login/$sid

Method:

GET

Content-type:

?

Method for web application:

public static ObjectNode web_getList(String meetingid, String login, String sid) in controllers.FilesManagement

Description:

Gets all files in specified meeting, with comments. Files are sorted by adding time (the newest are on top). You'll get information about file ID, file name, author name, adding time, MD5 hash of file, and comments (sorted by the newest). Information about single comment consists of author's name, adding time, and text (content) of comment.

Input:

$meetingid = meeting id
$login = your login
$sid = id of current session

Output OK:

{
   "status": "ok",
   "files":[
      {
         "fileid": file ID a1,
         "filename": "filename of file a1",
         "author": "who added file a1",
         "addtime": "time of adding file a1",
         "hash": "d02d54ee00ddc12e152bf1e9b256227e",
         "sizeKB": size in kilobytes,
         "comments": [
                {
                    "commentid": comment id a1c1,
                    "author": "who added comment a1c1",
                    "addtime": "time of adding comment a1c1",
                    "content": "content of comment a1c1"
                },
                {
                    "commentid": comment id a1c2,
                    "author": "who added comment a1c2",
                    "addtime": "time of adding comment a1c2",
                    "content": "content of comment a1c2"
                },
                ...
         ]
      },
      ...
      {
         "fileid": file ID an,
         "filename": "filename of file an",
         "author": "who added file an",
         "addtime": "time of adding file an",
         "hash": "d02d54ee00ddc12e152bf1e9b256227e",
         "sizeKB": size in kilobytes,
         "comments": [
                {
                    "commentid": comment id anc1,
                    "author": "who added comment anc1",
                    "addtime": "time of adding comment anc1",
                    "content": "content of comment anc1"
                },
                {
                    "commentid": comment id anc2,
                    "author": "who added comment anc2",
                    "addtime": "time of adding comment anc2",
                    "content": "content of comment anc2"
                },
                ...
         ]
      }
   ]
}

Note that, fileid, commentid, sizeKB are integer value (others parameters are strings).

Output error:

{
  "status": "failed",
  "reason": "reason of error"
}

Types of reasons:

  • incorrect data - some value is incorrect (blank)
  • incorrect sid - incorrect session id
  • access denied