Input Document Endpoints
The current methods implemented for the input document resources in the ProcessMaker API designer are listed below:
- Input Document Endpoints
- Get Input Documents List:
GET project/{prj_uid}/input-documents
- Get Input Document:
GET project/{prj_uid}/input-document/{inp_doc_uid}
- Create Input Document:
POST project/{prj_uid}/input-document
- Update Input Document:
PUT project/{prj_uid}/input-document/{inp_doc_uid}
- Delete Input Document:
DELETE project/{prj_uid}/input-document/{inp_doc_uid}
Input Document resources:
Name | Description | Type | Value |
---|---|---|---|
inp_doc_uid | Input Document UID | String | “9541049475298f190420f51086854718” (string of 32 characters) |
inp_doc_title | Input document title | String | "Title" |
inp_doc_description | Input document description | String | "Description" |
inp_doc_form_needed | Document type | String | "VIRTUAL", "REAL", "VREAL" (unique values) |
inp_doc_original | Document format | String | "ORIGINAL", "COPY", "COPYLEGAL", (unique values) Default: "COPY" |
inp_doc_published | Type of access | String | "PRIVATE" (unique values) Default: "PRIVATE" |
inp_doc_versioning | Enable versioning control | Integer | 0, 1 (unique values) Default: 0 |
inp_doc_destination_path | Destination Path | String | "/my/path/" |
inp_doc_tags | Tags | String | "INPUT" |
Information about each method is written in the sections below:
Get Input Documents List: GET project/{prj_uid}/input-documents
Gets a list of Input Documents in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects that includes each input document.
Example:
Response
Content-Type: application/json
[
{
"inp_doc_uid": "61792009652aa1529305888088498275",
"inp_doc_title": "My Documents1",
"inp_doc_description": "My Documents1 DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
},
{
"inp_doc_uid": "86412625952aa188dd2c124045671550",
"inp_doc_title": "My Documents2",
"inp_doc_description": "My Documents2 DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
]
Get Input Document: GET project/{prj_uid}/input-document/{inp_doc_uid}
Gets a single Input Document in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String Input document UID
Result:
-
Type Description object Returns an object with the input document data
Example:
Response
Content-Type: application/json
{
"inp_doc_uid": "61792009652aa1529305888088498275",
"inp_doc_title": "My Documents1",
"inp_doc_description": "My Documents1 DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
Create Input Document: POST project/{prj_uid}/input-document
Create a new Input Document in 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}/input-document
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description inp_doc_title String Document Title inp_doc_type_file String Document extension that can be ".*" for all elements, ".pdf" for a PDF document, or ".doc" for a Microsoft Word document inp_doc_max_filesize Integer Maximum file size major to zero. Use zero for unlimited file size inp_doc_max_filesize_unit String File size unit that can be KB
orMB
Optional Fields:
-
Name Type Description inp_doc_description String Input Document description inp_doc_form_needed String Document type that can be VIRTUAL, REAL or VREAL inp_doc_original String Document format that can be ORIGINAL, COPY or COPYLEGAL inp_doc_published String Type of access that can be PRIVATE or PUBLIC inp_doc_versioning Integer Document versioning that can be 0
or1
inp_doc_destination_path String Destination Path inp_doc_tags String Tags
Result:
-
Type Description object Returns an object with the new Input Document information, and the "inp_doc_uid" attribute
Example:
Request
{
"inp_doc_title": "My Documents Created by a endpoint1",
"inp_doc_type_file": ".*",
"inp_doc_max_filesize": 0,
"inp_doc_max_filesize_unit": "KB",
"inp_doc_description": "this is my DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
Response
{
"inp_doc_uid": "2891896755bd87ef3790f17025958542",
"inp_doc_title": "My Documents Created by a endpoint",
"inp_doc_type_file": ".*",
"inp_doc_max_filesize": 0,
"inp_doc_max_filesize_unit": "KB",
"inp_doc_description": "this is my DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
Update Input Document: PUT project/{prj_uid}/input-document/{inp_doc_uid}
Update an Input 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}/input-document/{inp_doc_uid}
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String The input document UID
Optional Fields:
-
Name Type Description inp_doc_title String Title inp_doc_type_file String Document extension that can be ".*" for all elements, ".pdf" for a PDF document, or ".doc" for a Microsoft Word document inp_doc_max_filesize Integer Maximum file size major to zero. Use zero for unlimited file size inp_doc_max_filesize_unit String Maximum file size unit that can be KB
orMB
inp_doc_description String Input document description inp_doc_form_needed String Document type that can be VIRTUAL, REAL or VREAL inp_doc_original String Document format that can be ORIGINAL, COPY or COPYLEGAL inp_doc_published String Type of access that can be PRIVATE or PUBLIC inp_doc_versioning Integer Version control enabling that can be 0
or1
inp_doc_destination_path String Destination Path inp_doc_tags String Tags
Result:
-
Type Description empty No return
Example:
Request
{
"inp_doc_title": "Update My Input Document",
"inp_doc_description": "update DESCRIPTION",
"inp_doc_form_needed": "REAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 0,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT",
"inp_doc_type_file": ".pdf",
"inp_doc_max_filesize": 10,
"inp_doc_max_filesize_unit": "KB"
}
Response
Delete Input Document: DELETE project/{prj_uid}/input-document/{inp_doc_uid}
Delete an Input 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}/input-document/{inp_doc_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String Input document UID
Result:
-
Type Description empty No return
Example:
Response