Print admin API Resource

printing related WS

POST /admin/print/format/json

add new print format

Example of request:

{"name":"A4","width":"210","height":"297","isavailable":true,"units":"5"}

Request Body
media type data type description
application/json object HdcPrintFormatTO
Response Body
media type data type description
application/json object JSON Response with the information, whether operation has been succeeded together with added format id.

PUT /admin/print/format/json

update print formats availability ("flag": true/false) and template id

Example of request:

{"list":[{"id":printformatId,"flag":false, templateId: 4}]}

Request Body
media type data type
application/json object
Response Body
media type data type description
application/json object JSON Response with the information, whether operation has been succeeded.

DELETE /admin/print/format/{printFormatId}

Remove print format

Request Parameters
name type description default constraints
printFormatId path ID of print format   required long
Response Body
media type data type description
application/json object JSON Response with information, whether the removing has or has not been succeeded.

GET /admin/print/formats/json

Get list of print formats.

Response Body
media type data type description
application/json object JSON:

Example of response:

{"formats":[{"id":2,"name":"A3","width":"297.0","height":"420.0","units":"5","isavailable":true,"issystem":true},{"id":39,"name":"test","width":"324.0","height":"1245.0","units":"8","isavailable":true,"issystem":false},{"id":7,"name":"B3","width":"353.0","height":"500.0","units":"5","isavailable":true,"issystem":false}]}

GET /admin/print/set/json

Return all print template sets with it's assigned identities (users, groups)

Response Body
media type data type description
application/json object

POST /admin/print/set/json

add new print template set

Request Body
media type data type description
application/json object HdcNameDescModelTO
Response Body
media type data type description
application/json object

DELETE /admin/print/set/{printTemplSetId}

Remove print template set

Request Parameters
name type description default constraints
printTemplSetId path ID of set   long
Response Body
media type data type description
application/json object JSON Response with information, whether the removing has or has not been succeeded.

POST /admin/print/template/json

add new print template

Example of request:

{"name":"test_template_A4P", format:{"id":1}, "orientation":Portrait, "marginleft":10, marginright:10, marginbottom:20, margintop:10, units:5} 8

Request Body
media type data type description
application/json object HdcPrintTemplateTO
Response Body
media type data type description
application/json object JSON Response with the information whether operation has been succeeded together with added template id.

DELETE /admin/print/template/{printTemplId}

Remove print template

Request Parameters
name type description default constraints
printTemplId path ID of print template   required long
Response Body
media type data type description
application/json object JSON Response with information, whether the removing has or has not been succeeded.

PUT /admin/print/template/{printTemplId}

Update the specified print template (name and margins only)

Request Parameters
name type description default constraints
printTemplId path   long
Request Body
media type data type description
application/json object HdcPrintTemplateTO
Response Body
media type data type description
application/json object JSON Response with the information whether operation has been succeeded together with added template id.

Example of request:

{"name":"new name", "marginleft":6, marginright:10}

GET /admin/print/templates/json

Get predefined print templates.

Response Body
media type data type description
application/json object

GET /admin/print/legend/templates/json

Get predefined legend print templates.

Response Body
media type data type description
application/json object JSON Response with the list of legend print templates.

Example of response:

{"templates":[{"formatId":1,"formatName":"A4","orientation":"P","templateId":6268,"templateName":"Legend_A4_P","templateOrientation":"P","templateFormat":"A4"},{"formatId":1,"formatName":"A4","orientation":"L","templateId":5138,"templateName":"Legend_A4_L","templateOrientation":"L","templateFormat":"A4"}]}

POST /admin/print/set/add/{setFormatId}

Assign templates to given Print Template Set

Request Parameters
name type description default constraints
setFormatId path ID of FLS   long
Request Body
media type data type
application/json string
Response Body
media type data type description
application/json object JSON Response with information, whether the assignment has or has not been succeeded.

POST /admin/print/set/assign/{setFormatId}

Assign user or group to given Print Template Set

Request Parameters
name type description default constraints
setFormatId path ID of set   long
Request Body
media type data type
application/json string
Response Body
media type data type description
application/json object JSON Response with information, whether the assignment has or has not been succeeded.

POST /admin/print/set/remove/{setFormatId}

remove Print templates from given Print Template Set

Request Parameters
name type description default constraints
setFormatId path ID of FLS   long
Request Body
media type data type
application/json string
Response Body
media type data type description
application/json object

POST /admin/print/set/unassign/{setFormatId}

Unassign user or group to given Print Template Set

Request Parameters
name type description default constraints
setFormatId path ID of set   long
Request Body
media type data type
application/json string
Response Body
media type data type description
application/json object

DELETE /admin/print/template/drawing/{templateId}

delete svg drawing for print template

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

GET /admin/print/template/drawing/{templateId}

get empty (frame + empty print viewports) print template svg drawing

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

