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

Optional Fields:

NameTypeDescription
inp_doc_descriptionStringInput Document description
inp_doc_form_neededStringDocument type
inp_doc_originalStringDocument format
inp_doc_publishedStringType of access
inp_doc_versioningIntegerType of access
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 Documents100",
   "inp_doc_description": "My Documents100 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": "18588090952ab262d42e3e2019425281",
   "inp_doc_title": "My Documents100",
   "inp_doc_description": "My Documents100 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_descriptionStringInput document description
inp_doc_form_neededStringDocument type
inp_doc_originalStringDocument format
inp_doc_publishedStringType of access
inp_doc_versioningIntegerVersion control enabling
inp_doc_destination_pathStringDestination Path
inp_doc_tagsStringTags

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
   "inp_doc_title": "My Documents100…",
   "inp_doc_description": "My Documents100 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

 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)