How to get a job number from the organisation repository?

hello, i need to build artifact (.jar) with the job number, i was reading travis api V3 documentation, but i still don’t know how to get my github organisation id (i am the owner of this organisation) to get the repository to get the job and its number… i tried curl https://api.travis-ci.org/orgs/ExtraExtremeERA command, as described in API Developer Documentation - Travis CI, but it fails. I also downloaded travis CLI, but there is no “orgs” command or something like it. I also tried command curl https://api.travis-ci.org/repos/xxr-mc but the output was only: []. Do you have any ideas, what the command i need use to get the job info of the repository in my organisation, and how to get organisation id? Thanks.

Hi @ExtraExtremeERA,

Make sure you are trying:

curl -L http://api.travis-ci.org/repos/user_name/repo_name

Alternatively if you have the Travis CLI installed, you can run:

travis show -r user_name/repo_name

This would be the Ruby code to concur:

require 'travis'
repos = Travis::Repository.find_all(owner_name: 'user_name')
repos.each do |repo|
  puts repo.slug
end

You can probably figure out what slug is in this situation, etc. Hope this helps.

Happy building!
Montana Mendy
Travis CI Staff

this did it for me was trying to do figure out 2 days ago! @montana u are a gem to the Travis community