Dashboard UI Send To

If a Dashboard Send URI is provided and an OAuth connection is properly established, Canopy Connect will include a row under the Integrations heading on each submission page. This allows users to navigate to that pull and manually submit the information to the integration partner.

If Dashboard Select Types is true, Canopy Connect will also display a dropdown that allow users to select the policies to send over.

Note that if your App is in sandbox mode we will only show the UI for sandbox pulls, and the same for production.

Backend
When the user clicks the send button, Canopy Connect will send the following payload:

{
"team_id": "<TEAM_ID>",
	"pull_id": "<PULL_ID>",
	"policy_ids": array of policy_id only if `Dashboard Select Types is True`
}

For security, we will also send a canopy-signature in the header that you can use to verify the request came from Canopy Connect.

When your system receives this payload, process the pull using the pull ID and the OAuth credentials you have on your system.

You should return one of the following success responses.

CodeResponse
200You may return a success message with an optional redirect URL.
If a SUCCESS message is returned, Canopy Connect will display a success toast.
If a redirect is provided, Canopy Connect will open a new window with the URL.
{
    "status":"SUCCESS"
}
{
    "status":"SUCCESS",
    "redirect":"https://example.com/link-to-pull"
}

If your App is in sandbox mode you can optionally use an http: URL for the redirect value, otherwise the scheme must be https:.

Canopy Connect will treat any other response as a generic error. We will additionally time out requests after 15 seconds and display a generic error.