listRoles

 

The "listRoles" action lists all the roles that the account is authorized to see. Includes roleName and roleDescription.

 

Request examples

Minimal

{
  "action": "listRoles",
  "params": 
  {
    "partialNames": [ "ro" ],
    "includeAccountRoles": true
  } 
}
 
 

 

Response examples

Minimal

{
  "authToken": "",
  "result": {
    "roles": [
      {
        "roleName": "role1"
      }
    ]
  },
  "requestId": "",
  "errorCode": 0,
  "errorMessage": ""
}
 
 

 

Properties

Request properties ("params")

Property Description Default Type Limits (inclusive)

includeAccountRoles

The "includeAccountRoles" property causes the response to include account roles when true.  false Boolean

true

false

partialNames

The "partialNames" property filters the results by roles that match the specified partial role names. The match starts at the name's beginning, making it a "starts with" match instead of a "substring" match. If the property is empty, null, or omitted, it returns all the roles.

Optional with default of [] array of strings 1 to 30 bytes

 

Response properties ("result")

Property Description Type Limits (inclusive)

roles

The "roles" property lists all the roles that match the filters set in the request.  array of objects 0 or more objects containing a "roleName".

roles

.roleName

The "roleName" property specifies the name of a role.  string 1 to 30 bytes