Search role


Searches for the specified role and returns role information.

This topic includes the following sections:

Request

HTTP method: POST

URL: https://<hostname>:<port>/rsso/config/local/role/search

Header: For header information, such as required authentication token, see Remedy-SSO-administrator-Login-and-Logout-calls.

Request body properties

Property

Type

Required

Description

Values

Default value

 searchText

 Text

Yes

The text passed as the searchText will be matched against roleName and Description for each role and return roles with the specified string in any of those fields and who meet the other search criteria.

Search is case-sensitive.

You can pass a partial search value enclosed in % to search for all roles with roleName or Description having the partial search value in those fields.

Examples:

  • BMC matches the exact string against both field values
  • %BMC% matches the partial string "BMC" against both field values (such as "BMCadmin")

If you do not provide a search value, all roles meeting enabled criteria are returned.

User-provided value

NA

 pageSize

 Integer

Yes

The number of role records to be listed per page

-1 means list all roles

User-provided value

 

 -1

 pageStart

 Integer

Yes

The starting page number for the search results

User-provided value

 0

 pageNumber

 Integer

Yes

The total number of pages the search results should contain

User-provided value

 0

Example request JSON

{
 "searchText" : "",
 "pageSize" : "-1",
 "pageStart" : "0",
 "pageNumber" : "0"
}

Response

If successful, this method returns roles.

Response body properties

Property

Description

code

Status code (see Status codes and messages)

 msg

Status 

 data

 List of roles that match the submitted query

Example response JSON

{
 "code":200,
 "msg":"OK",
 "data":[{"id":0,"roleName":"aRole","description":"aDescription"}]
}

Status codes and messages

For more details about HTTP response codes, see HTTP response codes.

HTTP code

Message (msg)

Description

200

OK

Request succeeded

400

 

 Bad request

Some causes are

  • All of the mandatory fields were not specified
  • The input JSON is not valid

401 

 

Unauthorized 

 

Related topics

Format-of-API-examples

Create-role

Edit-role

Delete-role

Assign-users-to-role

Remove-role-for-users

 

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*