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.md70
1 files changed, 70 insertions, 0 deletions
diff --git a/doc/api/jobs.md b/doc/api/jobs.md
index 18d2e5ec3df..08c6b92c78e 100644
--- a/doc/api/jobs.md
+++ b/doc/api/jobs.md
@@ -380,6 +380,76 @@ Example of response
]
```
+## Get job token's job
+
+Retrieve the job that generated a job token.
+
+```plaintext
+GET /job
+```
+
+Examples
+
+```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>"
+```
+
+Example of response
+
+```json
+{
+ "commit": {
+ "author_email": "admin@example.com",
+ "author_name": "Administrator",
+ "created_at": "2015-12-24T16:51:14.000+01:00",
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
+ "message": "Test the CI integration.",
+ "short_id": "0ff3ae19",
+ "title": "Test the CI integration."
+ },
+ "coverage": null,
+ "allow_failure": false,
+ "created_at": "2015-12-24T15:51:21.880Z",
+ "started_at": "2015-12-24T17:54:30.733Z",
+ "finished_at": "2015-12-24T17:54:31.198Z",
+ "duration": 0.465,
+ "artifacts_expire_at": "2016-01-23T17:54:31.198Z",
+ "id": 8,
+ "name": "rubocop",
+ "pipeline": {
+ "id": 6,
+ "ref": "master",
+ "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
+ "status": "pending"
+ },
+ "ref": "master",
+ "artifacts": [],
+ "runner": null,
+ "stage": "test",
+ "status": "failed",
+ "tag": false,
+ "web_url": "https://example.com/foo/bar/-/jobs/8",
+ "user": {
+ "id": 1,
+ "name": "Administrator",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
+ "web_url": "http://gitlab.dev/root",
+ "created_at": "2015-12-21T13:14:24.077Z",
+ "bio": null,
+ "location": null,
+ "public_email": "",
+ "skype": "",
+ "linkedin": "",
+ "twitter": "",
+ "website_url": "",
+ "organization": ""
+ }
+}
+```
+
## Get a single job
Get a single job of a project