Create a user (v2)
POST/tap/api/v2/users
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Deprecated; use POST /tap/api/v3/users. Differs from v3 only in awsRoles: the request accepts AWS role objects, of which only id is read, as well as AWS role ids, and the response lists AWS role objects. Creates a user, issues the user's certificate, and builds the certificate bundle. Requires the admin role. userRole defaults to user when omitted or null. Each AWS role id in awsRoles must belong to an existing AWS role; the default AWS roles are assigned when awsRoles is omitted or empty. When the sendWelcomeEmail setting is on and email integration is enabled, the user is sent a welcome email; it includes a download link valid for 12 hours by default when the showBundleLinks setting is on, and attaches the bundle when the sendWelcomeEmailWithAttachment setting is on. If the download link cannot be generated, the user is still created but no email is sent, and POST /tap/api/v3/users/{userId}/resend can send it later. bundlePath in the response is the stored location of the certificate bundle, not a download link.
Request
Responses
- 200
- 400
- 403
- 422
- 500
The created user.
The request body is not a JSON object or a field has the wrong type, awsRoles is not a list of AWS roles or AWS role ids, the full name or email is missing or blank, the user role is blank, awsRoles includes an AWS role id that does not exist, the email is already used by another user (compared without regard to case), the user role is not exactly user, admin, or super_admin, or the user could not be saved.
The caller does not have the admin role, the new user is active and the account user limit was reached (checked before the other fields are validated), or the caller tried to create a super_admin without being one.
Email domain validation is on and the email domain is not allowed.
The user could not be created, or the user was created but a later step failed. When the certificate could not be generated, the user exists without a certificate until POST /tap/api/v3/users/{userId}/certificate is called. Certificate generation fails, for example, when the certificate common name is longer than 64 characters.