createuser.do

APIs

The createuser.do call creates a new human user account. You must be logged into a non-human user account to create a human user account with this call. To create a non-human API user account, you must create it in the Veracode Platform.

Before using this API, Veracode strongly recommends that you read API Usage and Access Guidelines.

Resource URL

https://analysiscenter.veracode.com/api/3.0/createuser.do

Permissions

Non-human user accounts require the Admin API role to use this call. Human user accounts require the Administrator role to use this call.

Parameters

Name Type Description
first_name

Required

String  
last_name

Required

String  
email_address

Required

String  
custom_id

Required

String Required for SAML users only. The SAML username.
roles

Required

String (case-sensitive) Comma-delimited list of valid human user roles:
  • Administrator
  • Creator
  • Delete Scans
  • eLearning
  • Executive
  • Greenlight IDE User
  • Mitigation Approver
  • Policy Administrator
  • Reviewer
  • Sandbox Administrator
  • Sandbox User
  • Security Insights
  • Security Lead
  • Submitter
  • Vendor Manager
You cannot pass any of the non-human API user roles. If you specify the 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, DynamicDS, DynamicMP, Discovery, manual, and Dynamic Analysis.

is_saml_user Boolean You can only update this parameter if your account is SAML-enabled.
login_enabled Boolean  
phone String  
requires_token Boolean  
teams String (case-sensitive) Comma-delimited 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. See Using HTTPie with the Python Authentication Library.

http --auth-type=veracode_hmac -o newuserinfo.xml "https://analysiscenter.veracode.com/api/3.0/createuser.do" "first_name==Regina" "last_name==Monarch" "email_address==rmonarch@example.com" "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. See the userinfo.xsd schema documentation.
<?xml version="1.0" encoding="UTF-8"?>

<userinfo xmlns:xsi="http&#x3a;&#x2f;&#x2f;www.w3.org&#x2f;2001&#x2f;XMLSchema-instance" 
      xmlns="https&#x3a;&#x2f;&#x2f;analysiscenter.veracode.com&#x2f;schema&#x2f;userinfo&#x2f;3.0" 
      xsi:schemaLocation="https&#x3a;&#x2f;&#x2f;analysiscenter.veracode.com&#x2f;schema&#x2f;userinfo&#x2f;3.0 
      https&#x3a;&#x2f;&#x2f;analysiscenter.veracode.com&#x2f;resource&#x2f;3.0&#x2f;userinfo.xsd" userinfo_version="3.0" 
      username="rmonarch&#x40;example.com">
   <login_account first_name="Regina" last_name="Monarch" login_account_type="user" email_address="rmonarch&#x40;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 ommitted.

CSV data:

action firstname lastname emailaddress roles teams
createuser Wayne Shorter wayneshorter@example.com Security Lead Release Team
createuser Tony Williams tonywilliams@example.com "Creator,Submitter" Demo Team
createuser Carla Bley carlabley@example.com Security Insights  

CSV file:

action,firstname,lastname,emailaddress,roles,teams
createuser,Wayne,Shorter,wayneshorter@example.com,Security Lead,Release Team
createuser,Tony,Williams,tonywilliams@example.com,"Creator,Submitter",Demo Team
createuser,Carla,Bley,carlabley@example.com,Security Insights

Java example:

java -jar VeracodeJavaAPI.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. See the userinfo.xsd schema documentation.

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="wayneshorter@example.com">
   <login_account first_name="Wayne" last_name="Shorter" login_account_type="user" 
         email_address="wayneshorter@example.com" 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="tonywilliams@example.com">
   <login_account first_name="Tony" last_name="Williams" login_account_type="user" 
         email_address="tonywilliams@example.com" 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="carlabley@example.com">
   <login_account first_name="Carla" last_name="Bley" login_account_type="user" 
         email_address="carlabley@example.com" login_enabled="true" requires_token="false" 
          teams="" roles="Security Insights" />
</userinfo>