Create a revision of PM attachment
  • 13 Mar 2024
  • 1 Minute to read
  • Dark
    Light

Create a revision of PM attachment

  • Dark
    Light

Article Summary

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:

AttributeDescription
PmdProjUuidProject unique identifier
PmdTypeCodeMaps to folder name within the document management system
PmdIdAttachment document id
PmdTitleDocument title
PmdDesc1Document description text
PmdDesc2Additional document description text
PmdrCommentComments
PmdrRcvdDateDocument received date
PmdrRevDateDocument 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"
}

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses