Re: REST API - Retrieve Tag and Cost Info Using Browse Programs

Anonymous
Not applicable

REST API - Retrieve Tag and Cost Info Using Browse Programs

Currently with the 'Browse Programs' call in the REST API, Tag and Cost info does not come back.  Instead you would need to use Browse Programs to retrieve a list of Program Ids and then make individual calls specifying that Id value to retrieve this information.

Is there a way to retrieve a list of all the programs along with Tag and Cost info without making individual calls?

1 REPLY 1
Frederic_Pinch1
Level 2

Re: REST API - Retrieve Tag and Cost Info Using Browse Programs

There is a way! It is a bit convoluted, but here it is:

  1. Get a list of all tagType using :

GET /rest/asset/v1/tagTypes.json

2. Pick one Tag Type in the list which is required and applicable to programs, and get all the Tag Values for that Tag Type using:
GET /rest/asset/v1/tagType/byName.json?name=+[Tag Type Name]

3. For each Tag Value of that Tag Type,  you can now get all the Tag Values for all Tag Types for all Programs:

GET /rest/asset/v1/program/byTag.json?tagType='+[Tag Type Name]+'&tagValue='+[Values]+'&maxReturn=200

And as a bonus, it will include Program costs, costs start date and cost notes!

I hope this helps...

Frederic