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 4 Current »

Gets files related information for all or a subset of the documents in the scope:

  • Document name
  • Locales with status information for deliverable

URL

(POST) /resources/files/list

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.

Mandatory, object
skipOptional. 0 by default. To paginate items. Upon first call set to 0.Optional, int?
takeOptional. 20 by default and unlimited for job scopes. Upon first call simply omit. The method will send back info on pagination etc.Optional, int?
locales

Null or an explicit list of locales to get info for.

If null will return information for all scope locales.

Optional, string[]?
did

Optional filter on a specific document. If specified the system returns information for this specific document only.

Note: If the document does not exist, an error is returned.

Optional, int?

 

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!

skip

When navigating, the first document in list shown

takeNumber of document fetched
hasMore

True if there are more documents. In that case navigate using the skip and take params.

This method is implemented so that you always get ALL documents for jobs but only up to 20 for other scope types.

documentsAn array of document objects.

 

Each item in documents has these properties:

did

Document id.

dsidDocument set id.
nameThe source document name or the deliverable name (depending on language)
srcBoolean. The source locale of this document.
domainThe parser domain code, such as HTML, PLAINTEXT, etc.
locales

An array with document details per language, see below.

Sorted alphabetically with source language ALWAYS on top.

 

The locales array items have these properties:

locale

Language code.

localetLanguage name.
isSourceTrue if this is the source language of the document. The source language item is always shown in first position.
nameThe original file name or the deliverable name. Note that deliverables can be renamed by the user.
dvrequiredBoolean. True if the user must submit a deliverable. If true, the user can only approve if a physical file was set (see exists property on deliverable).
dvapprovedBoolean. True if the user confirmed that deliverable is done as expected. Includes case where user says no, I do not want to set a deliverable.
encoding

The encoding if the document is a text file (xml, json...). For example "utf-8". In some cases this information may not be available.

For binary formats such as Word or InDesign, the encoding is null.

 

EXAMPLES

See this example:

{
  "available": true,
  "skip": 0,
  "take": null,
  "hasMore": false,
  "documents": [
    {
      "did": 1520,
      "dsid": 296,
      "name": "thu_trade_test_doc.htm",
      "src": "en",
      "domain": "HTML",
      "locales": [
        {
          "locale": "en",
          "localet": "Anglais",
          "isSource": true,
          "name": "trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "sq-ALS",
          "localet": "Albanais (Tosque)",
          "isSource": false,
          "name": "thu_trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "my",
          "localet": "Birman",
          "isSource": false,
          "name": "thu_trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "fr",
          "localet": "Français",
          "isSource": false,
          "name": "thu_trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        }
      ]
    },
    {
      "did": 1448,
      "dsid": 296,
      "name": "trade_test_doc.htm",
      "src": "en",
      "domain": "HTML",
      "locales": [
        {
          "locale": "en",
          "localet": "Anglais",
          "isSource": true,
          "name": "trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "sq-ALS",
          "localet": "Albanais (Tosque)",
          "isSource": false,
          "name": "trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "my",
          "localet": "Birman",
          "isSource": false,
          "name": "trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        },
        {
          "locale": "fr",
          "localet": "Français",
          "isSource": false,
          "name": "trade_test_doc.htm",
          "dvrequired": false,
          "dvapproved": false,
		  "encoding": "utf-8"
        }
      ]
    }
  ]
}

 

 

 

  • No labels