Search Clients By Roles

Search Clients By Roles
Search OAuth2 clients by roles

Searches OAuth2 clients based on the assigned roles.Note: If no filters are provided, all client-role assignments in the tenant will be returned.

Request
URI
POST
https://{api_host}/acs/t/{tenant}/broker/oauth2-clients/search
COPY
Path Parameters
string
tenant
Required

The VMware Identity Services tenant ID

tenant example
my-tenant
Query Parameters
integer
start_index
Optional
Constraints: default: 1

The index of the page. Pages start with index 1.

start_index example
1
integer
page_size
Optional
Constraints: default: 20

Number of results per page.

page_size example
50

Request Body

Roles assigned to the OAuth2 clients for filtering. Allowed values for filtering are client_type, client_uuid, description, display_name, roles and role_name. Sorting by can be done by any of the following: client_uuid, client_id, display_name, description, and client_type.

RoleSearchMedia of type(s) application/vnd.vmware.horizon.manager.accesscontrol.roles.search+json
Optional
{
    "filters": {
        "and": [
            {
                "key": "string",
                "values": [
                    "string"
                ],
                "operator": "string"
            }
        ],
        "or": [
            {
                "key": "string",
                "values": [
                    "string"
                ],
                "operator": "string"
            }
        ]
    },
    "_links": {
        "self": {
            "href": "https://example.com/path-to-self"
        }
    },
    "sort_by": "string",
    "sort_order": "string"
}
object
filters
Optional

Defines groups of filters that apply AND and OR logical operations

object
_links
Optional

The resource HATEOAS links. Usually includes a "self" link for this resource

string
sort_by
Optional

Field name by which the result will be sorted, e.g., 'client_id'

string As ^(?i)(ASC|DESC)$
sort_order
Optional

Order in which results will be sorted: 'asc' or 'desc'

Authentication
This operation uses the following authentication methods.
Responses
200

OAuth2 clients successfully found based on roles

Returns BrokerOAuth2ClientRolesList of type(s) application/vnd.vmware.horizon.manager.accesscontrol.broker.oauth2client.list+json
{
    "items": [
        {
            "scope": [
                "admin",
                "openid",
                "profile",
                "email"
            ],
            "_links": {
                "self": {
                    "href": "https://example.com/path-to-self"
                }
            },
            "client_uuid": "d53b5824-78ff-4897-b08a-46c8d23b5d0e",
            "client_id": "oauth_clientid",
            "display_name": "VM Activity Monitor",
            "description": "Service account for nightly sync job",
            "created_date": "string",
            "modified_date": "string",
            "client_type": "API_CLIENT",
            "roles": [
                {
                    "name": "admin",
                    "resources": [
                        "string"
                    ],
                    "_links": {
                        "self": {
                            "href": "https://example.com/path-to-self"
                        }
                    },
                    "display_name": "Administrator",
                    "membership_type": [
                        "DIRECT",
                        "GROUP"
                    ],
                    "group_ids": [
                        "groupId1",
                        "groupId2"
                    ],
                    "sub_roles": [
                        {
                            "type": "nsx",
                            "names": [
                                {
                                    "name": "moderator",
                                    "display_name": "Moderator"
                                }
                            ],
                            "_links": {
                                "self": {
                                    "href": "https://example.com/path-to-self"
                                }
                            }
                        }
                    ],
                    "expires_at": 1700000000000
                }
            ]
        }
    ],
    "totalCount": 0,
    "pageNumber": 0,
    "totalPages": 0,
    "pageSize": 0,
    "_links": {
        "self": {
            "href": "https://example.com/path-to-self"
        }
    }
}

400

Request contains invalid information

Operation doesn't return any data structure

404

The role or tenant was not found.

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/vnd.vmware.horizon.manager.accesscontrol.roles.search+json' -d '{}' https://{api_host}/acs/t/{tenant}/broker/oauth2-clients/search