PUT /admin/print/template/drawing/{templateId}

add svg drawing for print template

Request Parameters
name type description default constraints
templateId path of template that svg drawing has to be added to   long
Response Body
media type data type description
application/json object

PUT /admin/print/template/element/{templateId}

Update elems inserted in template drawing

Request Parameters
name type description default constraints
templateId path - id of template drawing with macros that have to be updated

Example of request:

{"list":[{"snippet":"$Date,"entityId":"1", "vectorId":"1121"}]}
  required
Request Body
media type data type
application/json object
Response Body
media type data type description
application/json object json object with report about success of insertions

POST /admin/print/template/legend/{templateId}

insert legend in the specified print template

Request Parameters
name type description default constraints
templateId path   required
height query   required
legendId query   long
width query   required
xIns query   required
yIns query   required
Response Body
media type data type description
application/json object

GET /admin/print/set/members/json/{setFormatId}

Get list of Print Template Set members (users or groups)

Request Parameters
name type description default constraints
setFormatId path ID of set   long
mode query    
Response Body
media type data type description
application/json object JSON with list of groups

Example of response:

{"list":[{"id":"x","description":"Members of Tessel Crew group","name":"Tessel Crew"},{"id":"y","description":"aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll ","name":"Group B"}]} or JSON with list of users

Example of response:

{"list":[{"id":1,"name":"admin","userFullName":"Admin","description":"","enabled":true,"email":"","loginCount":1840,"lastLoginDate":"2013-09-26T10:18:36.199072+02:00"},{"id":2,"name":"user1","userFullName":"User 1","description":"","enabled":true,"email":"","loginCount":784,"lastLoginDate":"2013-09-25T13:16:12.990218+02:00"}]}

PUT /admin/print/set/setdefault/{printTemplSetId}/{printTemplId}

Set default security scheme

Request Parameters
name type description default constraints
printTemplId path   long
printTemplSetId path   long
Response Body
media type data type description
application/json object JSON Response with information, whether the setting has or has not been succeeded.

GET /admin/print/set/templates/json/{setFormatId}

Return print templates for following print template set by it's id

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

POST /admin/print/template/element/add/{templateId}

Create new elems to be added to template drawing

Request Parameters
name type description default constraints
templateId path - id of template drawing to which macros are added

Example of request:

{"list":[{"snippet":"$Date,"entityId":0", "vectorId":"1121"}]}
  required
Request Body
media type data type
application/json object
Response Body
media type data type description
application/json object json object with report about success of insertions

POST /admin/print/template/element/delete/{templateId}

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

PUT /admin/print/template/element/order/{templateId}

Update elems order in template drawing

Request Parameters
name type description default constraints
templateId path - id of template drawing with elems that have to be ordered

Example of request:

{"list":[{"snippet":"$Date,"entityId":"1", "vectorId":"1121"}]}
  required
Request Body
media type data type
application/json object
Response Body
media type data type description
application/json object json object with report about success of insertions

DELETE /admin/print/template/element/{templateId}/{entityId}

This method has been deprecated.

Request Parameters
name type description default constraints
entityId path   required
templateId path   required
Response Body
media type data type description
*/* object

DELETE /admin/print/template/legend/{templateId}/{legendId}

delete legend with given legendId form the specified print template

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

PUT /admin/print/template/legend/{templateId}/{legendId}

update legend with given legendId in the specified print template

Request Parameters
name type description default constraints
legendId path   required
templateId path   required
height query   required
width query   required
xIns query   required
yIns query   required
Response Body
media type data type description
application/json object

DELETE /admin/print/legend/template/json/{printFormatId}/{orientation}

Remove legend print template

Request Parameters
name type description default constraints
orientation path    
printFormatId path   required long
Response Body
media type data type description
application/json object JSON Response with information, whether the removing has or has not been succeeded.

GET /admin/print/legend/template/json/{printFormatId}/{orientation}

get legend print template

Request Parameters
name type description default constraints
orientation path    
printFormatId path   required long
Response Body
media type data type description
application/json object JSON Response with specified template.

Example of response:

{"formatId":1,"formatName":"","orientation":"P","templateId":6268,"templateName":"Legend_A4_P","templateOrientation":"P","templateFormat":"A4"}

POST /admin/print/legend/template/json/{printFormatId}/{orientation}/{legendTemplateId}

add new legend print template

Request Parameters
name type description default constraints
legendTemplateId path   required long
orientation path    
printFormatId path   required long
Response Body
media type data type description
application/json object JSON Response with the information whether operation has been succeeded.

PUT /admin/print/legend/template/json/{printFormatId}/{orientation}/{legendTemplateId}

Update the specified legend print template

Request Parameters
name type description default constraints
legendTemplateId path   required long
orientation path    
printFormatId path   required long
Response Body
media type data type description
application/json object JSON Response with the information whether operation has been succeeded.