This documentation describes an old release, version 2024.10.10. Documentation for the latest release, 2024.12.2, can be found here.
Class Index: subscriptions_ng.jobs.job_subscriptions_ng.JobConfig¶
InputSection¶
Defines source/destination for data. |
||
type |
object |
|
properties |
||
|
Dbo |
|
The Example: |
||
type |
string |
|
|
Credentials |
|
Credentials name for the specified database |
||
type |
string |
|
examples |
“postgres_credentials” |
|
|
Schema Name |
|
The name of the schema. Example: |
||
type |
string |
|
|
Table Name |
|
The name of the table. Example: |
||
type |
string |
Subscriptions¶
Configuration for tables used by Subscriptions. |
||
type |
object |
|
properties |
||
|
Subscriptions Input |
|
Defines the location of the |
||
allOf |
||
|
Subscription Status Input |
|
Defines the location of the |
||
allOf |
||
|
Update Status |
|
If False, do not update the subuscription_status table when the subscriptions job runs. This is intended for use in testing jobs; the default of True should always be used in production. |
||
type |
boolean |
|
default |
True |
|
|
Current Datetime |
|
If unset, the current time of the job run is used when determining which subscriptions to run and in updating the subscription_status table. If a value is provided, the datetime value provided is used for this purpose instead of the current time. This is intended for use in testing jobs; it should never be set in production. A string value must be in the following format: YYYY-MM-DD[T]HH:MM[:SS[.ffffff]][Z or [±]HH[:]MM]. If an int or a float value are provided, they will be treated as a Unix timestamp (seconds since the Epoch). |
||
type |
string |
|
examples |
2024-01-01 |
|
2023-01-12 11:42:31-05:00 |
||
2023-01-12T11:42:31Z |
||
1726090830 |
||
format |
date-time |
|
|
Perform Export |
|
If True (the default), the associated export job is run and the email is sent with the file as an attachment. If False, the export is not performed and mail is sent without an attachment. This is intended for use in testing jobs; the default value should generally be used in production. |
||
type |
boolean |
|
default |
True |
|
|
Id Regex |
|
Optional regex. Only subscription ids matching the regex will be processed; others will be skipped. This is intended for use in testing jobs and should not be used in production. |
||
type |
string |
Export¶
type |
object |
|
properties |
||
|
Source Url |
|
Base URL of Portal. Does not include dashboard path. |
||
type |
string |
|
examples |
||
|
Source User Id |
|
user_id for source_url |
||
type |
string |
|
default |
||
|
Source Credentials |
|
Credentials for source_url. For Zuar Portal, this is the API_KEY |
||
type |
string |
|
examples |
61zGltB1XIZxiIlMSZuTjSlZuzpb4t6AOMk1OHVgyUU |
|
|
File Path |
|
Path to file, including file name, in which export will be saved. |
||
type |
string |
|
examples |
CEO-dashboard.pdf |
|
/var/mitto/data/portal_exports/CEO-dashboard.pdf |
||
|
Timeout |
|
Maximum time, in seconds, to wait for an export to complete. |
||
type |
integer |
|
default |
120 |
|
|
Job Type |
|
|
||
type |
string |
|
examples |
portal_export |
|
|
Job Config Path |
|
|
||
type |
string |
EmailConfig¶
EmailConfig controls how email and attachments are sent. Certain fields, noted below, undergo template expansion using the dict
from the subscription’s 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 |
|||
Hostname or IP address of a server. Defaults to a local postfix. |
||||
type |
string |
|||
default |
||||
|
Port |
|||
The TCP/IP port to use for SMTP. See comment at |
||||
type |
integer |
|||
default |
25 |
|||
|
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 |
||||
type |
boolean |
|||
default |
False |
|||
|
Credentials |
|||
Credentials name or dict containing |
||||
examples |
‘support_email_account’ |
|||
{‘username’: ‘<username>’, ‘password’: ‘<password>’} |
||||
anyOf |
type |
string |
||
type |
object |
|||
additionalProperties |
type |
string |
||
|
Timeout |
|||
Timeout in seconds for blocking operations. |
||||
type |
integer |
|||
default |
30 |
|||
|
Mail Subject |
|||
The Supports optional |
||||
type |
string |
|||
examples |
Sample report attached |
|||
Report for substrate(s): {substrate_name} |
||||
default |
default_mail_subject |
|||
|
Mail From |
|||
The email address that will appear in the |
||||
type |
string |
|||
examples |
||||
|
Mail To |
|||
Used to optionally override settings contained in a subscription. |
||||
examples |
||||
null |
||||
anyOf |
type |
string |
||
type |
array |
|||
items |
type |
string |
||
|
Mail Cc |
|||
CC recipients. |
||||
anyOf |
type |
string |
||
type |
array |
|||
items |
type |
string |
||
|
Mail Bcc |
|||
BCC recipients. |
||||
anyOf |
type |
string |
||
type |
array |
|||
items |
type |
string |
||
|
Text |
|||
Text template which will be used as the body of the email. Supports optional |
||||
type |
string |
|||
examples |
This mail contains the CEO Report |
|||
Report for these shifts: {shift_description} |
||||
|
Html |
|||
HTML template which will be used as the body of the email. Although
the examples show use of Supports optional |
||||
type |
string |
|||
examples |
<html><head>This mail contains the CEO Report</head></html> |
|||
<html><head>Report for these shifts: {shift_description}</head></html> |
||||
|
Attachments |
|||
List of a) file names located in |
||||
type |
array |
|||
examples |
vehicles.csv |
|||
/tmp/temp_data.txt |
||||
items |
type |
string |
||
additionalProperties |
False |