Output Document Endpoints
The current methods implemented for the output document resources in the ProcessMaker API designer are listed below:
- Output Document Endpoints
- Get Output Documents List:
GET project/{prj_uid}/output-documents
- Get Output Document:
GET project/{prj_uid}/output-document/{out_doc_uid}
- Create Output Document:
POST project/{prj_uid}/output-document
- Update Output Document:
PUT project/{prj_uid}/output-document/{out_doc_uid}
- Delete Output Document:
DELETE project/{prj_uid}/output-document/{out_doc_uid}
Output Document resources:
Name | Description | Type | Value |
---|---|---|---|
out_doc_uid | Output document UID | String | String with the output document UID |
out_doc_title | Document title | String | String with the document title |
out_doc_description | Document description | String | String with the document description |
out_doc_filename | Generated document file name | String | String with the generated file name |
out_doc_template | Document shape or template | String | String with the document template |
out_doc_report_generator | Document generator | String | Library converter used to render the document, valid values are: TCPDF, HTML2PDF
Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF. |
out_doc_landscape | Document orientation | Integer | Valid values: 0 = portrait, 1 = landscape |
out_doc_media | Document size | String | Max length 10 characters |
out_doc_left_margin | Left margin | Integer | Integer number |
out_doc_right_margin | Right margin | Integer | Integer number |
out_doc_top_margin | Upper margin | Integer | Integer number |
out_doc_bottom_margin | Bottom margin | Integer | Integer number |
out_doc_generate | Type of generated document | String | Valid values are: PDF, WORD or BOTH |
out_doc_type | Document type (HTML) | String | String of 32 characters |
out_doc_current_revision | Current document version | Integer | Integer number |
out_doc_field_mapping | Field mapping | String | String |
out_doc_versioning | Document version | Integer | Integer number |
out_doc_destination_path | Document path | String | String |
out_doc_tags | Document tag | String | String |
out_doc_pdf_security_enabled | Password security enabling for PDF documents | Integer | Valid values are:0 disabled and 1 password security enabled |
out_doc_pdf_security_open_password | Password used to open the document | String | String |
out_doc_pdf_security_owner_password | Password of the document owner | String | String |
out_doc_pdf_security_permission | Permissions of the document | String | Valid values are: "print", "modify", "copy", "forms". Values can be combined using the pipe character ("|") |
Information about each method is written in the sections below:
Get Output Documents List: GET project/{prj_uid}/output-documents
Gets a list of the Output Documents of a project.
GET /api/1.0/{workspace}/project/{prj_uid}/output-documents
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of output document objects
Example:
Response
Content-Type: application/json
[
{
"out_doc_uid": "8488283114bffe914417cb5020528882",
"out_doc_title": "Output doc #1",
"out_doc_description": "Output doc #1 - Desc",
"out_doc_filename": "od_generated_1",
"out_doc_template": "",
"out_doc_report_generator": "HTML2PDF",
"out_doc_landscape": 0,
"out_doc_media": "Letter",
"out_doc_left_margin": 0,
"out_doc_right_margin": 0,
"out_doc_top_margin": 0,
"out_doc_bottom_margin": 0,
"out_doc_generate": "BOTH",
"out_doc_type": "HTML",
"out_doc_current_revision": 0,
"out_doc_field_mapping": "",
"out_doc_versioning": 0,
"out_doc_destination_path": "",
"out_doc_tags": "",
"out_doc_pdf_security_enabled": 0,
"out_doc_pdf_security_open_password": "",
"out_doc_pdf_security_owner_password": "",
"out_doc_pdf_security_permissions": ""
}
]
Get Output Document: GET project/{prj_uid}/output-document/{out_doc_uid}
Gets a single Output Document from a project.
GET /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Result:
-
Type Description object Returns an output document object
Example:
Response
Content-Type: application/json
{
"out_doc_uid": "8488283114bffe914417cb5020528882",
"out_doc_title": "Output doc #1",
"out_doc_description": "Output doc #1 - Desc",
"out_doc_filename": "od_generated_1",
"out_doc_template": "",
"out_doc_report_generator": "HTML2PDF",
"out_doc_landscape": 0,
"out_doc_media": "Letter",
"out_doc_left_margin": 0,
"out_doc_right_margin": 0,
"out_doc_top_margin": 0,
"out_doc_bottom_margin": 0,
"out_doc_generate": "BOTH",
"out_doc_type": "HTML",
"out_doc_current_revision": 0,
"out_doc_field_mapping": "",
"out_doc_versioning": 0,
"out_doc_destination_path": "",
"out_doc_tags": "",
"out_doc_pdf_security_enabled": 0,
"out_doc_pdf_security_open_password": "",
"out_doc_pdf_security_owner_password": "",
"out_doc_pdf_security_permissions": ""
}
Create Output Document: POST project/{prj_uid}/output-document
Create a new output document for a project.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
POST /api/1.0/{workspace}/project/{prj_uid}/output-document
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description out_doc_title String Document title out_doc_description String Document description out_doc_filename String Generated document filename
Optional Fields:
-
Name Type Description out_doc_template String Document template or shape out_doc_report_generator String Document generator. It can be TCPDF or HTML2PDF Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF.
out_doc_landscape Integer Document orientation (0=portrait and 1=landscape) out_doc_media String Document size out_doc_left_margin Integer Left margin out_doc_right_margin Integer Right margin out_doc_top_margin Integer Upper margin out_doc_bottom_margin Integer Bottom margin out_doc_generate String Type of generated document (PDF, WORD or BOTH) out_doc_type String Document type (HTML) out_doc_versioning String Document version out_doc_destination_path String Document path out_doc_tags String Document tag out_doc_pdf_security_enabled Integer Password security enabling for pdf documents (0= does not exist and 1 = exists) out_doc_pdf_security_open_password String Password used to open the document out_doc_pdf_security_owner_password String Password for the document owner out_doc_pdf_security_permission String Document permissions
Result:
-
Type Description object Returns the new output document object
Example:
Request
{
"out_doc_title": "Output doc #1",
"out_doc_description": "Output doc #1 - Desc",
"out_doc_filename": "od_generated_1",
"out_doc_template": "Example",
"out_doc_report_generator": "HTML2PDF",
"out_doc_landscape": 0,
"out_doc_media": "Letter",
"out_doc_left_margin": 0,
"out_doc_right_margin": 0,
"out_doc_top_margin": 0,
"out_doc_bottom_margin": 0,
"out_doc_generate": "BOTH",
"out_doc_type": "HTML",
"out_doc_versioning": 0,
"out_doc_destination_path": "",
"out_doc_tags": "",
"out_doc_pdf_security_enabled": 0,
"out_doc_pdf_security_open_password": "",
"out_doc_pdf_security_owner_password": "",
"out_doc_pdf_security_permissions": ""
}
Response
{
"out_doc_title": "Output doc #1",
"out_doc_description": "Output doc #1 - Desc",
"out_doc_filename": "od_generated_1",
"out_doc_template": "Example",
"out_doc_report_generator": "HTML2PDF",
"out_doc_landscape": 0,
"out_doc_media": "Letter",
"out_doc_left_margin": 0,
"out_doc_right_margin": 0,
"out_doc_top_margin": 0,
"out_doc_bottom_margin": 0,
"out_doc_generate": "BOTH",
"out_doc_type": "HTML",
"out_doc_current_revision": 0,
"out_doc_field_mapping": "",
"out_doc_versioning": 0,
"out_doc_destination_path": "",
"out_doc_tags": "",
"out_doc_pdf_security_enabled": 0,
"out_doc_pdf_security_open_password": "",
"out_doc_pdf_security_owner_password": "",
"out_doc_pdf_security_permissions": "",
"pro_uid": "1265557095225ff5c688f46031700471",
"out_doc_uid": "62708276253600efb11bde2066213658"
}
Update Output Document: PUT project/{prj_uid}/output-document/{out_doc_uid}
Update an Output Document in a project.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
PUT /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Required Fields:
-
Name Type Description out_doc_title String Document title out_doc_description String Document description out_doc_filename String Document filename when it is generated
Optional Fields:
-
Name Type Description out_doc_report_generator String Document generator. It can be TCPDF or HTML2PDF Warning: The HTML2PDF is not available on installations over PHP 7.X, specifically as of ProcessMaker 3.3.0. In this case, use TCPDF.
out_doc_landscape Integer Document orientation (0=portrait and 1=landscape) out_doc_media String Document size out_doc_left_margin Integer Left margin out_doc_right_margin Integer Right margin out_doc_top_margin Integer Upper margin out_doc_bottom_margin Integer Bottom margin out_doc_generate String Generated document type (PDF, WORD or BOTH) out_doc_type String Document type (HTML) out_doc_versioning String Document version out_doc_destination_path String Document path out_doc_tags String Document tag out_doc_pdf_security_enabled String Password security enabling for PDF documents (0 = does not exist, 1= exists) out_doc_pdf_security_open_password String Password used to open the document out_doc_pdf_security_owner_password String Password for the document owner out_doc_pdf_security_permission String Document permissions
Result:
-
Type Description empty No return
Example:
Request
{
"out_doc_title": "Output doc #fsdfsdfsd1",
"out_doc_description": "Output doc #1 - Desc",
"out_doc_filename": "od_generated_1",
"out_doc_template": "Example",
"out_doc_report_generator": "HTML2PDF",
"out_doc_landscape": 0,
"out_doc_media": "Letter",
"out_doc_left_margin": 0,
"out_doc_right_margin": 0,
"out_doc_top_margin": 0,
"out_doc_bottom_margin": 0,
"out_doc_generate": "BOTH",
"out_doc_type": "HTML",
"out_doc_versioning": 0,
"out_doc_destination_path": "",
"out_doc_tags": "",
"out_doc_pdf_security_enabled": 0,
"out_doc_pdf_security_open_password": "",
"out_doc_pdf_security_owner_password": "",
"out_doc_pdf_security_permissions": ""
}
Response
Delete Output Document: DELETE project/{prj_uid}/output-document/{out_doc_uid}
Delete an Output Document in a project.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
DELETE /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Result:
-
Type Description empty No return
Example:
Response