File API Resource

HDC WS for getting file content

POST /file/convert2drawing

Request Body
media type data type description
*/* object list of objects with attachments to transform to drawings
Response Body
media type data type description
application/json object started transformation process state

Example of response:

{"processId":"f8b29857-da2e-4464-a40d-9a14908cad30","state":"4","userName":"olo","userId":20,"startDate":"2019-10-10T16:21:08.573062400+02:00","operationType":"GroupRasterTransformation","processTypeId":12}

GET /file/{fileId}

Get binary representation of given file

Request Parameters
name type description default constraints
Range header    
fileId path The unique identifier of file   long
download query Boolean parameter. If set true returned binary representation will be prepared to save.   required boolean
Response Body
media type data type description
*/* object Binary representation of file

POST /file/{fileId}

Request Parameters
name type description default constraints
fileId path   long
Response Body
media type data type description
application/json object

GET /file/dziinfo/{fileId}

Get dzi info of given file

Request Parameters
name type description default constraints
fileId path The unique identifier of file   long
Response Body
media type data type description
application/json object JSON Response with tile information Example of response:

{format: "png", overlap: 1, tileSize: 1024, width: 99213, height: 70157}

GET /file/info/{fileId}

Get information about file.

Request Parameters
name type description default constraints
fileId path The unique identifier of file   long
Response Body
media type data type description
*/* object JSON Response with file information

Example of response:

{"md5":"ccc7fd75e33e59d041d5b98fe8b1e335","path":"path_to_file","size":1520296,"mimeType":"application/pdf","fileName":"floor_plan.pdf","contextId":0,"originalId":0}

GET /file/status/{fileId}

Get information about file status and it's derived (converted) form.

Request Parameters
name type description default constraints
fileId path The unique identifier of file   long
Response Body
media type data type description
*/* object JSON Response with file information

Example of response:

{id: 123,derivedId: 124,state: "CONVERTED", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}

DELETE /file/{classId}/{objectId}

Remove binary file from specified object

Request Parameters
name type description default constraints
classId path The unique identifier of object class.   long
objectId path The unique identifier of object.   long
Response Body
media type data type description
*/* object JSON Response with information, whether the removing has or has not been succeeded.

POST /file/{classId}/{objectId}

Upload file and attach it to given object

Request Parameters
name type description default constraints
classId path The unique identifier of object class.   long
objectId path The unique identifier of object.   long
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object JSON Response with information, whether the upload has or has not been succeeded.

GET /file/convert2drawing/{classId}/{objectId}

Request Parameters
name type description default constraints
classId path   long
objectId path   long
fileId query   long
Response Body
media type data type description
application/json object json transformed file data with success information

Example of response:

{"result":{"success":true},"contentId":"60569","contentType":2,"subType":0,"viewportId":0,"classId":"113","classLabel":"Architect","objectId":"243048","objectName":"666","isDefault":false,"success":false}

POST /file/form/download/batch

Get binary representation of contents for given object set URLEncoded data

Example of request:

"0=%7B%22objectId%22%3A%2222720%22%2C%22classId%22%3A%22124%22%7D&1=%7B%22objectId%22%3A%2222721%22%2C%22classId%22%3A%22114%22%7D"

Response Body
media type data type description
application/zip object Zip file with contents

GET /file/versions/json/{fileId}

Get information about version of given file

Request Parameters
name type description default constraints
fileId path The unique identifier of file   long
Response Body
media type data type description
application/json object JSON with information about version

Example of response:

{"list":[{"versionDescription":"","versionPublishDate":"2018-03-14T10:46:45.611940Z","versionOperation":"insert","operationDate":"2018-03-14T10:49:46.336744Z","versionId":"5172","isCurrent":"true","dataUserFullName":"Demo User","isMaster":"true","versionOwnerFullName":"Version Owner","versionName":"version description","versionDate":"2018-03-14T10:46:45.611940Z","dataSource":"manual input"}]}

GET /file/attachmenttile/{fileId}/{level}/{col}/{row}

Get pointed attachment dzi tail

Request Parameters
name type description default constraints
col path column number   required int
fileId path The unique identifier of file   long
level path level of tailing   required int
row path row number   required int
Response Body
media type data type description
image/* object Binary representation of specified attachment dzi tail

GET /file/tile/{fileId}/{level}/{col}/{row}

Get pointed raster tail

Request Parameters
name type description default constraints
col path column number   required int
fileId path The unique identifier of file   long
level path level of tailing   required int
row path row number   required int
Response Body
media type data type description
image/* object Binary representation of specified raster tail