Versions Compared

Key

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

...

Code Block
POST /giles/rest/files/upload HTTP/1.1
Host: giles-host
Authorization: token your-giles-token
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files"; filename="test.png"
Content-Type: image/png

[content of file]

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files"; filename="test.pdf"
Content-Type: application/pdf

[content of file]

Giles

...

Giles will respond with an progress id and a url to check the progress of the upload:

...

Once uploading has finished, you will retrieve the complete information as listed below.

...

Code Block
languagejs
titleUpload Image Sample Response from Giles
[ {
  "documentId" : "DOC123edf",
  "uploadId" : "UPxx456",
  "uploadedDate" : "2016-09-20T14:03:00.152Z",
  "access" : "PRIVATE",
  "uploadedFile" : {
    "filename" : "uploadedFile.pdf",
    "id" : "FILE466tgh",
    "url" : "http://your-giles-host.net/giles/rest/files/FILE466tgh/content",
    "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf",
    "content-type" : "application/pdf",
    "size" : 3852180
  },
  "extractedText" : {
    "filename" : "uploadedFile.pdf.txt",
    "id" : "FILE123cvb",
    "url" : "http://your-giles-host.net/giles/rest/files/FILE123cvb/content",
    "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.txt",
    "content-type" : "text/plain",
    "size" : 39773
  },
  "pages" : [ {
    "nr" : 0,
    "image" : {
      "filename" : "uploadedFile.pdf.0.tiff",
      "id" : "FILEYUI678",
      "url" : "http://your-giles-host.net/giles/rest/digilib?fn=username%FILEYUI678%2FDOC123edf0%2FuploadedFile.pdf.0.tiff",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.0.tiff",
      "content-type" : "image/tiff",
      "size" : 2032405
    },
    "text" : {
      "filename" : "uploadedFile.pdf.0.txt",
      "id" : "FILE789UIO",
      "url" : "http://your-giles-host.net/giles/rest/files/FILE789UIO/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.0.txt",
      "content-type" : "text/plain",
      "size" : 4658
    },
    "ocr" : {
      "filename" : "uploadedFile.pdf.0.tiff.txt",
      "id" : "FILE789U12",
      "url" : "http://your-giles-host.net/giles/rest/files/FILE789U12/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.0.tiff.txt",
      "content-type" : "text/plain",
      "size" : 4658
    }
  }, {
    "nr" : 1,
    "image" : {
      "filename" : "uploadedFile.pdf.1.tiff",
      "id" : "FILE045tyhG",
      "url" : "http://your-giles-host.net/giles/rest/digilib?fn=username%2FFILE045tyhG%2FDOC123edf0%2FuploadedFile.pdf.1.tiff",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.1.tiff",
      "content-type" : "image/tiff",
      "size" : 2512354
    },
    "text" : {
      "filename" : "uploadedFile.pdf.1.txt",
      "id" : "FILEMDSPfeVm",
      "url" : "http://your-giles-host.net/giles/rest/files/FILEMDSPfeVm/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.1.txt",
      "content-type" : "text/plain",
      "size" : 5799
    },
    "ocr" : {
      "filename" : "uploadedFile.pdf.1.tiff.txt",
      "id" : "FILEMDSPfe12",
      "url" : "http://your-giles-host.net/giles/rest/files/FILEMDSPfe12/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.1.tiff.txt",
      "content-type" : "text/plain",
      "size" : 5799
    }
  }

Giles Single Application v0.6 and newer

...

languagejs
titleUpload Image Sample Response from Giles

...


Uploads expire after 24 hours or after a server restart. If you request an expired upload or an upload that doesn't exist you will get a 404 response with the following response body:

Code Block
{
  "documentIderrorCode" : "DOC123edf404",
  "uploadIderrorMsg" : "UPxx456",Upload does not "uploadedDate" : "2016-09-20T14:03:00.152Z",
  "access" : "PRIVATE",
  "uploadedFile" : {
    "filename" : "uploadedFile.pdf",
    "id" : "FILE466tgh",
    "url" : "http://your-giles-host.net/giles/rest/files/FILE466tgh/content",
    "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf",
    "content-type" : "application/pdf",
    "size" : 3852180
  },
  "extractedText" : {exist."
} 

Get all uploads of user

Status
colourYellow
titleGET

You can get the details of all uploads of a user by making a GET request to:

/rest/files/uploads

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)

Giles will respond with the a map of [upload ids => file ids and filename of the uploaded file]:

Code Block
[
  {
    "UPMDG2ddX4bDKk": [
      {
        "id": "FILE0fPS2iO6Ev7g",
        "filename": "myfirstfile.pdf"
      }
    ]
  },
  {
    "UPVrMKIv": [
      {
        "id": "FILEkUcHBh",
        "filename" : "uploadedFilefile2.pdf0.txttiff",
     "id" :}
"FILE123cvb",    ]
"url" : "http://your-giles-host.net/giles/rest/files/FILE123cvb/content" },
  {
    "pathUP7R6GOs": [
 : "username/UPxx456/DOC123edf/uploadedFile.pdf.txt",     {
 "content-type" : "text/plain",     "sizeid": :"FILEkUcHBh",
39773   },   "pages" : [ {
    "nr" : 0,
    "image" : {
      "filename" : "uploadedFile.pdf.0myfile2.tiff",
      "id"}
: "FILEYUI678",   ]
   "url" : "http://your-giles-host.net/giles/rest/digilib?fn=username%FILEYUI678%2FDOC123edf0%2FuploadedFile.pdf.0.tiff",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.0.tiff",
      "content-type" : "image/tiff",
      "size" : 2032405
    },
    "text" : {
      "filename" : "uploadedFile.pdf.0.tiff.txt",
      "id" : "FILE789UIO",
      "url" : "http://your-giles-host.net/giles/rest/files/FILE789UIO/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.0.tiff.txt",
      "content-type" : "text/plain",
      "size" : 4658
    }
  }, {
    "nr" : 1,
    "image" : {
      "filename" : "uploadedFile.pdf.1.tiff",
      "id" : "FILE045tyhG",
      "url" : "http://your-giles-host.net/giles/rest/digilib?fn=username%2FFILE045tyhG%2FDOC123edf0%2FuploadedFile.pdf.1.tiff",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.1.tiff",
      "content-type" : "image/tiff",
      "size" : 2512354
    },
    "text" : {
      "filename" : "uploadedFile.pdf.1.tiff.txt",
      "id" : "FILEMDSPfeVm",
      "url" : "http://your-giles-host.net/giles/rest/files/FILEMDSPfeVm/content",
      "path" : "username/UPxx456/DOC123edf/uploadedFile.pdf.1.tiff.txt",
      "content-type" : "text/plain",
      "size" : 5799
    }
  }

Uploads expire after 24 hours or after a server restart. If you request an expired upload or an upload that doesn't exist you will get a 404 response with the following response body:

Code Block
{
  "errorCode" : "404",
  "errorMsg" : "Upload does not exist."
}

v0.5 and older

For each uploaded file, Giles responds with either "success": 0 (upload was successful), or "success": 1 (upload failed).

Code Block
languagejs
titleUpload Image Sample Response from Giles
[ {
  "documentId" : "DOCnbxbFU",
  "uploadId" : "UP50N1AV",
  "uploadedDate" : "2016-07-26T21:38:34.398Z",
  "access" : "PRIVATE",
  "files" : [ {
    "filename" : "your-file.jpeg",
    "path" : "http://your.host/giles/rest/digilib?fn=youruser/UP50N1AV/FILEz7JQFu/your-file.jpeg",
    "content-type" : "image/jpeg",
    "size" : 120830,
    "success" : 0,
	"id" : "FILE2FGTtG"
  }, {
    "filename" : "your-file-2.jpg",
    "path" : "http://your.host/giles/rest/digilib?fn=youruser/UP50N1AV/FILETAW3KI/your-file-2.jpg",
    "content-type" : "image/jpeg",
    "size" : 270769,
    "success" : 0,
	"id" : "FILE23rtG"
  } ]
} ]

 

Get all uploads of user

Status
colourYellow
titleGET

You can get the details of all uploads of a user by making a GET request to:

/rest/files/uploads

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)

Giles will respond with the a map of [upload ids => file ids and filename of the uploaded file]:

Code Block
[
  {
    "UPMDG2ddX4bDKk": [
      {
        "id": "FILE0fPS2iO6Ev7g",
        "filename": "myfirstfile.pdf"
      }
    ]
  },
  {
    "UPVrMKIv": [
      {
        "id": "FILEkUcHBh",
        "filename": "file2.0.tiff"
      }
    ]
  },
  {
    "UP7R6GOs": [
      {
        "id": "FILEkUcHBh",
        "filename": "myfile2.tiff"
      }
    ]
  }
]

Get image from Digilib

Status
colourYellow
titleGET

You can get images from Digilib through Giles by making a GET request to:

/rest/digilib

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)
  • fn: path to image in digilib
  • dw or dh: you need at least one size parameter, either width (dw) or height (dh) or both
  • any other digilib parameter (optional)

Get public image from Digilib

Status
colourYellow
titleGET

You can get public images from Digilib without a GitHub access token by making a GET request to:

/rest/digilib/public

Giles expects the following parameters:

  • fn: path to image in digilib
  • dw or dh: you need at least one size parameter, either width (dw) or height (dh) or both
  • any other digilib parameter (optional)

If the requested image is set to public, Giles will return the image from Digilib. Otherwise, you will receive an http status 403 Forbidden.

Get info about upload

Status
colourYellow
titleGET

You can get information about an upload by making a GET request to:

/rest/files/upload/{uploadId}

where {uploadId} refers to an id of a previous upload.

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)

A user has only access to upload he initiated himself.

Code Block
languagejs
titleUpload Info Sample Response from Giles
[ "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
    }
  }, {
    "nr" : 1,
    "image" : {
      "filename" : "your-file.pdf.1.tiff",
      "id" : "FILE1vgFj8feXHtG",
      "url" : "https://your.host/giles/rest/digilib?fn=username%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
    }
  }, {
    "nr" : 2,
    "image" : {
      "filename" : "your-file.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
    }
  } ]
} ]

