Class - jobs.job_subscriptions.JobSubscriptions

JSON Schema

JobSubscriptions

Configuration for a subscription job.

type

object

properties

  • subscriptions

Subscriptions

Defines input sources for the subscriptions and subscriptions_status tables.

allOf

SubscriptionsSection

  • tableau

Tableau

Default configurations for Tableau exports.

allOf

Tableau

  • mail

Mail

Defines how email is sent.

allOf

EmailConfig

definitions

  • RelativeDates

RelativeDates

Define names used when converting date_range in subscriptions.json_data to a value filter.

A subscription’s json_data column may contain a name/value pair of the form: “date_range”: “YESTERDAY”, which specifies a relative date with which to filter data. By default, this will be converted, e.g., into two Vizql view filters similar to these:

"global_start_datetime": "2020-07-15 00:00:00.000000"
"global_end_datetime": "2020-07-15 23:59:59.999999"
>>> from datetime import datetime
>>> mon = datetime(2020, 9, 14, 12, 23, 49, 456789)
>>> tue = datetime(2020, 9, 15, 12, 23, 49, 987654)
>>> config = {"start_datetime": "begin", "end_datetime": "end"}
>>> rd = RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin':'2020-09-14 12:23:49.456789', 'end':'2020-09-15 12:23:49.987654'}
>>> config["datetime_format"] = "%Y-%m-%d %H:%M:%S.%F"
>>> rd=RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020-09-14 12:23:49.456', 'end': '2020-09-15 12:23:49.987'}
>>> mon = datetime(2020, 9, 14, 12, 23, 49, 0)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020-09-14 12:23:49.000', 'end': '2020-09-15 12:23:49.987'}
>>> config["datetime_format"] = "%Y/%m/%d"
>>> rd=RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020/09/14', 'end': '2020/09/15'}

type

object

properties

  • start_datetime

Start Datetime

View filter name to use when specifying the beginning of a datetime range.

type

string

examples

earliest_datetime

default

global_start_datetime

  • end_datetime

End Datetime

View filter name to use when specifying the end of a datetime range.

type

string

examples

latest_datetime

default

global_end_datetime

  • datetime_format

Datetime Format

Python datetime.strftime() format string to use when formatting start_datetime and end_datetime. The format string supports the non-standard format code of %F, which similar to %f except that it is milliseconds instead of microseconds (three digits instead of six). %F can only be used at the end of datetime_format value.

Reference: https://strftime.org

type

string

examples

%Y-%m-%d

%H:%M:%S

%Y-%m-%d %H:%M:%S.%F

default

%Y-%m-%d %H:%M:%S.%f

  • InputSection

InputSection

Defines source/destination for data.

type

object

properties

  • dbo

Dbo

The dbo specifying the database to use.

Example: "postgresql://localhost/mitto"

type

string

  • credentials

Credentials

Credentials name for the specified database dbo.

type

string

examples

“postgres_credentials”

  • schema_name

Schema Name

The name of the schema.

Example: "public"

type

string

  • table_name

Table Name

The name of the table.

Example: "subscriptions_status"

type

string

  • relative_dates

Relative Dates

Customization of relative dates (date_range in json_data).

default

start_datetime

global_start_datetime

end_datetime

global_end_datetime

datetime_format

%Y-%m-%d %H:%M:%S.%f

allOf

RelativeDates

  • SubscriptionsSection

SubscriptionsSection

Configuration for a subscription job.

type

object

properties

  • subscriptions_input

Subscriptions Input

Defines the location of the subscriptions table. This table is created and managed by the Portal.

allOf

InputSection

  • subscription_status_input

Subscription Status Input

Defines the location of the subscriptions_status table. The table is created and managed by this job.

allOf

InputSection

  • TableauCredentials

TableauCredentials

Tableau server credentials.

The Tableau REST API can accept two types of credentials for authentication:

  • username and password

  • token_name, and personal_access_token

For Tableau servers configured to require MFA, only the token_name, and personal_access_token form of credentials will be accepted.

For Tableaus servers that do not require MFA, either form of credentials will be accepted.

Note: Personal Access Tokens expire if unused for more than 15 days.

type

object

properties

  • username

Username

Tableau username.

type

string

examples

steve

  • password

