Reference Guide
Specifying the attributes to return in a query
response
Use the select request parameter in a collection query to specify the set of attributes to return in a response. If you do not
use this parameter, a query will return the id attribute only.
When you use the select request parameter, you can refer to attributes in a related resource type, as described in the Syntax
section below.
Syntax
As the first parameter on the request URI: ?select=<attr1>,<attr2>,<attr3>...
As a subsequent parameter on the request URI: &select=<attr1>,<attr2>,<attr3>...
where the attributes whose values you want to retrieve are listed in a comma-separated list.
You can use nested notation syntax (<reference_attribute_name>(<attr1?,<attr2>...) ) in a select expression
to return the values of attributes from related resource types. A related resource type is a resource type that is either referred
to explicitly in the definition of the target resource type or embedded in the target resource type.
Considerations
The following considerations apply to using the select parameter:
● If a select request is made for an attribute that is not defined on the resource type, the server returns a 400 Bad
Request error.
● If an attribute has a valid, empty string value, the server returns the value as <attribute>:"".
● Although a response normally contains only the requested attributes, this is not guaranteed. You should therefore be
prepared to ignore unrequested properties.
Retrieving the name and create_time for a local_user
The following request retrieves values for the name and create_time attributes in the local_user resource collection:
Headers
Accept: application/json
Authorization: <auth_cookie>
Request
GET https://1.2.3.4/api/rest/local_user?select=name,role_id
Response
body
[
{
"name": "admin",
"role_id": "1"
},
{
"name": "stadmin",
"role_id": "2"
},
{
"name": "vmadmin",
"role_id": "4"
}
]
Querying a resource 27










