You can also obtain a job ID by calling the /builds endpoint in the Travis API. You will need to make a GET request and provide a valid access token in order to make the REST call. Here is a sample request using the curl REST client:
curl -s -X GET \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token $(travis token)" \ -d '{ "quiet": true }' \ https://api.travis-ci.org/builds
This will fetch all the builds that are associated with the repository, which could potentially be a big JSON payload. You can use the jq (https://stedolan.github.io/jq/) command line JSON processor to filter out the job ID information. ...