O'Reilly logo

Mastering SaltStack - Second Edition by Joseph Hall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with webhooks

As mentioned previously, it is possible to use webhooks with the Salt API. Webhooks are designed to be commands that can be issued over HTTP/HTTPS in a single call-no getting tokens first. This can be problematic from a number of standpoints.

The first roadblock involves services that make use of tokens or any other authentication scheme that requires multiple web requests to be made to a server. Since webhooks need to be able to work in a single shot, using a Salt API token is out of the question.

As you have seen, the Salt API does allow commands to be issued in a single call as long as all the credentials are passed along. This is okay if the service making the call allows you to define things such as custom headers and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required