Sure I will try out few and share.
Sr. Principal Support Engineer | Customer Success & Support, Enterprise Software Division
Original Message:
Sent: 01-27-2021 02:05 PM
From: Velayutham Palaniappan
Subject: Utilizing REST API (perhaps efficiently)
Hi Suman,
Thank you once again for quick your responses, considering my endpoint being
POST : /projects/{projectinternalid}
Can you please give be a sample JSON file that will create/update both tasks and assignments in a single call?
Not Urgent. If you can let me know when possible it would be great.
Thank You.
Regards,
Velayutham Palaniappan
Original Message:
Sent: 01-27-2021 01:59 PM
From: Suman Pramanik
Subject: Utilizing REST API (perhaps efficiently)
You can't create tasks (subobjects) for multiple projects in the same call, but you can create multiple tasks/assignments for the same project in one call.
------------------------------
Thanks & Regards
Suman Pramanik
Sr. Principal Support Engineer | Customer Success & Support, Enterprise Software Division
Broadcom
Original Message:
Sent: 01-27-2021 01:57 PM
From: Velayutham Palaniappan
Subject: Utilizing REST API (perhaps efficiently)
And can we update multiple tasks and multiple assignments in a single project at once?
Original Message:
Sent: 01-27-2021 01:12 PM
From: Suman Pramanik
Subject: Utilizing REST API (perhaps efficiently)
The batch limit for bulk is 50 only at this point and here is the documentation
https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/clarity-project-and-portfolio-management-ppm-on-premise/15-8/reference/rest-api-documentation-for-authorized-developers.html#concept.dita_a02421bf966fed381bd1178ddc1b6ec319b070fb_SampleAPIRequestsandResponses
You can't get multiple projects and multiple tasks and multiple assignments in a single request, but you can get multiple projects and multiple tasks. "multi" part goes at 2 levels only. This is different from saying "bulk". This is giving you data for different related objects.
POST/PATCH/DELETE
You can bulk "PATCH" (or POST/DELETE) up to 50 instances in a single API call. This avoids HTTP overhead. (Remember that behind the scene, it still processes the records one by one). You can't create tasks (subobjects) for multiple projects in the same call, but you can create multiple tasks for the same project in one call.
------------------------------
Thanks & Regards
Suman Pramanik
Sr. Principal Support Engineer | Customer Success & Support, Enterprise Software Division
Broadcom
Original Message:
Sent: 01-27-2021 09:08 AM
From: Velayutham Palaniappan
Subject: Utilizing REST API (perhaps efficiently)
Hi Suman,
Thank you for your quick response. We have used expand query for GET request.
Can we do the same for POST/PATCH or PUT?
Can you confirm on this.
Thanks
Original Message:
Sent: 01-27-2021 07:03 AM
From: Suman Pramanik
Subject: Utilizing REST API (perhaps efficiently)
Yes we do support expand and we have documented the same too. Please review our API documentation under Expand Query Parameter
https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/clarity-project-and-portfolio-management-ppm-on-premise/15-8-1/reference/Clarity-REST-APIs/rest-api-documentation-for-authorized-developers.html
projects/5000001?expand=(tasks=(fields=(code,startDate,costType)),teams)
The expand query parameter in URL indicates that resources associated with the REST resource must be represented inline within the response.
------------------------------
Thanks & Regards
Suman Pramanik
Sr. Principal Support Engineer | Customer Success & Support, Enterprise Software Division
Broadcom
Original Message:
Sent: 01-27-2021 03:11 AM
From: Velayutham Palaniappan
Subject: Utilizing REST API (perhaps efficiently)
Hello Everyone.
We are currently in Clarity v15.8.1 and we are using REST API to interface with External Applications.
We are allowing Other Applications to update Project, Task and Assignments through OOB REST API.
To Update Assignments for a Project, Assume
1. There are 10 Tasks
2. We need to assign a resource to each of these task
The External Application needs to make 10 API Calls toPOST : /projects/{projectinternalid}/tasks/{taskinternalid}
The Users feel it adds an overhead to the network in this approach. They want to achieve the same with one API call, may be to
POST : /projects/{projectinternalid}/tasks
with the tasks and assignment passed as array of objects.
is it possible OOB? Can some customization be done to achieve the expected result?