LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • BDK Overview
  • Planning Guide
  • Setup Guide
  • Development Guide
  • Deployment
  • Learning a BDK Book
  • Connection Commands
  • BDK API Reference
    • Concepts
    • Connections
    • Decorators
      • @book
      • @concept
      • @config
      • @connect
      • @oauth
      • @oauthtoken
      • @procedure
    • Docstrings
    • Enums
      • FilterBinaryOperator
      • FilterUnaryOperator
    • Filter Expressions
    • Noun Phrases
    • Procedures
Powered by GitBook
On this page
  • Overview
  • Syntax
  • Components
  • Passing Arguments
  • Examples
  • 1. Without Connection Arguments
  • 2. Using Connection Arguments

Was this helpful?

Export as PDF

Connection Commands

Learn about writing connection commands for Books built with BDK.

Last updated 1 month ago

Was this helpful?

You must first your Book before connecting it.

Overview

A connection command is written in Kognitos to instantiate a connection to a third-party tool or service from a BDK Book. Whenever a Book implements a using the decorator, a connection command is required in your automation process.

Connection commands are also required when calling a from a BDK Book that requires a connection. Procedures requiring a connection will have connection_required=True in the decorator.

Syntax

Use the following syntax to write a connection command in a Kognitos automation:

connect {book name} via {preposition} {noun phrase}

Components

  • {book name} - The name of your Book, as defined in your decorator.

  • {noun phrase} – The noun_phrase defined in your decorator.

  • {preposition} – Any preposition that aligns with the plurality of the noun phrase. For example:

    • Plural noun phrase: via some API keys

    • Singular noun phrase: via a client credentials method

Passing Arguments

To pass arguments to your connection, add the with keyword at the end of the syntax. List each argument on a separately indented line, using the following format:

connect {book name} via {preposition} {noun phrase} with
  the {argument 1} is "{value 1}"
  the {argument 2} is "{value 2}"
  the {argument 3} is "{value 3}"

Examples

1. Without Connection Arguments

connect grimoire via the magic method

2. Using Connection Arguments

connect photon via some api keys with
  the api key is "1234-5678-ABCD-EFGH"
  the client id is "client-98765"
  the secret key is "s3cr3tK3y!"
  the username is "photon_user"
  the password is "P@ssw0rd!"

In this example, api keys is the noun phrase, and several connection arguments are provided.

learn
connection
@connect
procedure
@procedure
@book
@connect