Globals
Defines the database | variables | secrets | templates | cloud credentialsto be used across an API Interface and its subsequent actions.
global is optional
and not required when building configurations. However we strongly advise in
using globals for better readability throughout your configurations.
Usage
name: login-api
global:
  variables:
    SOME_SECRET: MY_SECRET
  databases:
    main:
      driver: postgres
      conn_string: |
        postgresql://a|env::POSTGRES_USER|:a|env::POSTGRES_PASS|@a|env::POSTGRES_HOST|?connect_timeout=10"
  secrets:
    special:
      kind: vault
      http:
        url: http://127.0.0.1:8200/v1/secret/data/somePath/someSecret
        headers:
          X-Vault-Token: airpipe
        format: json
        accept_invalid_certs: true
  templates:
      RegisterEmail: |
      <!DOCTYPE html>
      <html lang="en">
      <head>
          <meta charset="UTF-8">
          <meta http-equiv="X-UA-Compatible" content="IE=edge">
          <meta name="viewport" content="width=device-width, initial-scale=1.0">
          <title>a|var::company_name| Email Registration Verification</title>
      </head>
      <body>
          <div style="background-color: #f9f9f9; padding: 20px;">
              <div style="max-width: 600px; margin: 0 auto; background-color: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);">
                  <h2 style="text-align: center;">Email Registration Verification with a|var::company_name|</h2>
                  <p>Hi $1,</p>
                  <p>Glad to see you are joining the a|var::company_name|! To complete your account registration, please click the button
                      button below to verify your email address.</p>
                  <p style="text-align: center;">
                      <a href="a|var::app_url|/verify?token=$2" style="display: inline-block; background-color: #007bff; color: #ffffff; text-decoration: none; padding: 10px 20px; border-radius: 5px;">Verify Email</a>
                  </p>
                  <p>If the button above doesn't work, you can also copy and paste the following link into your browser's address
                      bar:</p>
                  <p style="text-align: center;">a|var::app_url|/verify?token=$3</p>
                  <p>If you didn't register a a|var::company_name| account, please ignore this email.</p>
                  <p>Best regards,</p>
                  <p>The a|var::company_name| Team</p>
              </div>
          </div>
      </body>
      </html>
Explore the available options below.