How To Deploy a New Integration via API

Before You Start

Before you start, make sure you've done the following:

Step By Step Guide

Step 1: Post New Templates

There will be at least one (likely more than one) integration flow Template that were built as part of your integration. For each one, post to /templates to register them with Doohickey Cloud Services.

{
    "name": "Template Name",
    "description": "This flow template does X and Y.",
    "type": "oih"
}

Keep track of the GUIDs created as each template is saved. Repeat this step for each template.

Step 2: Post New Connection

A Connection record will define how to "connect" to the external system to which the integration is built. This will power the end user experience for entering credentials, providing Oauth authorization, etc. Post a connection to /connections to register a connection that will be used with this integration.

{
    "name": "My Integration Connection",
    "client": "<client id>",
    "scope": "first_scope,second_scope",
    "secretName": "access-token",
    "successUrl": "https://www.yourapp.com/success?hmac=4444&id=1111#page1",
    "environment": {
        "id": "<environment id>",
        "user": "admin"
    }
}

The above example shows an Oauth connection that will leverage the Open Integration Hub Secret Service deployed to a specific Open Integration Hub environment as the underlying credential store. Review how to use the Secret Service for more details.

Keep track of the GUID created when the Connection is saved.

Step 3: Post a New Integration Definition

The Integration Definition is what ties all of the pieces together--the set of flow templates and the Connection that defines how they authenticate with that external system. The integration also stores the metadata used to represent the integration to an end user within your application, in an integration marketplace, or through other means.

Post a new integration definition to /definitions.

{
    "name": "My New Integration",
    "description": "This is an integration with a set of data flows.",
    "state": "DRAFT",
    "data": {},
    "connectionTypes": ["<connection id>","<optional other connection id>"],
    "templates": ["<template 1 id>", "<template 1 id>", "<template n id>"]
}

See Also

This article describes how to deploy a new integration to Doohickey Cloud Services using API calls. Be sure to reference how to do so using the Doohickey CLI and by integrating Doohickey into your CI/CD process.