Show Table of Contents
3.4. Retrieving a Specific Resource from a Collection
In these examples a specific resource is retrieved from a collection using the
get method.
Example 3.1. Retrieving a Specific Resource by Name
Retrieving the
Default data center from the datacenters collection using the name parameter of the get method:
dc = api.datacenters.get("Default")
This syntax is equivalent:
dc = api.datacenters.get(name="Default")
Additional information can be retrieved for
get requests using the all_content header.
Example 3.2. Retrieving Additional Information on a Specific Resource
vm = api.vms.get(name="VM01", all_content=True)

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.