Create a revision of PM attachment

Prev Next

Use CMiC Project Management document API to create and upload attachment to CMiC.

Step 1: Upload document with meta details

Form Elements

File Details

This form element contains a JSON string. Attributes provide attachment details where:

Attribute Description
PmdProjUuid Project unique identifier
PmdTypeCode Maps to folder name within the document management system
PmdId Attachment document id
PmdTitle Document title
PmdDesc1 Document description text
PmdDesc2 Additional document description text
PmdrComment Comments
PmdrRcvdDate Document received date
PmdrRevDate Document revision date

document-content-file

This element contains the file attachment that will be uploaded.

Request

curl --request POST \
     --url https://yourserver.com/yourenvironment/pm-doc-rest-api/jersey/v1/uploadDoc \
     --header 'authorization: Basic PDx1c2VyPj46PDxwYXNzPj4=' \
     --header 'accept: application/json' \     
     --header 'content-type: application/json'
     --form 'fileDetails="{
 		\"PmdProjUuid\": \"Project UUID\",
 		\"PmdTypeCode\": \"Folder name\",
 		\"PmdId\": \"Docoument Id\",
 		\"PmdTitle\": \"Document title\",
 		\"PmdDesc1\": \"Description 1\",
 		\"PmdDesc2\": \"Description 2\",
 		\"PmdrComment\": \"Original Document\",
 		\"PmdrRcvdDate\": \"2021-09-28\",
 		\"PmdrRevDate\": \"2021-09-28\"
			}"' \
		--form 'document-content-file=@"document-file-2-upload"'

Response

{
    "result": "Document Uploaded Successfully",
    "pmdRevOraseq": integer,
    "pmdTitle": "Document title",
    "pmdUuid": "Project UUID",
    "pmdRevNum": "0",
    "pmdRevUuid": "Revision UUID",
    "pmdId": "Docoument ID"
}