Search Oauth App

Search Oauth App

Search Oauth Apps in the context of a tenant.

Request
URI
POST
https://eapi.broadcom.com/vcf/tenant-mgmt/api/v1/tenants/{tenant_id}/principals/search
COPY
Path Parameters
string
tenant_id
Required

ID of the tenant

Query Parameters
integer
page_start
Optional
Constraints: minimum: 1 default: 1

offset of pageStart

integer
page_limit
Optional
Constraints: minimum: 10 maximum: 200 default: 10

number of results to be fetched

Header Parameters
string
Content-Type
Required

Content type accepted by api (application/json).


Request Body
PrincipalSearchRequest of type(s) application/json
Required
{
    "filters": [
        {
            "value": "OAUTH_CLIENT",
            "operator": "EQUALS",
            "key": "TYPE"
        },
        {
            "value": "GENERAL",
            "operator": "EQUALS",
            "key": "CLIENT_TYPE"
        }
    ]
}
array of filters
filters
Optional

List of filters

sorter
Optional

sorter

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns PrincipalSearchResponsePage of type(s) application/json
This response body class contains all of the following: InlinePrincipalSearchResponsePage0 , InlinePrincipalSearchResponsePage1
{
    "next": 1,
    "current": 1,
    "totalResults": 2,
    "results": [
        {
            "principal_name": "general-app-1",
            "client_type": "GENERAL",
            "type": "OAUTH_CLIENT",
            "principal_id": "253937ac-95e7-4e84-8eb8-ba197a55f9a6",
            "roles": [
                {
                    "scope": "UM",
                    "id": "vcf:usage-meter-manager",
                    "name": "Usage Meter Manager",
                    "description": "Usage meter manager",
                    "derived": false
                }
            ]
        }
    ]
}

400

Bad Request

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": "BAD_REQUEST",
    "minor_error_code": "NO_TENANT_ACCESS",
    "message": "Missing Tenant access cd7f7da5-763e-46b5-bfb4-f5bda69752fe for principal 253937ac-95e7-4e84-8eb8-ba197a55f9a6."
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


401

Unauthorized

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": "UNAUTHORIZED",
    "minor_error_code": "UNAUTHORIZED",
    "message": "Authentication failed"
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


403

Forbidden

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": "FORBIDDEN",
    "minor_error_code": "FORBIDDEN",
    "message": "Authorization check failed"
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


404

Not Found

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": "NOT_FOUND",
    "minor_error_code": "NOT_FOUND",
    "message": "Principal 253937ac-95e7-4e84-8eb8-ba197a55f9a6 not found"
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


500

Internal Server Error

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": "INTERNAL_SERVER_ERROR",
    "minor_error_code": "INTERNAL_SERVER_ERROR",
    "message": "Error while searching for principals;"
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/vcf/tenant-mgmt/api/v1/tenants/{tenant_id}/principals/search