Password

Tableau password.

type

string

examples

steve-password

  • token_name

Token Name

Tableau Personal Access Token Name

type

string

examples

test_token_name

  • personal_access_token

Personal Access Token

Tableau Personal Access Token Value

type

string

examples

F3QtOEOzRDKW8wGIe1LOmQ==:DlgqULXdhInxWqQMhM5WGjJ05hzRP3nM

additionalProperties

False

  • TableauServer

TableauServer

Tableau server configuration.

type

object

properties

  • server

Server

Tableau server to use.

type

string

examples

https://tableau.zuar.com

  • site

Site

The “site” has been deprecated in favor of “site_id”. "Default" value, provide a empty string value (i.e., a value of "").

type

string

examples

  • site_id

Site Id

Tableau site_id to use. Note: to use the "Default" site_id, provide a empty string value (i.e., a value of "").

type

string

examples

  • user_id_to_impersonate

User Id To Impersonate

Tableau username to impersonate when authenticating. If not provided, no impersonation is performed.

type

string

examples

3908c4ce-b171-46f3-b12b-d8827c162199

additionalProperties

False

  • CSVExport

CSVExport

Complete definition of the Tableau REST CSV export

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

csv

default

csv

additionalProperties

False

  • PDFLayoutOptions

PDFLayoutOptions

Defines all available Tableau REST page layout options.

type

object

properties

  • pageOrientationOption

Pageorientationoption

type

string

examples

landscape

portrait

default

landscape

  • pageSizeOption

Pagesizeoption

type

string

examples

a3

a4

a5

b4

b5

executive

folio

ledger

legal

letter

note

quarto

statement

tabloid

unspecified

default

letter

additionalProperties

False

  • PDFExport

PDFExport

Complete definition of the Tableau REST PDF export.

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

pdf

default

pdf

  • options

Options

default

pageOrientationOption

landscape

pageSizeOption

letter

allOf

PDFLayoutOptions

additionalProperties

False

  • XLSXExport

XLSXExport

Complete definition of the Tableau REST XLSX export

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

xlsx

default

xlsx

additionalProperties

False

  • Tableau

Tableau

Defaults to use for Tableau REST exports.

type

object

properties

  • credentials

Credentials

Tableau server credentials. Credentials may be explicitly included in the job’s configuration as a dict. If the value is a string, it is assumed to be the name of named credentials to use.

anyOf

type

string

TableauCredentials

  • server

Server

Tableau server configuration.

allOf

TableauServer

  • export_csv

Export Csv

Defaults for CSV exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

csv

allOf

CSVExport

  • export_pdf

Export Pdf

Defaults for PDF exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

pdf

options

pageOrientationOption

landscape

pageSizeOption

letter

allOf

PDFExport

  • export_xlsx

Export Xlsx

Defaults for XLSX exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

xlsx

allOf

XLSXExport

  • export

Export

For internal use only.

anyOf

CSVExport

XLSXExport

PDFExport

  • destination_dir

Destination Dir

Directory in which the exported report will be saved.

type

string

default

/tmp/mitto/data

format

directory-path

additionalProperties

False

  • EmailConfig

EmailConfig

EmailConfig controls how email and attachments are sent.

Certain fields, noted below, undergo template expansion using the dict from the subscription’s json_data column. If a string value contains a substring of the form {key}, then {key} is replaced with json_data["key"].

For example, if:

json_data = {..., "substrate_name": ["Fiber"], ...}

and:

mail_subject = "Report for substrate(s): {substrate_name}"

the subject in the outgoing email will be:

Report for substrate(s): Fiber

type

object

properties

  • server

Server

Hostname or IP address of a server. Defaults to a local postfix.

type

string

default

mail

  • port

Port

The TCP/IP port to use for SMTP. See comment at require_tls.

type

integer

default

25

  • require_tls

Require Tls

Use STARTTLS to establish secure transport. Note that this requires use of a non-TLS port to first establish communication. Often, this means that port should be set to 25 or 2525. Do not use the standard SMTP TLS port (e.g., 465).

type

boolean

default

False

  • credentials

Credentials

Credentials name or dict containing username and password.

examples

‘support_email_account’

{‘username’: ‘<username>’, ‘password’: ‘<password>’}

