Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi Hannah,
A Portfolio object holds a collection of its Projects. While I'm not familiar with the specific tech you are using to pull the data, here is an example REST string.
/attask/api/PORT/{ID}?fields=projects
You can test this via your browser while logged in. Just swap out the {ID} with a Portfolio ID: "https://<your instance>/attask/api/PORT/{ID}?fields=projects" - Screenshot attached.
As you mentioned search, this REST call would also return the same data, with no modifiers: /attask/api/PORT/search?ID={ID}&fields=projects
Let me know if you need more information. Thanks!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
I'll use the search syntax for these examples, but you can also use the direct REST calls as well.
Example: /attask/api/PORT/search?ID={ID}&fields=projects:parameterValues
This says, "For the Portfolio with this ID, give me it's collection of projects. On those projects, also return me the parameterValues (custom data field values)" - Screenshot attached.
In my screenshot, I only have one field on the Project custom form. If I had more than one, all would be shown. Let's say there was only one specific field you wanted to return that existed on each project. You can instead ask directly for that field. Since my field is named "Some Example Field" ... /attask/api/PORT/search?ID={ID}&fields=projects:DE:Some%20Example%20Field ... would also work. "DE:" is the identifier for your Custom Data.
It's also possible to "walk" the fields on each object to an extent. You can request nested collections up to 4 layers deep with direct API calls. We restrict anything deeper than four, as it's possible to make some really complex (and non-performant) API calls.
So, /attask/api/PORT/{ID}?fields=projects:category:categoryParameters:parameter is an OK API call, but if we request any further fields, the API will block us. This is why the search method is handy. You can search the object for the data you need, and avoid some of the mid-layer objects.
Thanks!
EDIT: The information David provided is also very relevant and helpful. Thanks David!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies