Users
Learn about creating and managing users via the DNAnexus Platform API.
Users can create their own DNAnexus user accounts by registering via the Platform signup page. For orgs covered by a license that enables account provisioning, org admins can create accounts for other users on behalf of the org.
For more information on a license that enables account provisioning by org admins, contact DNAnexus Sales.
The Platform provides two API methods for interacting with existing users: one for describing existing users, and one for updating your own account details and settings.
Username (Handle) vs. User ID
When a user account is created, the user supplies their desired username (also referred to as handle). To turn this username into a user object ID, the username is transformed to lowercase, and the string user- is prepended to it. The username can be obtained from the user ID with the /user-xxxx/describe method below.
API Method: /user-xxxx/describe
/user-xxxx/describeSpecification
Describes the specified user. The list of projects billed to the user is not the same as the list of projects the user has permissions to. To retrieve the latter, use /system/findProjects.
When /user-xxxx/describe is invoked by any user other than user-xxxx, or by a non full-scope token, only the ID, class, first, middle, last, and handle fields are returned.
Inputs
defaultFieldsboolean (optional) Whether to include the default set of fields in the output (the default fields are described in the "Outputs" section below). The selections are overridden by any fields explicitly named infields.Defaults to
falseiffieldsis supplied,trueotherwise.
fieldsmapping (optional) Include or exclude fields from the output. These selections override the settings indefaultFields.key — the desired output field. See "Outputs" below for valid values.
value boolean — whether to include the field.
The following options are deprecated (and are not respected if fields is present):
appsInstalledboolean (optional, deprecated) Whether to return the list of apps the user has installed. Defaults tofalse.orgsboolean (optional, deprecated) Whether to return the list of all organizations of which the user is a member. Defaults tofalse.pendingTransfersboolean (optional, deprecated) Iftrue, returns a list of project IDs which the user has been invited to be the billing account for. Defaults tofalse.
Outputs
idstring ID of the user in the format "user-xxxx".
The following fields are included by default (but can be disabled using fields or defaultFields):
classstring The value "user".firststring The user's first name.laststring The user's last name.middlestring The user's middle initial or name (may be the empty string).handlestring The user's username (handle).
The rest of the keys are only present if the requesting user is the same as the user being described AND a full scope token is supplied.
The following fields are included by default (but can be disabled using fields or defaultFields):
createdBymapping Contains information on how the account was created.userstring The user who created the account. This is the same asidif the user signed up for an account themselves.orgstring The organization ID on behalf of which the user indicated increatedBy.usercreated this user account.Only present when applicable.
emailstring The user's e-mail address.billTostring The default value ofbillTothat is used for all new projects created by this user.securityLevelstring The user's security level.Must be one of
"high"or"normal".
otpEnabledboolean Whether one time password-based multi-factor authentication is enabled on the user's account.passwordExpiresAttimestamp Time at which the user's password expires.Only present when
securityLevelishigh.
phiFeaturesEnabledboolean Whether the user has protected health information (PHI) features enabled. Projects using PHI are subject to additional restrictions to ensure security and compliance.policiesmapping User preferences. For a description of each policy, see the inputs of/user-xxxx/update. Returns all policies, even those that have not been set (and are at their default value).sshPublicKeystring (nullable) User's public key for use with SSH, ornullif no key has been set via/user-xxxx/update.ssoboolean Whether the user is an SSO (single sign-on) user.Only present when set to
true.
samlIdentityProviderstring The entityID of the SAML 2.0 identity provider used by this user.Only present when
ssoistrue.
pendingBillingInformationmapping (nullable) A mapping containing billing information that goes into effect once the accounts payable contact agrees to and confirms the billing information, ornullif there is no pending billing information.estSpendingLimitLeftnumber (nullable) Estimated number of dollars left before new activities billed to the user are locked down. The valuenullindicates that there is no spending limit imposed on the account. This value may also be negative to indicate that the user has exceeded the spending limit.computeChargesnumber Running total of compute charges (in dollars) for the account.storageChargesnumber Running total of storage charges (in dollars) for the account.storageChargesComputedAttimestamp Effective time at whichstorageChargeswas computed.dataEgressChargesnumber Running total of data egress charges (in dollars) for the account.defaultRegionstring The default region in which newly created projects billed to this user reside (may be overridden at project creation time). For more information about regions, see Regions.permittedRegionsarray of strings The regions in which this user is permitted to create projects. For more information about regions, see Regions.
If billing information has been confirmed for this billing account:
billingInformationmapping The confirmed contact information to which invoices are sent
The following fields are only returned if the corresponding field in fields is set to true and billing information has been confirmed for this account:
pricingModelsByRegionmapping Contains information about the pricing models that are in effect for the user (applied to projects whosebillTois this user). The mapping has one entry for each region in thepermittedRegionsof the user.key — the region (for example,
aws:us-east-1).value mapping — the pricing model applied in this region:
storageRatePerGBMonthnumber Storage rate (in dollars per GB-month) for ordinary (non-archival) storage in this region.computeRatesPerHourmapping Contains compute rates for each instance type the user is permitted to use in this region. For a list of available instance types, see Instance Types.key — the instance type name.
value number — the rate (in dollars per instance-hour).
ipRatesmapping Rate for data leaving DNAnexus from this region to specific destination IP ranges (specified in CIDR notation). If an IP is in more than one specified range, the rate is given by the most specific matching IP range. The mapping includes the predefined key "0.0.0.0/0" with the default rate.key — the IP range (specified in CIDR notation).
value number — the rate (in dollars per GB) leaving DNAnexus to that IP range.
The following field is present only if the user has the phiFeaturesEnabled field set to true:
computeRatesPerHourPHImapping Contains compute rates for each instance type the account is permitted to use in this region. This field applies only to projects that have thecontainsPHIflag set totrue.key — the instance type name.
value number — the rate (in dollars per instance-hour) for this instance type.
The following fields are only returned if the corresponding field in fields is set to true:
appsInstalledmapping Lists installed apps.key — the app name.
value boolean — the value
true.
orgsarray of strings List of IDs of organizations of which the user is a member.pendingTransfersarray of strings List of project IDs which the user has been invited to be the billing account for.
Errors
ResourceNotFound (the specified user does not exist)
InvalidInput (the input is not a hash,
appsInstalled,orgsorpendingTransfers(if provided) is not a boolean)
API Method: /user-xxxx/update
/user-xxxx/updateSpecification
Updates information about the specified user. Only the user themselves has permission to invoke. The user's first, middle, and last names may be visible to other authenticated DNAnexus users.
Inputs
firststring (optional) The user's first name.laststring (optional) The user's last name.middlestring (optional) The user's middle initial or name (may be the empty string).policiesmapping (optional) User preferences to update.emailWhenJobCompletestring (optional) Indicates when email notifications are sent for successful and failed executions. Defaults to"always".Must be one of
"always","failuresOnly", or"never".
sshPublicKeystring (optional, nullable) An SSH public key that is used to authenticate the user for accessing jobs via SSH. If the value isnull, the public key is unset.billTostring (optional) ID of the default entity to which any costs associated with projects and apps created by the user are billed. It must be the ID of the user or an org in which the user is a member withallowBillableActivitiespermission.defaultRegionstring (optional) The default region in which all newly created projects billed to this user reside (may be overridden at project creation time). For more information about regions, see Regions.
Outputs
idstring ID of the updated user.
Errors
ResourceNotFound (the specified user does not exist)
InvalidInput
The input is not a hash
first,last, ormiddle(if provided) is not a stringfirstorlastis an empty stringsshPublicKeyis not either a string ornullthe keys and value of policies are invalid
defaultRegionis not among a user'spermittedRegions
PermissionDenied
A full scope token belonging to the user that is to be updated is required
billTomust be either the ID of the requesting user or the ID of an org in which the requesting user is a member withallowBillableActivitiespermission
Last updated
Was this helpful?