Document toolboxDocument toolbox

Forward response to email

Overview

You can send the response of your API request by email. To do it, you must include the destination object in your request and set type to email like this:

"destination": { "type":"email" }

Parameters

With the destination.type set to email, you need to specify some additional parameters to indicate the email address and other settings:

Parameter

Type

Description

Parameter

Type

Description

email.to *required

String

Email address to which send the query results. It must be the address of a user in the domain. 

You can include several email addresses following this format:

"email.to":"user@devo.com, user2@devo.com"

email.subject

String

Specify the subject of the email.

email.maxNum

Integer

Add this parameter to set the maximum number of response emails that can be sent. If you don't add it, set it to 0 or to a negative number, you will get unlimited emails.

retention.size

Long

Maximum retention file size in kilobytes. If you don't add this parameter, the default retention size is 5MB.

retention.time

Long

Maximum retention time in seconds. If you don't add this parameter, the default retention time is 15 mins.

format

String

Indicate the format of the file sent. You can choose zip, gzip or plain. If you don't add this parameter, the default format file is zip.

file.password

String

Add a password for the compressed file. This is only valid for zip format.

email.fileName

String

Filename to be used for files sent via email.

Query using LINQ and forwarding to email

{ "query":"LinQ_query", "from":1541152006.165, "to":1541152066.165, "destination":{ "type":"email", "params":{ "email.to":"user@devo.com", "email.subject":"Api v2 POC", "email.maxNum":50, "retention.time":300000, "format":"gzip", }, }, }

An email will be sent to the provided address, including a zep/gzip/plain file with the query results.

Errors

The following table describes the possible errors you may get with your response:

Error code

Message

Description

Error code

Message

Description

213

QUERY_EMAIL_BAD_SUBJECT

The email subject is not a string or is empty

214

QUERY_EMAIL_BAD_PARAMS_GZIP_PWD

Cannot specify a password if you select the format gzip

215

QUERY_EMAIL_BAD_PARAMS_FORMAT

File compression format must zip or gzip or plain

216

QUERY_EMAIL_NO_PARAMS

You must add at least the email.to parameter

217

QUERY_EMAIL_BAD_EMAIL_TO

Invalid email address

218

QUERY_EMAIL_NO_DOMAIN_EMAIL_TO

The email address is not registered in the domain

219

QUERY_EMAIL_BAD_SIZE_RETENTION

Wrong retention file size

220

QUERY_EMAIL_BAD_TIME_RETENTION

Wrong retention time

221

QUERY_EMAIL_BAD_FORMAT_PWD

Wrong password format

222

QUERY_EMAIL_DISABLED

The email address was disabled. Contact Devo for more details

223

QUERY_EMAIL_CREATE_FILE

The temporal file to be sent cannot be created

228

QUERY_EMAIL_BAD_PARAMS_PLAIN_PWD

Cannot specify a password if you select the format plain

229

QUERY_EMAIL_NO_EMAIL_TO

Email address not found

Â