Get info about document

Status
colourYellow
titleGET

Status
colourGreen
titlePublic API
 This endpoint can be used without an API token when requesting public files.

You can get information about a document by making a GET request to:

/rest/documents/{documentId}

where {documentId} is the id of the upload you are requesting information about.

Giles Ecosystem

A response looks similar to this:

Code Block
{
  "documentId" : "DOCOhcqLGMXL8dC",
  "uploadId" : "UPMDG2ddX4bDKk",
  "uploadedDate" : "2016-10-04T17:40:15.254Z",
  "access" : "PUBLIC",
  "uploadedFile}
]


Get image from Digilib

Status
colourYellow
titleGET

You can get images from Digilib through Giles by making a GET request to:

/rest/digilib

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)
  • fn: path to image in digilib
  • dw or dh: you need at least one size parameter, either width (dw) or height (dh) or both
  • any other digilib parameter (optional)

Get public image from Digilib

Status
colourYellow
titleGET

You can get public images from Digilib without a GitHub access token by making a GET request to:

/rest/digilib/public

Giles expects the following parameters:

  • fn: path to image in digilib
  • dw or dh: you need at least one size parameter, either width (dw) or height (dh) or both
  • any other digilib parameter (optional)

If the requested image is set to public, Giles will return the image from Digilib. Otherwise, you will receive an http status 403 Forbidden.

