Create a server
POST/tap/api/v3/servers
Creates a server and issues its certificate. When csr is not blank, the CSR is signed and the certificate bundle contains no private key; otherwise a key pair and password are generated. 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. Requires the admin role. When the sendWelcomeEmail setting is on and email integration is enabled, the custodian is sent an 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 server is still created but no email is sent, and POST /tap/api/v3/servers/{serverId}/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 server.
The request body is not a JSON object or a field has the wrong type, awsRoles is not a list of AWS role ids (for example, it contains an AWS role object), the name, custodian email, or custodian name is missing or blank, csr is not a PEM certificate signing request, the CSR signature does not verify against its own public key, awsRoles includes an AWS role id that does not exist, or the server could not be saved.
The caller does not have the admin role.
Email domain validation is on and the email domain is not allowed.
The server could not be created, or the server was created but a later step failed. When the certificate could not be generated, the server exists without a certificate until POST /tap/api/v3/servers/{serverId}/certificate is called. Certificate generation fails, for example, when csr is blank and fullName is longer than 64 characters.