anyOf

type

string

type

object

additionalProperties

type

string

  • timeout

Timeout

Timeout in seconds for blocking operations.

type

integer

default

30

  • mail_subject

Mail Subject

The Subject of the outgoing email.

Supports optional json_data template expansion.

type

string

examples

Sample report attached

Report for substrate(s): {substrate_name}

default

default_mail_subject

  • mail_from

Mail From

The email address that will appear in the From: field of the outgoing email.

type

string

examples

steve@zuar.com

  • mail_to

Mail To

Used to optionally override settings contained in a subscription.

examples

steve@zuar.com

null

anyOf

type

string

type

array

items

type

string

  • mail_cc

Mail Cc

CC recipients.

anyOf

type

string

type

array

items

type

string

  • mail_bcc

Mail Bcc

BCC recipients.

anyOf

type

string

type

array

items

type

string

  • text

Text

Text template which will be used as the body of the email.

Supports optional json_data template expansion.

type

string

examples

This mail contains the CEO Report

Report for these shifts: {shift_description}

  • html

Html

HTML template which will be used as the body of the email. Although the examples show use of <html> tags, plain test, if present, will be treated as HTML.

Supports optional json_data template expansion.

type

string

examples

<html><head>This mail contains the CEO Report</head></html>

<html><head>Report for these shifts: {shift_description}</head></html>

  • attachments

Attachments

List of a) file names located in MITTO_DATA or b) fully-qualified paths to files that will be attched to the email.

type

array

examples

vehicles.csv

/tmp/temp_data.txt

items

type

string

JSON Schema Definitions

#/definitions/RelativeDates

RelativeDates

Define names used when converting date_range in subscriptions.json_data to a value filter.

A subscription’s json_data column may contain a name/value pair of the form: “date_range”: “YESTERDAY”, which specifies a relative date with which to filter data. By default, this will be converted, e.g., into two Vizql view filters similar to these:

"global_start_datetime": "2020-07-15 00:00:00.000000"
"global_end_datetime": "2020-07-15 23:59:59.999999"
>>> from datetime import datetime
>>> mon = datetime(2020, 9, 14, 12, 23, 49, 456789)
>>> tue = datetime(2020, 9, 15, 12, 23, 49, 987654)
>>> config = {"start_datetime": "begin", "end_datetime": "end"}
>>> rd = RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin':'2020-09-14 12:23:49.456789', 'end':'2020-09-15 12:23:49.987654'}
>>> config["datetime_format"] = "%Y-%m-%d %H:%M:%S.%F"
>>> rd=RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020-09-14 12:23:49.456', 'end': '2020-09-15 12:23:49.987'}
>>> mon = datetime(2020, 9, 14, 12, 23, 49, 0)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020-09-14 12:23:49.000', 'end': '2020-09-15 12:23:49.987'}
>>> config["datetime_format"] = "%Y/%m/%d"
>>> rd=RelativeDates(**config)
>>> rd.as_view_filter(mon, tue)
{'begin': '2020/09/14', 'end': '2020/09/15'}

type

object

properties

  • start_datetime

Start Datetime

View filter name to use when specifying the beginning of a datetime range.

type

string

examples

earliest_datetime

default

global_start_datetime

  • end_datetime

End Datetime

View filter name to use when specifying the end of a datetime range.

type

string

examples

latest_datetime

default

global_end_datetime

  • datetime_format

Datetime Format

Python datetime.strftime() format string to use when formatting start_datetime and end_datetime. The format string supports the non-standard format code of %F, which similar to %f except that it is milliseconds instead of microseconds (three digits instead of six). %F can only be used at the end of datetime_format value.

Reference: https://strftime.org

type

string

examples

%Y-%m-%d

%H:%M:%S

%Y-%m-%d %H:%M:%S.%F

default

%Y-%m-%d %H:%M:%S.%f

#/definitions/InputSection

InputSection

Defines source/destination for data.

type

object

properties

  • dbo

Dbo

The dbo specifying the database to use.

Example: "postgresql://localhost/mitto"

type

string

  • credentials

Credentials

Credentials name for the specified database dbo.

type

string

examples

“postgres_credentials”

  • schema_name

Schema Name

The name of the schema.

