Skip to main content

Search for users with the REST API

This use case scenario provides the Identity REST API requests for searching for users. These requests apply to both user accounts and API service accounts.

Send the following request to search for users by username:

http --auth-type=veracode_hmac GET "https://api.veracode.com/api/authn/v2/users?user_name={user_name}"

You must specify the full username. The request does not support matching partial usernames.

Send the following request to search for users by email address:

http --auth-type=veracode_hmac GET "https://api.veracode.com/api/authn/v2/users?email_address={email_address},{email_address}"
note

In each email address, you must specify the @ character using URL encoding or the request fails. For example, user%40domain.com. Use a comma-separated list to specify multiple addresses.

Send the following request to search for users using with partial terms:

http --auth-type=veracode_hmac GET "https://api.veracode.com/api/authn/v2/users/search?search_term={search_term}"

You can search for partial strings of the username, first name, last name, or email address. You can combine this call with other search parameters.

Send the following request to search for users by API ID:

http --auth-type=veracode_hmac GET "https://api.veracode.com/api/authn/v2/users/search?api_id={api_id}"

You must specify the exact API ID. You can combine this call with other search parameters.