Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b8ad7dee
Commit
b8ad7dee
authored
Oct 14, 2021
by
Allison Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes base on Tech Writer review
- Switch to showing shell script example rather than yaml file example
parent
da9c64a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
doc/api/jobs.md
doc/api/jobs.md
+5
-6
No files found.
doc/api/jobs.md
View file @
b8ad7dee
...
@@ -400,13 +400,12 @@ Retrieve the job that generated a job token.
...
@@ -400,13 +400,12 @@ Retrieve the job that generated a job token.
GET /job
GET /job
```
```
Examples (
within GitLab CI YAML)
Examples (
must run as part of the
[
`script`
](
../ci/yaml/index.md#script
)
section of a
[
CI/CD job
](
../ci/jobs/index.md
)
):
```
yaml
```
shell
script
:
curl
--header
"Authorization: Bearer
$CI_JOB_TOKEN
"
"
${
CI_API_V4_URL
}
/job"
-
'
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
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
"${CI_API_V4_URL}/job"'
curl
"
${
CI_API_V4_URL
}
/job?job_token=
$CI_JOB_TOKEN
"
-
'
curl
"${CI_API_V4_URL}/job?job_token=$CI_JOB_TOKEN"'
```
```
Example of response
Example of response
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment