diff options
Diffstat (limited to 'doc/api/jobs.md')
-rw-r--r-- | doc/api/jobs.md | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/api/jobs.md b/doc/api/jobs.md index 18d2e5ec3df..981aec07bdb 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -61,6 +61,7 @@ Example of response "name": "teaspoon", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending" @@ -114,6 +115,7 @@ Example of response "name": "rspec:other", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending" @@ -193,6 +195,7 @@ Example of response "name": "rspec:other", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending" @@ -256,6 +259,7 @@ Example of response "name": "teaspoon", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending" @@ -338,6 +342,7 @@ Example of response "name": "teaspoon", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending", @@ -380,6 +385,77 @@ 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, + "project_id": 1, + "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 @@ -424,6 +500,7 @@ Example of response "name": "rubocop", "pipeline": { "id": 6, + "project_id": 1, "ref": "master", "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", "status": "pending" |