Example: "public"

type

string

  • table_name

Table Name

The name of the table.

Example: "subscriptions_status"

type

string

  • relative_dates

Relative Dates

Customization of relative dates (date_range in json_data).

default

start_datetime

global_start_datetime

end_datetime

global_end_datetime

datetime_format

%Y-%m-%d %H:%M:%S.%f

allOf

RelativeDates

#/definitions/SubscriptionsSection

SubscriptionsSection

Configuration for a subscription job.

type

object

properties

  • subscriptions_input

Subscriptions Input

Defines the location of the subscriptions table. This table is created and managed by the Portal.

allOf

InputSection

  • subscription_status_input

Subscription Status Input

Defines the location of the subscriptions_status table. The table is created and managed by this job.

allOf

InputSection

#/definitions/TableauCredentials

TableauCredentials

Tableau server credentials.

The Tableau REST API can accept two types of credentials for authentication:

  • username and password

  • token_name, and personal_access_token

For Tableau servers configured to require MFA, only the token_name, and personal_access_token form of credentials will be accepted.

For Tableaus servers that do not require MFA, either form of credentials will be accepted.

Note: Personal Access Tokens expire if unused for more than 15 days.

type

object

properties

  • username

Username

Tableau username.

type

string

examples

steve

  • password

Password

Tableau password.

type

string

examples

steve-password

  • token_name

Token Name

Tableau Personal Access Token Name

type

string

examples

test_token_name

  • personal_access_token

Personal Access Token

Tableau Personal Access Token Value

type

string

examples

F3QtOEOzRDKW8wGIe1LOmQ==:DlgqULXdhInxWqQMhM5WGjJ05hzRP3nM

additionalProperties

False

#/definitions/TableauServer

TableauServer

Tableau server configuration.

type

object

properties

  • server

Server

Tableau server to use.

type

string

examples

https://tableau.zuar.com

  • site

Site

The “site” has been deprecated in favor of “site_id”. "Default" value, provide a empty string value (i.e., a value of "").

type

string

examples

  • site_id

Site Id

Tableau site_id to use. Note: to use the "Default" site_id, provide a empty string value (i.e., a value of "").

type

string

examples

  • user_id_to_impersonate

User Id To Impersonate

Tableau username to impersonate when authenticating. If not provided, no impersonation is performed.

type

string

examples

3908c4ce-b171-46f3-b12b-d8827c162199

additionalProperties

False

#/definitions/CSVExport

CSVExport

Complete definition of the Tableau REST CSV export

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

csv

default

csv

additionalProperties

False

#/definitions/PDFLayoutOptions

PDFLayoutOptions

Defines all available Tableau REST page layout options.

type

object

properties

  • pageOrientationOption

Pageorientationoption

type

string

examples

landscape

portrait

default

landscape

  • pageSizeOption

Pagesizeoption

type

string

examples

a3

a4

a5

b4

b5

executive

folio

ledger

legal

letter

note

quarto

statement

tabloid

unspecified

default

letter

additionalProperties

False

#/definitions/PDFExport

PDFExport

Complete definition of the Tableau REST PDF export.

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

pdf

default

pdf

  • options

Options

default

pageOrientationOption

landscape

pageSizeOption

letter

allOf

PDFLayoutOptions

additionalProperties

False

#/definitions/XLSXExport

XLSXExport

Complete definition of the Tableau REST XLSX export

type

object

properties

  • name

Name

Name that the export will be saved under. Do not include the extension; it will be determined automatically.

type

string

default

tableau-export

  • workbook

Workbook

_content_url of the workbook

type

string

  • view

View

_content_url of the view

type

string

  • view_filters

View Filters

View filters to apply to data.

type

object

examples

State

Louisiana

Texas

Category

Office Supplies

region

LATAM

NA

sub_region

plant_name

global_start_datetime

2020-06-12 00:00:00.000

global_end_datetime

2020-06-12 23:59:59.999

default

  • full

Full

Process all views in workbook, not just the view specified by view.

type

boolean

examples

true

false

null

  • timeout

Timeout

Maximum number of seconds to allow before killing request.

type

integer

default

300

  • retries

Retries

Maximum number of times to retry a failed request.

type

integer

default

5

  • maxage

