The following methods call Veracode REST APIs and return JSON.
Users().get_all()
: get a list of users for the organization.Users().get_self()
: get user information for the current user.Users().get(user_guid)
: get information for an individual user based onuser_guid
.Users().get_by_name(username)
: look up info for an individual user based on their user_name.Users().get_by_search(search_term, api_id, role_id, login_status, saml_user, team_id, detailed, user_type, request_params)
: search for users based on parameters below (all optional):search_term
: stringapi_id
: search by customer api idrole_id
: search by role_id (seeget_roles
)login_status
: search by login status (e.g.active
)saml_user
: search by saml user IDteam_id
: serach by team ID (seeget_teams
)detailed
: returns additional attributes in summary list of usersuser_type
: search by user type (e.g.user
orapi
)request_params
: optionally pass a dictionary of additional query parameters. See Identity API specification
Users().create(email,firstname,lastname,type(opt),username(opt),roles(opt),mfa(opt))
: create a user based on the provided information.type
:HUMAN
orAPI
. Defaults toHUMAN
. IfAPI
specified, must also provideusername
.roles
: list of role names (specified in the Veracode Help Center, for both human and API service account users). Provide the role names fromget_roles()
.mfa
: set toTRUE
to require the user to configure multifactor authentication on first sign in.
Users().update_roles(user_guid, roles)
: update the user identified byuser_guid
with the list of roles passed inroles
. Because the Identity API does not support adding a single role, the list should be the entire list of existing roles for the user plus whatever new roles. See veracode-user-bulk-role-assign for an example.Users().update(user_guid,changes)
: update a user based upon the provided information.user_guid
: the unique identifier of the user to be updated.changes
: the attributes of the user to be changed. Must be JSON whose format follows the Identity API specification of a valid user object.
Users().update_email_address(user_guid,email_address,ignore_verification(opt))
: updates the email address of the specified user.ignore_verification
: Boolean. Defaults toFalse
. IfTrue
, immediately updates email address without requiring the user to verify the change via email. If the user has not yet activated the account, this must be set toTrue
.
Users().reset_password(user_legacy_id)
: sends a password reset email to the specified user. If the user has yet to activate their account, sends a new activation email instead.- NOTE: this function uses the
user_legacy_id
value (as opposed to theuser_guid
value), which can be obtained via a call toget_user()
.
- NOTE: this function uses the
Users().disable(user_guid)
: set theActive
flag the user identified byuser_guid
toFalse
.Users().delete(user_guid)
: delete the user identified byuser_guid
. This is not a reversible action.Roles().get_all()
: get a list of available roles to assign to users.