> ## Documentation Index > Fetch the complete documentation index at: https://developers.cmicglobal.com/llms.txt > Use this file to discover all available pages before exploring further. # Add a New Revision to an Existing PM Attachment > # Overview Adds a new revision to an existing PM Attachment. The parent document is identified by its UUID in the path, and the uploaded file is stored as its newest revision. The revision number is assigned by CMiC and cannot be supplied by the caller. Object links already on the parent document are left untouched, so the document stays attached to whatever it was linked to before. ## Request Payload This request is sent as `multipart/form-data`. - `document-content-file` (file, required): The file to store as the new revision. If this part is missing, the request fails with `PM-000217-ERR`. - `fileDetails` (text, optional): JSON metadata for the new revision. The part may be omitted or left blank, in which case the revision is created from the uploaded file alone. Unrecognized fields are ignored. Every field below is optional: - `PmdrComment` (string): Comment recorded against the revision. - `PmdrRevDate` (string): Revision date, in `YYYY-MM-DD` format. - `PmdrRcvdDate` (string): Received date, in `YYYY-MM-DD` format. ## Response payload On success, the response is JSON describing the revision that was created: - `Result` (string): Always `Revision Added Successfully`. - `PmdRevUuid` (string): UUID of the new revision. - `PmdRevNum` (string): Revision number assigned by CMiC. - `PmdRevOraseq` (string): Internal sequence number of the new revision. - `PmdUuid` (string): UUID of the parent PM Attachment. - `PmdId` (string): Document ID of the parent PM Attachment. - `PmdTitle` (string): Existing title of the document. Adding a revision does not change it. Fields with no value are omitted from the response. Errors return the standard error payload: `uuid`, `status`, `errorCode`, `errorMessage`, `timestamp`, and `moreDetails`. ## HTTP response statuses - `200 OK`: The revision was created. - `400 Bad Request`: The request was rejected before any revision was created. The specific cause is in `errorCode`: - `PM-000222-ERR`: No document UUID was supplied in the path. - `PM-000217-ERR`: The `document-content-file` part is missing from the request. - `PM-000228-ERR`: No document exists for the supplied UUID. - `PM-000224-ERR`: The document exists but is not a PM Attachment, so it is not linked to a project. - `PM-000227-ERR`: The user does not have rights to create documents of this type. - `401 Unauthorized`: The user lacks the required access. On these responses the PM code is returned in `errorMessage` rather than `errorCode`: - `PM-000233-ERR`: The user has no menu access to Documents. - `PM-000234-ERR`: The user has no accessible document types. - `PM-000235-ERR`: The document's type is not in the user's editable document types. - `PM-000237-ERR`: The user has no program access to the Document Log. - `500 Internal Server Error`: The revision could not be created, for example because `fileDetails` was not valid JSON, the file could not be written, or the database call failed. Any partially written file is removed and the transaction is rolled back. ## OpenAPI ````json POST /pm-doc-rest-api/jersey/v1/uploadDoc/{Vuuid}/revisions { "openapi": "3.0.0", "info": { "title": "API Catalog", "description": "", "version": "1.0.0" }, "servers": [ { "url": "https://mobtest.cmiccloudr12.com/cmictestrti", "description": "CMIC API Server" } ], "security": [ { "cmicBasicAuth": [] } ], "tags": [ { "name": "Highlights" }, { "name": "Asset Management | Equipment" }, { "name": "Asset Management | Fixed Assets" }, { "name": "Asset Management | Purchase Order" }, { "name": "Asset Management | Inventory" }, { "name": "Asset Management | Requisition" }, { "name": "Asset Management | Purchase Change Order" }, { "name": "Bim Model" }, { "name": "Bim Model Revision" }, { "name": "Bim Tag Model" }, { "name": "Bim Tags" }, { "name": "Bim FileUpload Jersey" }, { "name": "Core System | Business Partners" }, { "name": "Core System | Business Partner Addresses" }, { "name": "Core System | Bank" }, { "name": "Core System | Currency" }, { "name": "Core System | Exchange Rates" }, { "name": "Core System | Global Table Text Codes" }, { "name": "Core System | Global Table Regions" }, { "name": "Core System | Terms" }, { "name": "Core System | System Contact" }, { "name": "Core System | Weight Measures" }, { "name": "Core System | Field User Defined Classifiers" }, { "name": "Core System | User Defined Classifiers by Object" }, { "name": "Core System | User Extension Definitions by Object" }, { "name": "Core System | User Extention Field Data Value" }, { "name": "Core System | User Extension Values by Object" }, { "name": "Core System | User System Role" }, { "name": "Core System | User Project Role" }, { "name": "Core System | Documents by Object" }, { "name": "Core System | Audit Status Log by Object" }, { "name": "Core System | Licensed Users" }, { "name": "Core System | Company Access" }, { "name": "Core System | Copy User Settings" }, { "name": "Core System | User Maintenance" }, { "name": "Core System | User Roles" }, { "name": "Core System | Security Groups" }, { "name": "Core System | Job/Project Security" }, { "name": "Core System | Weight Measure with Conversions Code" }, { "name": "Core System | Weight Measure Conversions Code" }, { "name": "Core System | User-defined-fields" }, { "name": "Core System | User-extension" }, { "name": "ECM and Workflow | Image Manager" }, { "name": "Financials | General Ledger" }, { "name": "Financials | Accounts Payable" }, { "name": "Financials | Accounts Receivable" }, { "name": "Preventative Maintenance | Issue Work Orders" }, { "name": "Preventative Maintenance | Issue Work Items" }, { "name": "Preventative Maintenance | Issue Work Budgets" }, { "name": "Preventative Maintenance | Issue Priorities" }, { "name": "Preventative Maintenance | Issue Status" }, { "name": "Preventative Maintenance | Issue Types" }, { "name": "Preventative Maintenance | Accumulative Equipment" }, { "name": "Preventative Maintenance | Work Orders" }, { "name": "Preventative Maintenance | Work Items" }, { "name": "Preventative Maintenance | Work Budgets" }, { "name": "Preventative Maintenance | Priorities" }, { "name": "Preventative Maintenance | Tasks" }, { "name": "HCM | UKG Pay Deductions" }, { "name": "HCM | UKG Pay Earnings" }, { "name": "HCM | UKG Pay Headers" }, { "name": "HCM | UKG Pay Taxes" }, { "name": "HCM | Payroll Geographical States" }, { "name": "HCM | Payroll Trades" }, { "name": "HCM | Payroll Union" }, { "name": "HCM | Payroll Pay Runs" }, { "name": "HCM | Payroll Pay Groups" }, { "name": "HCM | Payroll Tax" }, { "name": "HCM | Payroll Worker Compensation" }, { "name": "HCM | Payroll Work Locations" }, { "name": "HCM | Payroll Trade Pay Rates" }, { "name": "HCM | Payroll Union Pay Rates" }, { "name": "HCM | Payroll Job Pay Rates" }, { "name": "HCM | Payroll Master Benefits" }, { "name": "HCM | Payroll Master Deductions" }, { "name": "HCM | Payroll Ben/Ded/Leave Base Codes" }, { "name": "HCM | Payroll Ben/Ded Plans" }, { "name": "HCM | Payroll Ben/Ded Plan Options" }, { "name": "HCM | Payroll Company Benefits" }, { "name": "HCM | Payroll Company Deductions" }, { "name": "HCM | Payroll Vertex Geographic Locations" }, { "name": "HCM | Payroll Checks" }, { "name": "HCM | Payroll Timesheets" }, { "name": "HCM | Employee" }, { "name": "HCM | Employee (Minimum payload)" }, { "name": "HCM | Employee History" }, { "name": "HCM | Tax Exemptions" }, { "name": "HCM | Employee Tax Overrides" }, { "name": "HCM | Employee Pay Splits" }, { "name": "HCM | Employee Benefits" }, { "name": "HCM | Employee Clock In and Out" }, { "name": "HCM | Employee Deductions" }, { "name": "HCM | Employee Leaves" }, { "name": "HCM | Employee Leave History" }, { "name": "HCM | Employee Hour Types" }, { "name": "HCM | Employee Pay History" }, { "name": "HCM | Employee Work Statuses" }, { "name": "HCM | Employee Security Group" }, { "name": "HCM | Crewtime Crew" }, { "name": "HCM | Crewtime Employee Timesheet" }, { "name": "HCM | Crewtime Equipment Timesheet" }, { "name": "HCM | Crew Maintenance Activity Assignment" }, { "name": "HCM | Crew Maintenance Member Assignment" }, { "name": "HCM | Crew Maintenance Member Trade and Union Assignment" }, { "name": "HCM | Crew Maintenance Equipment Assignment" }, { "name": "HCM | Crew Maintenance Equipment Detail Assignment" }, { "name": "HCM | HR Requisitions" }, { "name": "HCM | HR Relations" }, { "name": "HCM | HR Employee Skills" }, { "name": "HCM | HR Incident" }, { "name": "HCM | HR Employee Relatives / Dependents" }, { "name": "HCM | HR Employee Positions" }, { "name": "HCM | HR Applicants" }, { "name": "HCM | HR Applications" }, { "name": "HCM | Vertex Location City" }, { "name": "HCM | HR Application History" }, { "name": "HCM | HR Dependent Benefits" }, { "name": "HCM | HR Dependent Deductions" }, { "name": "HCM | HR Employee Elected Plans" }, { "name": "HCM | HR Employee Training Certifications" }, { "name": "HCM | HR Trainings" }, { "name": "HCM | E-Timesheets" }, { "name": "HCM | System Contacts" }, { "name": "HCM | System User Payroll Security Group" }, { "name": "HCM | Payroll Timesheet Posting" }, { "name": "HCM | CrewTimesheet Posting" }, { "name": "HCM | HR Positions Master" }, { "name": "HCM | Payroll Pay Periods" }, { "name": "HCM | Payroll Rate Codes" }, { "name": "HCM | Payroll Overhead Codes and Rates" }, { "name": "HCM | Payroll Assigned Overhead to Jobs" }, { "name": "Materials Management | Material Sale Orders" }, { "name": "Materials Management | Material Sale Orders Details" }, { "name": "Materials Management | Truck Rate Detail" }, { "name": "Opportunity Management | Competitors" }, { "name": "Opportunity Management | Opportunities" }, { "name": "Opportunity Management | Revenue Details" }, { "name": "Opportunity Management | Opportunity History" }, { "name": "Opportunity Management | Organization" }, { "name": "Project Controls | Job Billing" }, { "name": "Project Controls | Job Cost" }, { "name": "Project Controls | PCI Details" }, { "name": "Project Controls | Unposted PCI Details" }, { "name": "Project Controls | PCI Headers" }, { "name": "Project Controls | Owner Change Orders" }, { "name": "Project Controls | CM Statuses" }, { "name": "Project Controls | CM Types" }, { "name": "Project Controls | CM Vendor Details" }, { "name": "Project Controls | Post PCI" }, { "name": "Project Management | Uploading Documents" }, { "name": "Project Management | Downloading Documents" }, { "name": "Project Management | Foreign Bid Item Imports" }, { "name": "Project Management | Communications" }, { "name": "Project Management | Daily Journals" }, { "name": "Project Management | Communications Types" }, { "name": "Project Management | Daily Journal Daily Work Plans" }, { "name": "Project Management | Daily Journal Field Forces" }, { "name": "Project Management | Daily Journal Labour" }, { "name": "Project Management | Daily Journal Materials" }, { "name": "Project Management | Daily Journal Owner Equipment" }, { "name": "Project Management | Daily Journal Quality Control" }, { "name": "Project Management | Daily Journal Tasks" }, { "name": "Project Management | Daily Journal Trade Equipment" }, { "name": "Project Management | Daily Journal Transactions" }, { "name": "Project Management | Daily Journal User Defined Data" }, { "name": "Project Management | Daily Journal Visitors" }, { "name": "Project Management | Daily Journal Bill Details" }, { "name": "Project Management | Field Work Directives" }, { "name": "Project Management | Contract Types" }, { "name": "Project Management | Company Contacts" }, { "name": "Project Management | Distribution BCC" }, { "name": "Project Management | Distribution CC" }, { "name": "Project Management | Field Work Directive Statuses" }, { "name": "Project Management | Issues" }, { "name": "Project Management | Key Players" }, { "name": "Project Management | Meetings" }, { "name": "Project Management | Meeting Attendees" }, { "name": "Project Management | Meeting Item Statuses" }, { "name": "Project Management | Meeting Tracks" }, { "name": "Project Management | Notes" }, { "name": "Project Management | Projects" }, { "name": "Project Management | Project Items" }, { "name": "Project Management | Project Item Phase Segment Sums" }, { "name": "Project Management | Project Partners" }, { "name": "Project Management | Notices" }, { "name": "Project Management | Notice Statuses" }, { "name": "Project Management | Owner JS Query" }, { "name": "Project Management | PCI Real Locations" }, { "name": "Project Management | Project Contacts" }, { "name": "Project Management | RFIs (Requests for Information)" }, { "name": "Project Management | RFI Statuses" }, { "name": "Project Management | Submittal Packages" }, { "name": "Project Management | Submittal Package Details" }, { "name": "Project Management | Submittal Package Status" }, { "name": "Project Management | Submittals" }, { "name": "Project Management | Submittal Status" }, { "name": "Project Management | Transmittals" }, { "name": "Project Management | Subcontract Headers" }, { "name": "Project Management | Subcontract Schedules" }, { "name": "Project Management | Subcontract Sechedule Phase Segment Sums" }, { "name": "Project Management | User Roles" }, { "name": "Project Management | Punchlists" }, { "name": "Project Management | Punchlist Details" }, { "name": "Project Management | Punchlist Statuses" }, { "name": "Project Management | Meeting Items" }, { "name": "Project Management | Self Perform Vendor" }, { "name": "Project Management | Submittal Types" }, { "name": "Project Management | Assign contact and partner to project" }, { "name": "Project Management | Subcontract Prequal" }, { "name": "Project Management | Bid Item Package" } ], "paths": { "/pm-doc-rest-api/jersey/v1/uploadDoc/{Vuuid}/revisions": { "post": { "tags": [ "Project Management | Uploading Documents" ], "summary": "Add a New Revision to an Existing PM Attachment", "description": "# Overview\n\nAdds a new revision to an existing PM Attachment. The parent document is identified by its UUID in the path, and the uploaded file is stored as its newest revision. The revision number is assigned by CMiC and cannot be supplied by the caller.\n\nObject links already on the parent document are left untouched, so the document stays attached to whatever it was linked to before.\n\n## Request Payload\n\nThis request is sent as `multipart/form-data`.\n\n- `document-content-file` (file, required): The file to store as the new revision. If this part is missing, the request fails with `PM-000217-ERR`.\n\n- `fileDetails` (text, optional): JSON metadata for the new revision. The part may be omitted or left blank, in which case the revision is created from the uploaded file alone. Unrecognized fields are ignored. Every field below is optional:\n\n - `PmdrComment` (string): Comment recorded against the revision.\n\n - `PmdrRevDate` (string): Revision date, in `YYYY-MM-DD` format.\n\n - `PmdrRcvdDate` (string): Received date, in `YYYY-MM-DD` format.\n\n## Response payload\n\nOn success, the response is JSON describing the revision that was created:\n\n- `Result` (string): Always `Revision Added Successfully`.\n\n- `PmdRevUuid` (string): UUID of the new revision.\n\n- `PmdRevNum` (string): Revision number assigned by CMiC.\n\n- `PmdRevOraseq` (string): Internal sequence number of the new revision.\n\n- `PmdUuid` (string): UUID of the parent PM Attachment.\n\n- `PmdId` (string): Document ID of the parent PM Attachment.\n\n- `PmdTitle` (string): Existing title of the document. Adding a revision does not change it.\n\nFields with no value are omitted from the response.\n\nErrors return the standard error payload: `uuid`, `status`, `errorCode`, `errorMessage`, `timestamp`, and `moreDetails`.\n\n## HTTP response statuses\n\n- `200 OK`: The revision was created.\n\n- `400 Bad Request`: The request was rejected before any revision was created. The specific cause is in `errorCode`:\n\n - `PM-000222-ERR`: No document UUID was supplied in the path.\n\n - `PM-000217-ERR`: The `document-content-file` part is missing from the request.\n\n - `PM-000228-ERR`: No document exists for the supplied UUID.\n\n - `PM-000224-ERR`: The document exists but is not a PM Attachment, so it is not linked to a project.\n\n - `PM-000227-ERR`: The user does not have rights to create documents of this type.\n\n- `401 Unauthorized`: The user lacks the required access. On these responses the PM code is returned in `errorMessage` rather than `errorCode`:\n\n - `PM-000233-ERR`: The user has no menu access to Documents.\n\n - `PM-000234-ERR`: The user has no accessible document types.\n\n - `PM-000235-ERR`: The document's type is not in the user's editable document types.\n\n - `PM-000237-ERR`: The user has no program access to the Document Log.\n\n- `500 Internal Server Error`: The revision could not be created, for example because `fileDetails` was not valid JSON, the file could not be written, or the database call failed. Any partially written file is removed and the transaction is rolled back.", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "fileDetails": { "type": "string", "description": "Optional JSON metadata for the new revision. Accepts PmdrComment, PmdrRevDate and PmdrRcvdDate, all optional. May be omitted or left blank.", "example": "{\n \"PmdrComment\": \"Second revision\",\n \"PmdrRevDate\": \"2025-02-01\",\n \"PmdrRcvdDate\": \"2025-02-01\"\n}" }, "document-content-file": { "type": "string", "description": "Required. The file to store as the new revision. If it is missing, the request fails with PM-000217-ERR.", "format": "binary" } } } } } }, "parameters": [ { "name": "Content-Type", "in": "header", "schema": { "type": "string" }, "example": "application/vnd.oracle.adf.resourceitem+json" }, { "name": "Vuuid", "in": "path", "schema": { "type": "string" }, "required": true, "description": { "content": "The UUID of the parent PM Attachment to add a revision to.", "type": "text/plain" } } ], "responses": { "200": { "description": "OK", "headers": { "Content-Type": { "schema": { "type": "string", "example": "application/json" } } }, "content": { "application/json": { "schema": { "type": "object" }, "example": { "Result": "Revision Added Successfully", "PmdRevUuid": "0164DED6D2E448EAE06316821FAC3745", "PmdRevNum": "1", "PmdRevOraseq": "842843701", "PmdUuid": "0164DED6D2E048EAE06316821FAC3745", "PmdId": "DOC-100000001", "PmdTitle": "Site Plan" } } } }, "400": { "description": "Bad Request", "headers": { "Content-Type": { "schema": { "type": "string", "example": "application/json" } } }, "content": { "application/json": { "schema": { "type": "object" }, "examples": { "example-0": { "summary": "PM-000217 - Document Content File Required", "value": { "uuid": "00000000-0000-0000-0000-000000000000", "status": "Error", "errorCode": "PM-000217-ERR", "errorMessage": "document-content-file part of multi-part upload is required", "timestamp": "2025-02-01 00:00:00.000", "moreDetails": { "ecid": "00000000-0000-0000-0000-000000000000-00000000" } } }, "example-1": { "summary": "PM-000228 - Document Not Found", "value": { "uuid": "00000000-0000-0000-0000-000000000000", "status": "Error", "errorCode": "PM-000228-ERR", "errorMessage": "No document found for the supplied uuid", "timestamp": "2025-02-01 00:00:00.000", "moreDetails": { "ecid": "00000000-0000-0000-0000-000000000000-00000000" } } }, "example-2": { "summary": "PM-000227 - Insufficient Rights", "value": { "uuid": "00000000-0000-0000-0000-000000000000", "status": "Error", "errorCode": "PM-000227-ERR", "errorMessage": "User does not have rights to create documents of this type", "timestamp": "2025-02-01 00:00:00.000", "moreDetails": { "ecid": "00000000-0000-0000-0000-000000000000-00000000" } } } } } } } } } } }, "components": { "securitySchemes": { "cmicBasicAuth": { "type": "http", "scheme": "basic", "description": "Basic authentication" } } } } ````