After Reading a List of Documents Using P6 Web Services or P6 REST API a Failure Occurs When Downloading Some of the Documents in the List
(Doc ID 3045832.1)
Last updated on SEPTEMBER 06, 2024
Applies to:
Primavera P6 Enterprise Project Portfolio Management Cloud Service - Version 24.1 and laterInformation in this document applies to any platform.
Symptoms
Documents returned from the P6 REST API or P6 Web Services are failing to download.
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1.Use the P6 REST API to load a list of all documents for a project. For example:
REQUEST:
{{P6_REST_HOST}}/p6ws/restapi/document?Filter=ProjectObjectId:eq:'12345'&Fields=ActivityObjectId,Author,ContentRepositoryDocumentInternalId,CreateDate,CreateUser,Deliverable,Description,DocumentCategoryName,DocumentCategoryObjectId,DocumentStatusCodeName,
DocumentStatusCodeObjectId,DocumentStatusName,DocumentType,GUID,IsBaseline,IsTemplate,LastUpdateDate,LastUpdateUser,ObjectId,ParentObjectId,PrivateLocation,ProjectId,ProjectObjectId,PublicLocation,ReferenceNumber,ResourceId,ResourceName,ResourceObjectId,
RevisionDate,SequenceNumber,Title,Version
RESPONSE:
{
"Author": "John",
"ContentRepositoryDocumentInternalId": "73192",
"CreateDate": "2024-01-15T22:08:15",
"CreateUser": "john",
"Deliverable": "false",
"DocumentStatusName": "",
"DocumentType": "Repository Document",
"IsBaseline": "false",
"IsTemplate": "false",
"LastUpdateDate": "2024-01-15T22:08:15",
"LastUpdateUser": "john",
"ObjectId": "11111",
"PrivateLocation": "Collaboration Document",
"ProjectId": "PROJ-1",
"ProjectObjectId": "12345",
"PublicLocation": "Doc1.pdf",
"RevisionDate": "2024-01-15T00:00:00",
"SequenceNumber": "10",
"Title": "Doc1.pdf",
"Version": "1"
},
{
"Author": "Bob",
"ContentRepositoryDocumentInternalId": "73193",
"CreateDate": "2024-01-15T22:08:32",
"CreateUser": "bob",
"Deliverable": "false",
"Description": "",
"DocumentStatusName": "",
"DocumentType": "Repository Document",
"IsBaseline": "false",
"IsTemplate": "false",
"LastUpdateDate": "2024-01-15T22:08:39",
"LastUpdateUser": "bob",
"ObjectId": "22222",
"PrivateLocation": "Collaboration Document",
"ProjectId": "PROJ-1",
"ProjectObjectId": "12345",
"PublicLocation": "Doc2.pdf",
"RevisionDate": "2024-01-15T00:00:00",
"SequenceNumber": "20",
"Title": "Doc2.pdf",
"Version": "1"
}
2. Use the P6 REST API to download the first document and it fails.
REQUEST:
{{P6_REST_HOST}}/p6ws/restapi/document/downloadDocument?Version=1&DownloadType=RESPONSE_JSON_ONLY&DocumentObjectId=11111
RESPONSE:
--Boundary_677_1055971267_1712689721690
Content-Type: application/json
{"Success":"Fail","ErrorMessage":"Document ID: 11111 is not valid."}
--Boundary_677_1055971267_1712689721690--
3. Use the P6 REST API to download the second document and it succeeds.
REQUEST:
{{P6_REST_HOST}}/p6ws/restapi/document/downloadDocument?Version=1&DownloadType=RESPONSE_JSON_ONLY&DocumentObjectId=22222
RESPONSE:
--Boundary_676_1456851371_1712687505744
Content-Type: application/json
{"Success":"True","DocumentObjectId":"22222","Title":"Doc2.pdf","SecurityPolicy":"Shared","Author":"Bob","Version":"1","Size":"444764 Bytes","LastUpdateUser":"bob","LastUpdateDate":"Jan 15, 2024, 10:08:30 PM","Owner":"","ProjectObjectId":"12345","ProjectIdName":"PROJ-1"}
--Boundary_676_1456851371_1712687505744--
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |