Routes¶
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 setSLACK_CLIENT_ID
andSLACK_CLIENT_SECRET
values, the application will make aPOST
tohttps://slack.com/api/oauth.access
to obtain anaccess_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 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.