I have an organization called “test”, in this organization I have some repos, I want to retrieve the numeric ID of a job. For example, this is my job URL: https://github.com/test/repo1/actions/runs/170602/job/3562451
. I want to retrieve the last ID, which is 3562451
.
I have tried this API :
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $token" -H "X-GitHub-Api-Version: 2022-11-28" https://github.com/test/repo1/actions/runs/170602/jobs
but nothing worked for me. I think because I’m not the owner of this repo the owner as I said before is an organization. Does anyone have an idea how to retrieve information of a workflow or a job in an organization?