Endpoints

Skip to section
GET/v1/transports/email-config
PATCH/v1/transports/email-config
DELETE/v1/transports/email-config
POST/v1/transports/email-config/actions/send-test-email
POST/v1/transports/email-config/actions/validate
POST/v1/transports/email-config/actions/verify-connection

Returns the email configuration for a given tenant id (retrieved from JWT).

manage

Facts GET /v1/transports/email-config

Rate limit
Tier 1 (1000 requests per minute)

Responses GET /v1/transports/email-config

200
optional, application/json

Email configuration. If configuration does not exist in database then { isValid false, passwordExists false} is returned.

403
optional, application/json

Must be a tenant admin.

default
optional, application/json

Unexpected error.

GET/v1/transports/email-config

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config" \
 -H "Authorization: Bearer <API-key>"

Response GET /v1/transports/email-config

{
  "status": {
    "statusCode": 0,
    "statusReason": "OK"
  },
  "isValid": true,
  "tenantId": "mcdd-mkw_Ebo0fR2vLl8_YsQYFsYrTdP",
  "username": "john.smith@company.com",
  "serverPort": 587,
  "authFailures": 0,
  "emailAddress": "john.smith@company.com",
  "securityType": "StartTLS",
  "serverAddress": "smtp.company.com",
  "passwordExists": true,
  "modificationTime": "2022-06-30T09:57:40.954Z"
}

Patch the email configuration for a given tenant id (retrieved from JWT).

manage

Facts PATCH /v1/transports/email-config

Rate limit
Tier 2 (100 requests per minute)

Request Body PATCH /v1/transports/email-config

optional, application/json

No description

Responses PATCH /v1/transports/email-config

204
optional
object

Success.

400
optional, application/json

Bad request.

403
optional, application/json

Must be a tenant admin.

default
optional, application/json

Unexpected error.

PATCH/v1/transports/email-config

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config" \
 -X PATCH \
 -H "Authorization: Bearer <API-key>" \
 -H "Content-type: application/json" \
 -d '[{"op":"replace","path":"/username","value":"New name"}]'

Request PATCH /v1/transports/email-config

[
  {
    "op": "replace",
    "path": "/username",
    "value": "New name"
  }
]

Deletes email configuration for a given tenant id (retrieved from JWT).

manage

Facts DELETE /v1/transports/email-config

Rate limit
Tier 2 (100 requests per minute)

Responses DELETE /v1/transports/email-config

204
optional
object

Success.

403
optional, application/json

Must be a tenant admin.

404
optional, application/json

Not found.

default
optional, application/json

Unexpected error.

DELETE/v1/transports/email-config

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config" \
 -X DELETE \
 -H "Authorization: Bearer <API-key>"

Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection.

manage

Facts POST /v1/transports/email-config/actions/send-test-email

Rate limit
Tier 2 (100 requests per minute)

Request Body POST /v1/transports/email-config/actions/send-test-email

optional, application/json

No description

Responses POST /v1/transports/email-config/actions/send-test-email

200
optional, application-json

Attempted send request. Response body indicates success/failure

403
optional, application/json

Must be a tenant admin.

404
optional, application/json

No email config exists for tenant.

default
optional, application/json

Unexpected error.

POST/v1/transports/email-config/actions/send-test-email

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config/actions/send-test-email" \
 -X POST \
 -H "Authorization: Bearer <API-key>" \
 -H "Content-type: application/json" \
 -d '{"body":"string","subject":"string","recipient":"string"}'

Request POST /v1/transports/email-config/actions/send-test-email

{
  "body": "string",
  "subject": "string",
  "recipient": "string"
}

Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists.

manage

Facts POST /v1/transports/email-config/actions/validate

Rate limit
Tier 2 (100 requests per minute)

Responses POST /v1/transports/email-config/actions/validate

200
optional, application/json

Returns boolean isValid for the email config.

default
optional, application/json

Unexpected error.

POST/v1/transports/email-config/actions/validate

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config/actions/validate" \
 -X POST \
 -H "Authorization: Bearer <API-key>"

Response POST /v1/transports/email-config/actions/validate

{
  "isValid": true
}

Verifies connection to email server for tenant provided via JWT

manage

Facts POST /v1/transports/email-config/actions/verify-connection

Rate limit
Tier 2 (100 requests per minute)

Responses POST /v1/transports/email-config/actions/verify-connection

200
optional, application/json

Performed email connection. Response body indicates success/failure

404
optional, application/json

No email config exists for tenant.

default
optional, application/json

Unexpected error.

POST/v1/transports/email-config/actions/verify-connection

curl "https://your-tenant.us.qlikcloud.com/api/v1/transports/email-config/actions/verify-connection" \
 -X POST \
 -H "Authorization: Bearer <API-key>"

Response POST /v1/transports/email-config/actions/verify-connection

{
  "message": "string",
  "success": true,
  "connectionFailed": true,
  "smtpResponseCode": 0
}

DeleteConfigNotFoundError

object

Properties

errors
optional

No description

email

Properties

body
optional
string

email body

subject
optional
string

email subject

recipient
optional
string

email recipient (email address)

emailConfigFieldPatch

object

A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

Properties

op
string

The operation to be performed.

Enum:

replace, remove, add

path
string

The path for the given resource field to patch.

Enum:

/username

/serverAddress

/serverPort

/securityType

/emailAddress

/emailPassword

value
string

The value to be used for this operation.

emailConfigGet

object

Properties

status

Contains statusCode and statusReason

isValid
optional
boolean

Is the configuration valid

tenantId
optional
string

The tenant Id

username
optional
string

user name

serverPort
optional, minimum=1
number

smtp server listening port

authFailures
optional
number

Number of authentication failures

emailAddress
optional
string

used for SMTP authentication

securityType
optional
string

one of none, StartTLS or SSL/TLS

serverAddress
optional
string

domain name or IP address of SMTP server

passwordExists
optional
boolean

Indicates if password is defined for this smtp config. The password itself is not returned!

modificationTime
optional
string

Last modification time. Formatted as a ISO 8601 string.

emailConfigPatch

Array<emailConfigFieldPatch>

Properties

op
string

The operation to be performed.

Enum:

replace, remove, add

path
string

The path for the given resource field to patch.

Enum:

/username

/serverAddress

/serverPort

/securityType

/emailAddress

/emailPassword

value
string

The value to be used for this operation.

ErrorPublic

object

An error object.

Properties

code
string

The error code.

title
string

Summary of the problem.

ErrorsPublic

object

Properties

errors
optional

No description

PatchEmailConfigError

object

Properties

errors
optional

No description

SendTestMailConfigNotFoundError

object

Properties

errors
optional

No description

smtpCheck

object

Properties

isValid
optional
boolean

true if smtp config is correct and complete. Will return false if smtp-config does not exist at all

smtpConfigStatus

object

Contains statusCode and statusReason

Properties

statusCode
optional
number

Status code

statusReason
optional
string

Status reason

smtpResult

object

Properties

message
optional
string

error message from SMTP middleware .. a bit technical but could be useful to administrator

success
optional
boolean

was SMTP operation successful or not. Other fields herein provide more detail

connectionFailed
optional
boolean

could not resolve domain name, connection refused, connection timed out, SSL mismatch

smtpResponseCode
optional
integer

smtp result code string from the SMTP server. eg. "250 2.6.0"

TenantAdminError

object

Properties

errors
optional

No description

VerifyConnectionConfigNotFoundError

object

Properties

errors
optional

No description

v0.509.8
Was this page helpful?