Protocol
Goals
The Poozle Protocol describes a series of standard components and all the interactions between them in order to declare an integration. A compiled JS function is called to talk to all these integrations.
This document describes the protocol as it exists in its CURRENT form. Stay tuned for an RFC on how the protocol will evolve.
This document is intended to contain ALL the rules of the Poozle Protocol in one place. Anything not contained in this document is NOT part of the Protocol.
Key Concepts
There are 3 major components in Poozle Protocol are: Integration, Model and Path.
The key primitives that the Protocol uses to describe data are Model and Path:
- Integration - Has multiple models
- Model - A Model refers to a specifc schema and paths connected.
- Path - A Path refers to how when called with different methods and path regex should it interact with the SAAS tool.
Each of these concepts is described in greater depth in their respective section.
Integration Interface
This section describes important details about the interface over integration.
The following part of the interface is identical across all integrations:
These methods are described in their respective sections (spec, check, authHeaders).
Spec
The spec
function allows an integration to broadcast information about itself and how it can be configured.
Input:
- none.
Output:
spec
- a Specification.
Check
The check
function validates that, given a configuration, that the Integration is able to connect and access all resources that it needs in order to operate.
Input:
config
- A configuration JSON object
Output:
checkResponseStatus
- an CheckResponse.
Auth Headers
The authHeaders
function return all the headers needed to talk to the SAAS tool.
Input:
config
- A configuration JSON object
Output:
headers
- a AuthHeaderResponse.
Model
The models
function return all the models that the integration supports.
Input:
- none.
Output:
Model[]
- a Model.
Model Interface
This section describes important details about the interface over model.
The following part of the interface is identical across all Models:
These methods are described in their respective sections (paths).
Path Interface
This section describes important details about the interface over path.
The following part of the interface is identical across all Paths:
These methods are described in their respective sections (run).
Specification
The specification allows the Integration to share information about itself.
The specification
is a JSON that describes what information needs to the integration for it operate.
The specification also contains information about what features the Integration supports.
supportedSortBy
- describes using what you can sort the models.supportedFilters
- describes which filters an integration is able to support.
Run
This is the function which majorly needs to be written from scratch. This gets all the needed information from Method, Final headers, Params which includes the path parameters and query parameters.
Sample run function
CheckResponse
This json reports whether an Integration was able to connect to its underlying SAAS tool with all the permissions it needs to succeed.
AuthHeaderResponse
The return json has all the headers that are needed to talk to SAAS tool.