Get info about upload

Status
colourYellow
titleGET

You can get information about an upload by making a GET request to:

/rest/files/upload/{uploadId}

where {uploadId} refers to an id of a previous upload.

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)

A user has only access to upload he initiated himself.

Code Block
languagejs
titleUpload Info Sample Response from Giles
[ "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" : "FILE0fPS2iO6Ev7gFILEjXRK3MKDjcqx",
    "url" : "https://your.host/giles/rest/files/FILE0fPS2iO6Ev7gFILEjXRK3MKDjcqx/content",
    "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.txt",
    "content-type" : "applicationtext/pdfplain",
    "size" : 145383684313
  },,
  "pages" : [ {
    "nr" : 0,
    "extractedTextimage" : {
      "filename" : "your-file.pdf.txt0.tiff",
      "id" : "FILEjXRK3MKDjcqxFILEgwyK2KjEiniN",
      "url" : "https://your.host/giles/rest/files/FILEjXRK3MKDjcqx/contentdigilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.0.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.txttiff",
      "content-type" : "textimage/plaintiff",
    "size" :
84313   },   "pagessize" : [1938832
{     "nr" : 0},
    "imagetext" : {
      "filename" : "your-file.pdf.0.tifftxt",
      "id" : "FILEgwyK2KjEiniNFILEu3zp4FHaNBEz",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.0.tifffiles/FILEu3zp4FHaNBEz/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.tifftxt",
      "content-type" : "imagetext/tiffplain",
      "size" : 3461
1938832    }
  }, {
    "nr" : 1,
    "textimage" : {
      "filename" : "your-file.pdf.01.txttiff",
      "id" : "FILEu3zp4FHaNBEzFILE1vgFj8feXHtG",
      "url" : "https://your.host/giles/rest/files/FILEu3zp4FHaNBEz/contentdigilib?fn=username%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.1.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.01.txttiff",
      "content-type" : "textimage/plaintiff",
      "size" : 34611938382
    },
    "ocrtext" : {
      "filename" : "your-file.pdf.0.tiff1.txt",
      "id" : "FILEu3zp4FHaN567FILER0t8JQ1WuU94",
      "url" : "https://your.host/giles/rest/files/FILEu3zp4FHaN567FILER0t8JQ1WuU94/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.01.tiff.txt",
      "content-type" : "text/plain",
      "size" : 34613930
    }
  }, {
    "nr" : 12,
    "image" : {
      "filename" : "your-file.pdf.12.tiff",
      "id" : "FILE1vgFj8feXHtGFILEzQaVarnXZy52",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.12.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.12.tiff",
      "content-type" : "image/tiff",
      "size" : 19383821809905
    },
    "text" : {
      "filename" : "your-file.pdf.12.txt",
      "id" : "FILER0t8JQ1WuU94FILEFlTXtknorFua",
      "url" : "https://your.host/giles/rest/files/FILER0t8JQ1WuU94FILEFlTXtknorFua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.12.txt",
      "content-type" : "text/plain",
      "size" : 39303563
    },
  } ]
"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" : {
 } ]

