Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Gets full information regarding the files related to a bee document and its source and target languages.

  • The document: Either the original document or a deliverable
  • The attachments
  • Tree view into all the files
  • Full information on access rights: Can download, Can edit, etc.

 

URL

(POST) /resources/files/get

PARAMETERS

The message body contains a JSON object:

scope

The scope object. Note that if you use a document set or global search scope, you will receive an "available" = false result. In fact these scopes do not support files.

didThe document id. This must be a document within the scope.
localesNull or optional list of locales you want to get information for. If null then you get info for all the authorized locales in scope.
populateDepthNull or optional depth of file structure to load. If not specified, the default 100 is used. It is recommended to leave this parameter unless you do not want to get sub folders in which case you would set to 0.

 

RESULTS

The message body contains a JSON object:

available

Boolean. If false, then no other property is populated. It means that the scope does not propose any file management or the user cannot do any file management.

Ideally, completely hide away files tools or show a message.

This property is also included in the segments rights properties as property "hasFiles". So you should check this first!

didThe document id.
dsidThe document set id.
nameThe name of the original file (including folders).
localesA dictionary where the key is a locale and the value is an object with files details in this language, see below.

 

Each item in locales has these properties:

locale

The locale.

isSourceTrue: This is the source language.
 Source file or deliverable related properties
canDocSetBoolean. Tells if the deliverable can be set, renamed or deleted.
canDocDownload

Boolean. Right to download the file.

canDocPreviewBoolean: Right to web preview the file.
documentA file node describing the document.
 Attachments
canAttSetBoolean. User can set, rename, delete, manipulate attachments.
attachmentsA folder node that contains the attachments.

 

The file/folder nodes form a tree structure. A folder node may have file node and folder node children.

 

Each item in locales has these properties:

locale

The locale.

isSourceTrue: This is the source language.
 Source file or deliverable related properties
canDocSetBoolean. Tells if the deliverable can be set, renamed or deleted.
canDocDownload

Boolean. Right to download the file.

canDocPreviewBoolean: Right to web preview the file.
documentA file node describing the document.
 Attachments
canAttSetBoolean. User can set, rename, delete, manipulate attachments.
attachmentsA folder node that contains the attachments.

 

EXAMPLES

See this example:

{
  "did": 1865,
  "dsid": 367,
  "available": true,
  "name": "html.txt",
  "locales": {
    "en-US": {
      "locale": "en-US",
      "isSource": true,
      "canDocSet": false,
      "canDocDownload": true,
      "canDocPreview": true,
      "canAttSet": true,
      "deliverableRequired": false,
      "deliverableApproved": false,
      "document": {
        "folder": "doc:en-US",
        "name": "html.txt",
        "isdir": false,
        "exists": true,
        "readonly": true,
        "date": "2017-02-05T22:57:24.7403048Z",
        "size": 502,
        "scanned": true
      },
      "attachments": {
        "folder": "att:en-US\\html.txt_",
        "name": "",
        "isdir": true,
        "exists": true,
        "readonly": false,
        "date": "2017-02-06T14:51:51.7538074Z",
        "size": null,
        "scanned": true,
        "files": [
          {
            "folder": "att:en-US\\html.txt_",
            "name": "Html replace term.config",
            "isdir": false,
            "exists": true,
            "readonly": false,
            "date": "2017-02-06T14:51:48.9304819Z",
            "size": 11997,
            "scanned": true
          }
        ],
        "folders": []
      }
    },
    "zh-Hans": {
      "locale": "zh-Hans",
      "isSource": false,
      "canDocSet": true,
      "canDocDownload": true,
      "canDocPreview": true,
      "canAttSet": true,
      "deliverableRequired": false,
      "deliverableApproved": true,
      "document": {
        "folder": "doc:zh-Hans",
        "name": "html-out.txt",
        "isdir": false,
        "exists": true,
        "readonly": false,
        "date": "2017-02-07T14:09:21.9940303Z",
        "size": 25,
        "scanned": true
      },
      "attachments": {
        "folder": "att:zh-Hans\\html.txt_",
        "name": "",
        "isdir": true,
        "exists": true,
        "readonly": false,
        "date": "2017-02-06T14:51:55.7070816Z",
        "size": null,
        "scanned": true,
        "files": [],
        "folders": [
          {
            "folder": "att:zh-Hans\\html.txt_",
            "name": "NewFolder",
            "isdir": true,
            "exists": true,
            "readonly": false,
            "date": "2017-02-07T14:07:38.8219265Z",
            "size": null,
            "scanned": true,
            "files": [
              {
                "folder": "att:zh-Hans\\html.txt_\\NewFolder",
                "name": "NoBOMTest3.txt",
                "isdir": false,
                "exists": true,
                "readonly": false,
                "date": "2017-02-06T14:52:00.3383798Z",
                "size": 25,
                "scanned": true
              }
            ],
            "folders": []
          }
        ]
      }
    }
  }
}

 

 

 

  • No labels