Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/jobs.md')
-rw-r--r--doc/api/jobs.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/jobs.md b/doc/api/jobs.md
index ac8b756beac..2a07e2d92c5 100644
--- a/doc/api/jobs.md
+++ b/doc/api/jobs.md
@@ -294,7 +294,7 @@ Example of response
]
```
-In GitLab 13.3 and later, this endpoint [returns data for any pipeline](pipelines.md#single-pipeline-requests)
+In GitLab 13.3 and later, this endpoint [returns data for any pipeline](pipelines.md#get-a-single-pipeline)
including [child pipelines](../ci/pipelines/parent_child_pipelines.md).
In GitLab 13.5 and later, this endpoint does not return retried jobs in the response
@@ -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