Routes¶
GET: /install¶
-
jackalope.routes.install.install()¶ The installation endpoint as set in the “Redirect URLs” for the Slack application under “OAuth & Permissions”.
A
codeparameter will be provided by Slack to this URL once an installing user has authorized the application for a channel.Using the
codealong with the application’s setSLACK_CLIENT_IDandSLACK_CLIENT_SECRETvalues, the application will make aPOSTtohttps://slack.com/api/oauth.accessto obtain anaccess_tokenand other details for the channel installation.Upon an
okresponse 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_uuidis 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 viajackalope.slack.send_notification().Parameters: jamf_uuid (str) – The generated UUID for the installed Slack channel. Raises: SlackChannelLookupError Raises: JSONNotProvided Returns: HTTP 204 success response.