Routes

GET: /

jackalope.routes.install.root()

Renders the “Add to Slack” page.

GET: /install

jackalope.routes.install.install()

The installation endpoint as set in the “Redirect URLs” for the Slack application under “OAuth & Permissions”.

A code parameter will be provided by Slack to this URL once an installing user has authorized the application for a channel.

Using the code along with the application’s set SLACK_CLIENT_ID and SLACK_CLIENT_SECRET values, the application will make a POST to https://slack.com/api/oauth.access to obtain an access_token and other details for the channel installation.

Upon an ok response to the request, the details will be saved to the database, a UUID will be generated for receiving Jamf Pro webhooks, and a success message displayed in the Slack channel.

If the Slack channel already exists in the database its details will be updated with those from the response.

POST: /jamf/<uuid>

jackalope.routes.jamfpro.jamf_webhook(jamf_uuid)

The receiver endpoint where jamf_uuid is the auto-generated UUID for and installed Slack channel.

Inbound webhooks must be in JSON format or a 400 error will be returned.

If a supported webhook event has been received it will be formatted into a Slack message via jackalope.routes.jamfpro.webhooks.webhook_notification() and sent via jackalope.slack.send_notification().

Parameters:jamf_uuid (str) – The generated UUID for the installed Slack channel.
Raises:SlackChannelLookupError
Raises:JSONNotProvided
Returns:HTTP 204 success response.