My Products
Help
ErikW
PARTNER

Including Attributes when getting multiple Projects

by ErikW

Hi,

I'm writing an integration and was wondering if it is possible to include Attributes when getting a list of projects using the /controller/api/v1/project-endpoint. Currently I receive an empty list of Attributes when trying to do this. While using the /controller/api/v1/project/{projectID}-endpoint to retrieve a specific project includes a populated list of Attributes. Is this behavior expected, and if so, can i force the API to return Attributes when getting a range of Projects somehow?

4 REPLIES 4
Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

The attributes field gets returned with the values if you use the "expandAttribute" parameter and set it to true:

/controller/api/v1/project?expandAttribute=true

2022-08-11 11_52_07-Window.png

ErikW
PARTNER

by ErikW

Thank you!

ErikW
PARTNER

by ErikW

Just curious as to why this feature is not documented in the parameterlist seen in swagger? Should i be looking in another place for documentation? 

ErikW_0-1660211826283.png

 

by Magnus Johnsen

For get specific project, the attribute field is always returned if it has any attributes set.

For the get all endpoint it is documented:

2022-08-11 11_58_48-Window.png