Please rate how useful you found this document: 
Average: 2.3 (4 votes)

Input Document Endpoints

The current methods implemented for the input document resources in the ProcessMaker API designer are listed below:

Input Document resources:

NameDescriptionTypeValue
inp_doc_uidInput Document UIDString“9541049475298f190420f51086854718” (string of 32 characters)
inp_doc_titleInput document titleString"Title"
inp_doc_descriptionInput document descriptionString"Description"
inp_doc_form_neededDocument typeString"VIRTUAL", "REAL", "VREAL" (unique values)
inp_doc_originalDocument formatString"ORIGINAL", "COPY", "COPYLEGAL", (unique values) Default: "COPY"
inp_doc_publishedType of accessString"PRIVATE" (unique values) Default: "PRIVATE"
inp_doc_versioningEnable versioning controlInteger0, 1 (unique values) Default: 0
inp_doc_destination_pathDestination PathString"/my/path/"
inp_doc_tagsTagsString"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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects that includes each input document.

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringInput document UID

Result:

TypeDescription
objectReturns an object with the input document data

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
inp_doc_titleStringDocument Title
inp_doc_type_fileStringDocument extension that can be ".*" for all elements, ".pdf" for a PDF document, or ".doc" for a Microsoft Word document
inp_doc_max_filesizeIntegerMaximum file size major to zero. Use zero for unlimited file size
inp_doc_max_filesize_unitStringFile size unit that can be KB or MB

Optional Fields:

NameTypeDescription
inp_doc_descriptionStringInput Document description
inp_doc_form_neededStringDocument type that can be VIRTUAL, REAL or VREAL
inp_doc_originalStringDocument format that can be ORIGINAL, COPY or COPYLEGAL
inp_doc_publishedStringType of access that can be PRIVATE or PUBLIC
inp_doc_versioningIntegerDocument versioning that can be 0 or 1
inp_doc_destination_pathStringDestination Path
inp_doc_tagsStringTags

Result:

TypeDescription
objectReturns an object with the new Input Document information, and the "inp_doc_uid" attribute

Example:

Request

 Content-Type: application/json
 {
  "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

 201 (Created)
 {
    "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}
NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringThe input document UID

Optional Fields:

NameTypeDescription
inp_doc_titleStringTitle
inp_doc_type_fileStringDocument extension that can be ".*" for all elements, ".pdf" for a PDF document, or ".doc" for a Microsoft Word document
inp_doc_max_filesizeIntegerMaximum file size major to zero. Use zero for unlimited file size
inp_doc_max_filesize_unitStringMaximum file size unit that can be KB or MB
inp_doc_descriptionStringInput document description
inp_doc_form_neededStringDocument type that can be VIRTUAL, REAL or VREAL
inp_doc_originalStringDocument format that can be ORIGINAL, COPY or COPYLEGAL
inp_doc_publishedStringType of access that can be PRIVATE or PUBLIC
inp_doc_versioningIntegerVersion control enabling that can be 0 or 1
inp_doc_destination_pathStringDestination Path
inp_doc_tagsStringTags

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
   "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

 200 (OK)


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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringInput document UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)