diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-19 15:12:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-19 15:12:08 +0000 |
commit | 59b0e2f45db47110d63bfb0707a435b7186c6aeb (patch) | |
tree | 70d842138acdfead2969c59d0b35c55c05566836 /doc/api/jobs.md | |
parent | 6b19945915303e04fcca21405bca0cd94125199c (diff) | |
download | gitlab-ce-59b0e2f45db47110d63bfb0707a435b7186c6aeb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/jobs.md')
-rw-r--r-- | doc/api/jobs.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/api/jobs.md b/doc/api/jobs.md index ac8b756beac..51a0875cd99 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -400,11 +400,12 @@ Retrieve the job that generated a job token. GET /job ``` -Examples +Examples (must run as part of the [`script`](../ci/yaml/index.md#script) section of a [CI/CD job](../ci/jobs/index.md)): ```shell -curl --header "JOB-TOKEN: <your_job_token>" "https://gitlab.example.com/api/v4/job" -curl "https://gitlab.example.com/api/v4/job?job_token=<your_job_token>" +curl --header "Authorization: Bearer $CI_JOB_TOKEN" "${CI_API_V4_URL}/job" +curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/job" +curl "${CI_API_V4_URL}/job?job_token=$CI_JOB_TOKEN" ``` Example of response |