Skip to main content
Flexible Top Header

I’m trying to find a way to retrieve the Associated Deployment Role Objects for servers, including the object info that I’m able to see in the GUI (zones, etc). I’m able to use this below to get the roles, but that embedded data doesn’t include the zone/network, and using the returned ID to get the object doesn’t contain that data either. Is there another way? 

{{bam_url}}/api/v2/servers/:id?fields=embed(deploymentRoles)

Not sure how to do this in 9.x.  I checked how the beta 25.1/Integrity X GUI was doing it and it uses (amongst other fields)

/api/v2/servers/<id>/deploymentRoles?fields=_embedded._assignedTo.absoluteName

..but this doesn’t work in 9.5.2 (not sure about 9.6)


Thank you - good to know about the future version! 


Actually, if you do it your way by fetching /api/v2/servers/<id> and embed(deploymentRoles) the embedded role’s _link.up.href will have the zone object to which the deploymentRole is assigned (at least for the DNS deployment role).  You can’t embed _links.up but you could separately fetch that object.  Oddly /api/v2/servers/<id>/deploymentRoles does not return the link to the zone, but /api/v2/servers/<id>?fields=embed(deploymentRoles) does.  There must be some subtle distinction that causes this but I don’t really know why...


Wow thank you! That should get me what I need! 🙌🏻


Reply