Maxage

The maximum number of minutes the CSV data will be cached on the server before being refreshed. The value must be an integer between 1 and 240 minutes. 0 will be interpreted as 1 minute on server, as that is the shortest interval allowed.

type

integer

maximum

240

minimum

-1

default

-1

  • type

Type

Type of export being performed.

type

string

examples

xlsx

default

xlsx

additionalProperties

False

#/definitions/Tableau

Tableau

Defaults to use for Tableau REST exports.

type

object

properties

  • credentials

Credentials

Tableau server credentials. Credentials may be explicitly included in the job’s configuration as a dict. If the value is a string, it is assumed to be the name of named credentials to use.

anyOf

type

string

TableauCredentials

  • server

Server

Tableau server configuration.

allOf

TableauServer

  • export_csv

Export Csv

Defaults for CSV exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

csv

allOf

CSVExport

  • export_pdf

Export Pdf

Defaults for PDF exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

pdf

options

pageOrientationOption

landscape

pageSizeOption

letter

allOf

PDFExport

  • export_xlsx

Export Xlsx

Defaults for XLSX exports via REST API.

default

name

tableau-export

workbook

null

view

null

view_filters

full

null

timeout

300

retries

5

maxage

-1

type

xlsx

allOf

XLSXExport

  • export

Export

For internal use only.

anyOf

CSVExport

XLSXExport

PDFExport

  • destination_dir

Destination Dir

Directory in which the exported report will be saved.

type

string

default

/tmp/mitto/data

format

directory-path

additionalProperties

False

#/definitions/EmailConfig

EmailConfig

EmailConfig controls how email and attachments are sent.

Certain fields, noted below, undergo template expansion using the dict from the subscription’s json_data column. If a string value contains a substring of the form {key}, then {key} is replaced with json_data["key"].

For example, if:

json_data = {..., "substrate_name": ["Fiber"], ...}

and:

mail_subject = "Report for substrate(s): {substrate_name}"

the subject in the outgoing email will be:

Report for substrate(s): Fiber

type

object

properties

  • server

Server

Hostname or IP address of a server. Defaults to a local postfix.

type

string

default

mail

  • port

Port

The TCP/IP port to use for SMTP. See comment at require_tls.

type

integer

default

25

  • require_tls

Require Tls

Use STARTTLS to establish secure transport. Note that this requires use of a non-TLS port to first establish communication. Often, this means that port should be set to 25 or 2525. Do not use the standard SMTP TLS port (e.g., 465).

type

boolean

default

False

  • credentials

Credentials

Credentials name or dict containing username and password.

examples

‘support_email_account’

{‘username’: ‘<username>’, ‘password’: ‘<password>’}

anyOf

type

string

type

object

additionalProperties

type

string

  • timeout

Timeout

Timeout in seconds for blocking operations.

type

integer

default

30

  • mail_subject

Mail Subject

The Subject of the outgoing email.

Supports optional json_data template expansion.

type

string

examples

Sample report attached

Report for substrate(s): {substrate_name}

default

default_mail_subject

  • mail_from

Mail From

The email address that will appear in the From: field of the outgoing email.

type

string

examples

steve@zuar.com

  • mail_to

Mail To

Used to optionally override settings contained in a subscription.

examples

steve@zuar.com

null

anyOf

type

string

type

array

items

type

string

  • mail_cc

Mail Cc

CC recipients.

anyOf

type

string

type

array

items

type

string

  • mail_bcc

Mail Bcc

BCC recipients.

anyOf

type

string

type

array

items

type

string

  • text

Text

Text template which will be used as the body of the email.

Supports optional json_data template expansion.

type

string

examples

This mail contains the CEO Report

Report for these shifts: {shift_description}

  • html

Html

HTML template which will be used as the body of the email. Although the examples show use of <html> tags, plain test, if present, will be treated as HTML.

Supports optional json_data template expansion.

type

string

examples

<html><head>This mail contains the CEO Report</head></html>

<html><head>Report for these shifts: {shift_description}</head></html>

  • attachments

Attachments

List of a) file names located in MITTO_DATA or b) fully-qualified paths to files that will be attched to the email.

type

array

examples

vehicles.csv

/tmp/temp_data.txt

items

type

string