Getting an API token from the profile page

To restart a job in debug mode via the API, you need to send a POST request to the job's debug endpoint. This request needs to be authenticated by adding your Travis CI API token to the authorization header. You can find your API token in your Travis CI Profile page for public projects.

You need to visit a URL, such as https://travis-ci.org/profile/packtci. Then you need to copy your API token in the profile page, which looks like this:

Next, you will need to hit the debug endpoint by using a REST client with your API token.

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.