createuser.do (Deprecated)
The createuser.do
call creates a new user account. You must be logged into an API service account to create a user account with this call. To create an API service account, you must use the Veracode Platform or the Identity REST API.
Before using this API, Veracode strongly recommends that you read API usage and access guidelines. Ensure you access the APIs with the domain for your region.
REST API equivalent
The REST API equivalent of this call is a POST
to /api/authn/v2/users
using the Identity API. Veracode strongly recommends that you use the REST API for this action. For new integrations, always use the REST APIs.
Resource URL
https://analysiscenter.veracode.com/api/3.0/createuser.do
Permissions
An API service account requires the Admin API role to use this call. A user account requires the Administrator role to use this call.
Parameters
Name | Type | Description |
---|---|---|
first_name Required | String | First name of the user. |
last_name Required | String | Last name of the user. |
email_address Required | String | Email address of the user. |
custom_id Required | String | Required for SAML users only. The SAML Subject field value from the user account. |
roles Required | String (case-sensitive) | Comma-separated list of valid, user account roles:
Creator , Security Lead , or Submitter role, Veracode automatically applies the Any Scan permission to the scans. You can apply scan permissions to these types of scans: Static Analysis, Dynamic Analysis, Discovery, manual, and Dynamic Analysis. |
is_saml_user | Boolean | You can only update this parameter if your account is SAML-enabled. |
login_enabled | Boolean | Specifies whether the user can log in to the account. |
phone | String | Contact phone number for the user. |
requires_token | Boolean | Specifies whether a user must provide a two-factor authentication token. |
teams | String (case-sensitive) | Comma-separated list of team names. For a user with team membership restrictions, ensure all specified teams are on the Team Memberships list for that user. |
title | String | User title or position. |
HTTPie example
Examples use the HTTPie command-line tool.
http --auth-type=veracode_hmac -o newuserinfo.xml "https://analysiscenter.veracode.com/api/3.0/createuser.do" "first_name==Regina" "last_name==Monarch" "[email protected]" "teams==Demo Team" "roles==Creator,Submitter,eLearning"
HTTPie results
The createuser.do
call returns the userinfo
XML document, which references the userinfo.xsd
schema file. You can use the XSD schema file to validate the XML data.
<?xml version="1.0" encoding="UTF-8"?>
<userinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://analysiscenter.veracode.com/schema/userinfo/3.0"
xsi:schemaLocation="https://analysiscenter.veracode.com/schema/userinfo/3.0
https://analysiscenter.veracode.com/resource/3.0/userinfo.xsd" userinfo_version="3.0"
username="rmonarch@example.com">
<login_account first_name="Regina" last_name="Monarch" login_account_type="user" email_address="rmonarch@example.com"
login_enabled="true" requires_token="false" teams="Demo Team" roles="Creator,eLearning,Submitter,Any Scan"
is_elearning_manager="false" elearning_manager="No Manager" elearning_track="No Track Assigned"
elearning_curriculum="No Curriculum Assigned" keep_elearning_active="false"/>
</userinfo>
API wrapper examples: Create multiple users
Using the inputfilepath
parameter of the Java or C# API wrapper and a CSV file, you can make multiple calls to createuser.do
.
The first column of the CSV contains the action (createuser
) and each subsequent column represents a parameter. The first row of the CSV file contains the included parameter names. There must be a column for each required parameter. Columns for optional parameters may be omitted.
CSV data:
action | firstname | lastname | emailaddress | roles | teams |
---|---|---|---|---|---|
createuser | Wayne | Shorter | [email protected] | Security Lead | Release Team |
createuser | Tony | Williams | [email protected] | "Creator,Submitter" | Demo Team |
createuser | Carla | Bley | [email protected] | Security Insights |
CSV file:
action,firstname,lastname,emailaddress,roles,teams
createuser,Wayne,Shorter,[email protected],Security Lead,Release Team
createuser,Tony,Williams,[email protected],"Creator,Submitter",Demo Team
createuser,Carla,Bley,[email protected],Security Insights
Java example:
java -jar vosp-api-wrapper-java{version}.jar -vid <Veracode API ID> -vkey <Veracode API Key> -action createuser -inputfilepath c:\javawrappers\newusers.csv
C# example:
VeracodeC#API -vid <Veracode API ID> -vkey <Veracode API key> -action createuser -inputfilepath c:\csharpwrappers\newusers.csv
API wrapper results
The createuser.do
call returns the userinfo
XML document, which references the userinfo.xsd
schema file. You can use the XSD schema file to validate the XML data.
The API wrapper returns three XML documents:
<?xml version="1.0" encoding="utf-8"?>
<userinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://analysiscenter.veracode.com/schema/userinfo/3.0"
xsi:schemaLocation="https://analysiscenter.veracode.com/schema/userinfo/3.0
https://analysiscenter.veracode.com/resource/3.0/userinfo.xsd" userinfo_version="3.0"
username="[email protected]">
<login_account first_name="Wayne" last_name="Shorter" login_account_type="user"
email_address="[email protected]" login_enabled="true" requires_token="false"
teams="Release Team" roles="Security Lead,Any Scan" />
</userinfo>
<?xml version="1.0" encoding="utf-8"?>
<userinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://analysiscenter.veracode.com/schema/userinfo/3.0"
xsi:schemaLocation="https://analysiscenter.veracode.com/schema/userinfo/3.0
https://analysiscenter.veracode.com/resource/3.0/userinfo.xsd" userinfo_version="3.0"
username="[email protected]">
<login_account first_name="Tony" last_name="Williams" login_account_type="user"
email_address="[email protected]" login_enabled="true" requires_token="false"
teams="Demo Team" roles="Creator,Submitter,Any Scan" />
</userinfo>
<?xml version="1.0" encoding="utf-8"?>
<userinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://analysiscenter.veracode.com/schema/userinfo/3.0"
xsi:schemaLocation="https://analysiscenter.veracode.com/schema/userinfo/3.0
https://analysiscenter.veracode.com/resource/3.0/userinfo.xsd" userinfo_version="3.0"
username="[email protected]">
<login_account first_name="Carla" last_name="Bley" login_account_type="user"
email_address="[email protected]" login_enabled="true" requires_token="false"
teams="" roles="Security Insights" />
</userinfo>