Get info about document

Status
colourYellow
titleGET

Status
colourGreen
titlePublic API
 This endpoint can be used without an API token when requesting public files.

You can get information about a document by making a GET request to:

/rest/documents/{documentId}

where {documentId} is the id of the upload you are requesting information about.

A response looks similar to this:

Code Block
{
  "documentId" : "DOCOhcqLGMXL8dC",
  "uploadId" : "UPMDG2ddX4bDKk",
  "uploadedDate" : "2016-10-04T17:40:15.254Z",
  "access" : "PUBLIC",
  "uploadedFile" : {
    "filename" : "your-file.pdf.2.tiff",
      "id" : "FILEzQaVarnXZy52FILE0fPS2iO6Ev7g",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.2.tiff/files/FILE0fPS2iO6Ev7g/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.tiff",
 
    "content-type" : "imageapplication/tiffpdf",
      "size" : 1809905
1453836
   },
 
  "textextractedText" : {
      "filename" : "your-file.pdf.2.txt",
 
    "id" : "FILEFlTXtknorFuaFILEjXRK3MKDjcqx",

     "url" : "https://your.host/giles/rest/files/FILEFlTXtknorFuaFILEjXRK3MKDjcqx/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.txt",

     "content-type" : "text/plain",
 plain",
    "size" : 84313
  },
  "sizepages" : [ 3563{
    }"nr" : 0,
    "ocrimage" : {
      "filename" : "your-file.pdf.20.tiff.txt",
      "id" : "FILEFlTXtkn345uaFILEgwyK2KjEiniN",
      "url" : "https://your.host/giles/rest/files/FILEFlTXtkn345ua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/yourdigilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.20.tiff.txt",
      "content-type" : "text/plain",
      "sizepath" : 3563
    }
  }

Giles Single Application

A response looks similar to this:

Code Block
{"youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.tiff",
      "documentIdcontent-type" : "DOCOhcqLGMXL8dCimage/tiff",
  "uploadId" : "UPMDG2ddX4bDKk",   "uploadedDatesize" : "2016-10-04T17:40:15.254Z",1938832
  "access" : "PUBLIC"},
    "uploadedFiletext" : {
      "filename" : "your-file.pdf.0.txt",
      "id" : "FILE0fPS2iO6Ev7gFILEu3zp4FHaNBEz",
      "url" : "https://your.host/giles/rest/files/FILE0fPS2iO6Ev7gFILEu3zp4FHaNBEz/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.txt",
      "content-type" : "applicationtext/pdfplain",
      "size" : 14538363461
    },
    "extractedTextocr" : {
      "filename" : "your-file.pdf.0.tiff.txt",
      "id" : "FILEjXRK3MKDjcqxFILEu3zp4FHaN567",
      "url" : "https://your.host/giles/rest/files/FILEjXRK3MKDjcqxFILEu3zp4FHaN567/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.0.tiff.txt",
      "content-type" : "text/plain",
      "size" : 843133461
  },  }
