Versions Compared

Key

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

...

Code Block
{
  "documentId" : "DOCOhcqLGMXL8dC",
  "uploadId" : "UPMDG2ddX4bDKk",
  "uploadedDate" : "2016-10-04T17:40:15.254Z",
  "access" : "PUBLIC",
  "uploadedFile" : {
    "filename" : "your-file.pdf",
    "id" : "FILE0fPS2iO6Ev7g",
    "url" : "https://your.host/giles/rest/files/FILE0fPS2iO6Ev7g/content",
    "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf",
    "content-type" : "application/pdf",
    "size" : 1453836
  },
  "extractedText" : {
    "filename" : "your-file.pdf.txt",
    "id" : "FILEjXRK3MKDjcqx",
    "url" : "https://your.host/giles/rest/files/FILEjXRK3MKDjcqx/content",
    "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.txt",
    "content-type" : "text/plain",
    "size" : 84313
  },
  "pages" : [ {
    "nr" : 0,
    "image" : {
      "filename" : "your-file.pdf.0.tiff",
      "id" : "FILEgwyK2KjEiniN",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.0.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.tiff",
      "content-type" : "image/tiff",
      "size" : 1938832
    },
    "text" : {
      "filename" : "your-file.pdf.0.txt",
      "id" : "FILEu3zp4FHaNBEz",
      "url" : "https://your.host/giles/rest/files/FILEu3zp4FHaNBEz/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.txt",
      "content-type" : "text/plain",
      "size" : 3461
    },
    "ocr" : {
      "filename" : "your-file.pdf.0.tiff.txt",
      "id" : "FILEu3zp4FHaN567",
      "url" : "https://your.host/giles/rest/files/FILEu3zp4FHaN567/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.tiff.txt",
      "content-type" : "text/plain",
      "size" : 3461
    }
  }, {
    "nr" : 1,
    "image" : {
      "filename" : "your-file.pdf.1.tiff",
      "id" : "FILE1vgFj8feXHtG",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.1.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.1.tiff",
      "content-type" : "image/tiff",
      "size" : 1938382
    },
    "text" : {
      "filename" : "your-file.pdf.1.txt",
      "id" : "FILER0t8JQ1WuU94",
      "url" : "https://your.host/giles/rest/files/FILER0t8JQ1WuU94/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.1.txt",
      "content-type" : "text/plain",
      "size" : 3930
    },
    "ocr" : {
      "filename" : "your-file.pdf.1.tiff.txt",
      "id" : "FILER123JQ1WuU94",
      "url" : "https://your.host/giles/rest/files/FILER123JQ1WuU94/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.1.tiff.txt",
      "content-type" : "text/plain",
      "size" : 3930
    }
  }, {
    "nr" : 2,
    "image" : {
      "filename" : "your-file.pdf.2.tiff",
      "id" : "FILEzQaVarnXZy52",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.2.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.tiff",
      "content-type" : "image/tiff",
      "size" : 1809905
    },
    "text" : {
      "filename" : "your-file.pdf.2.txt",
      "id" : "FILEFlTXtknorFua",
      "url" : "https://your.host/giles/rest/files/FILEFlTXtknorFua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.txt",
      "content-type" : "text/plain",
      "size" : 3563
    },
    "ocr" : {
      "filename" : "your-file.pdf.2.tiff.txt",
      "id" : "FILEFlTXtkn345ua",
      "url" : "https://your.host/giles/rest/files/FILEFlTXtkn345ua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.tiff.txt",
      "content-type" : "text/plain",
      "size" : 3563
    }
  }

Change Document Access

Status
colourRed
titlePOST

Status
colourBlue
titlev0.4.2
 This features is available with version v0.4.2.

You can change the access type of a document (private or public) by making a POST request to:

/rest/documents/{documentId}/access/change

where {documentId} is the id of the document you want to change the access type.

Giles expects the following parameters:

  • accessToken: an API token that is used to authenticate the uploading user (if possible use the Authorization header instead of this parameter)
  • access: the new type of access for the specified document: private or public

Get full image from Giles

Status
colourYellow
titleGET

...

Note: when requesting information about an upload, or after uploading a file, the path property of the JSON response will point here for PDF files.