Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
http://<nuxeoserverip>:<nuxeoport>/casebrowser/download//<documentUID>/true

To get the documentUID from the document's path, you can must curl the DMS:

Code Block
curl -X POST \
  http://<nuxeoserverip>:<nuxeoport>/nuxeo/api/v1/automation/Document.Fetch \
  -H 'authorization: Basic <userAndPassEncoded>' \
  -H 'cachecontent-controltype: no-cacheapplication/json' \
  -H 'content-type: application/json' \
  -H 'postman-token: 76b528b4-86b9-8a39-74a9-82f1e583eede' \
  -d '{"params":{"value":d '{"params":{"value":"/default-domain/workspaces/Patricia/<documentPath>/<documentName>"}}'

Here, the <userAndPassEncoded> represents a Base64 encoded string of the format 'Username:Password'. So, 'Username:Password' would be represented as 'VXNlcm5hbWU6UGFzc3dvcmQ='

The above Document.Fetch endpoint returns a strong in JSON format, for example:

Code Block
{
    "entity-type": "document",
    "repository": "default",
    "uid": "12416508-5414-4eb0-9452-10f2c368e222",
    "path": "/default-domain/workspaces/Patricia/<documentPath>/<documentName>"},"context":{}}'doc.docx",
    "type": "File",
    "state": "deleted",
    "parentRef": "c188a02a-185a-45c9-9835-28c01bbcf895",
    "isCheckedOut": true,
    "changeToken": "1507890029076",
    "title": "doc.docx",
    "lastModified": "2017-10-13T10:20:29.07Z",
    "facets": [
        "Versionable",
        "Publishable",
        "Commentable",
        "PiFileFacet",
        "PiFacet",
        "HasRelatedText",
        "Downloadable"
    ]
}

From this, you can extract the "uid" value. 

Deleting a document from the DMS

...