"pages" : [}, {
    "nr" : 01,
    "image" : {
      "filename" : "your-file.pdf.01.tiff",
      "id" : "FILEgwyK2KjEiniNFILE1vgFj8feXHtG",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.01.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.01.tiff",
      "content-type" : "image/tiff",
      "size" : 19388321938382
    },
    "text" : {
      "filename" : "your-file.pdf.01.txt",
      "id" : "FILEu3zp4FHaNBEzFILER0t8JQ1WuU94",
      "url" : "https://your.host/giles/rest/files/FILEu3zp4FHaNBEzFILER0t8JQ1WuU94/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.01.txt",
      "content-type" : "text/plain",
      "size" : 34613930
    }   }, {
    "nr" : 1,
    "image"ocr" : {
      "filename" : "your-file.pdf.1.tiff.txt",
      "id" : "FILE1vgFj8feXHtGFILER123JQ1WuU94",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.1.tiff/files/FILER123JQ1WuU94/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.1.tiff.txt",
      "content-type" : "imagetext/tiffplain",
      "size" : 19383823930
    }
  }, {
    "nr" : 2,
    "textimage" : {
      "filename" : "your-file.pdf.12.txttiff",
      "id" : "FILER0t8JQ1WuU94FILEzQaVarnXZy52",
      "url" : "https://your.host/giles/rest/files/FILER0t8JQ1WuU94/contentrest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.2.tiff",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.12.txttiff",
      "content-type" : "textimage/plaintiff",
      "size" : 39301809905
    }
  }, {
    "nr" : 2,
    "imagetext" : {
      "filename" : "your-file.pdf.2.tifftxt",
      "id" : "FILEzQaVarnXZy52FILEFlTXtknorFua",
      "url" : "https://your.host/giles/rest/digilib?fn=youruser%2FUPMDG2ddX4bDKk%2FDOCOhcqLGMXL8dC%2Fyour-file.pdf.2.tiff/files/FILEFlTXtknorFua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.tifftxt",
      "content-type" : "imagetext/tiffplain",
      "size" : 18099053563
    },
    "textocr" : {
      "filename" : "your-file.pdf.2.tiff.txt",
      "id" : "FILEFlTXtknorFuaFILEFlTXtkn345ua",
      "url" : "https://your.host/giles/rest/files/FILEFlTXtknorFuaFILEFlTXtkn345ua/content",
      "path" : "youruser/UPMDG2ddX4bDKk/DOCOhcqLGMXL8dC/your-file.pdf.2.tiff.txt",
      "content-type" : "text/plain",
      "size" : 3563
    }
  }

Get full image from Giles

Status
colourYellow
titleGET

...