2017-03-06 04:24:03 -05:00
# Jobs API
2016-01-05 10:36:14 -05:00
2017-03-06 10:56:05 -05:00
## List project jobs
2016-01-05 10:36:14 -05:00
2017-03-06 04:24:03 -05:00
Get a list of jobs in a project.
2016-01-05 10:36:14 -05:00
```
2017-03-06 04:24:03 -05:00
GET /projects/:id/jobs
2016-01-05 10:36:14 -05:00
```
2016-02-10 09:07:11 -05:00
| Attribute | Type | Required | Description |
2016-01-13 15:19:18 -05:00
|-----------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created` , `pending` , `running` , `failed` , `success` , `canceled` , `skipped` ; showing all jobs if none provided |
2016-01-13 15:19:18 -05:00
```
2017-03-07 14:54:39 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/1/jobs?scope[]=pending& scope[]=running'
2016-01-13 15:19:18 -05:00
```
2016-02-10 08:31:30 -05:00
Example of response
2016-01-05 10:36:14 -05:00
2017-03-06 10:56:05 -05:00
```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,
"created_at": "2015-12-24T15:51:21.802Z",
"artifacts_file": {
"filename": "artifacts.zip",
"size": 1000
},
"finished_at": "2015-12-24T17:54:27.895Z",
"id": 7,
"name": "teaspoon",
"pipeline": {
"id": 6,
"ref": "master",
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"status": "pending"
},
"ref": "master",
"runner": null,
"stage": "test",
"started_at": "2015-12-24T17:54:27.722Z",
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"bio": null,
"created_at": "2015-12-21T13:14:24.077Z",
"id": 1,
"linkedin": "",
"name": "Administrator",
"skype": "",
"state": "active",
"twitter": "",
"username": "root",
"web_url": "http://gitlab.dev/root",
"website_url": ""
}
},
{
"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,
"created_at": "2015-12-24T15:51:21.727Z",
"artifacts_file": null,
"finished_at": "2015-12-24T17:54:24.921Z",
"id": 6,
"name": "spinach:other",
"pipeline": {
"id": 6,
"ref": "master",
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"status": "pending"
},
"ref": "master",
"runner": null,
"stage": "test",
"started_at": "2015-12-24T17:54:24.729Z",
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"bio": null,
"created_at": "2015-12-21T13:14:24.077Z",
"id": 1,
"linkedin": "",
"name": "Administrator",
"skype": "",
"state": "active",
"twitter": "",
"username": "root",
"web_url": "http://gitlab.dev/root",
"website_url": ""
}
}
]
```
## List pipeline jobs
Get a list of jobs for a pipeline.
```
2017-04-21 15:43:55 -04:00
GET /projects/:id/pipelines/:pipeline_id/jobs
2017-03-06 10:56:05 -05:00
```
2017-03-07 14:54:39 -05:00
| Attribute | Type | Required | Description |
|---------------|--------------------------------|----------|----------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-07 14:54:39 -05:00
| `pipeline_id` | integer | yes | The ID of a pipeline |
| `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created` , `pending` , `running` , `failed` , `success` , `canceled` , `skipped` ; showing all jobs if none provided |
2017-03-06 10:56:05 -05:00
```
2017-03-07 14:54:39 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/1/pipelines/6/jobs?scope[]=pending& scope[]=running'
2017-03-06 10:56:05 -05:00
```
Example of response
2016-01-05 10:36:14 -05:00
```json
[
2016-06-10 15:45:06 -04:00
{
"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,
"created_at": "2015-12-24T15:51:21.802Z",
"artifacts_file": {
"filename": "artifacts.zip",
"size": 1000
},
"finished_at": "2015-12-24T17:54:27.895Z",
"id": 7,
"name": "teaspoon",
2016-09-23 19:43:57 -04:00
"pipeline": {
"id": 6,
"ref": "master",
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"status": "pending"
2016-11-15 05:40:36 -05:00
},
2016-06-10 15:45:06 -04:00
"ref": "master",
"runner": null,
"stage": "test",
"started_at": "2015-12-24T17:54:27.722Z",
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"bio": null,
"created_at": "2015-12-21T13:14:24.077Z",
"id": 1,
"linkedin": "",
"name": "Administrator",
"skype": "",
"state": "active",
"twitter": "",
"username": "root",
2016-10-13 07:24:09 -04:00
"web_url": "http://gitlab.dev/root",
2016-06-10 15:45:06 -04:00
"website_url": ""
}
},
{
"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."
2016-01-05 10:36:14 -05:00
},
2016-06-10 15:45:06 -04:00
"coverage": null,
"created_at": "2015-12-24T15:51:21.727Z",
"artifacts_file": null,
"finished_at": "2015-12-24T17:54:24.921Z",
"id": 6,
"name": "spinach:other",
2016-09-23 19:43:57 -04:00
"pipeline": {
"id": 6,
"ref": "master",
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"status": "pending"
2016-11-15 05:40:36 -05:00
},
2016-06-10 15:45:06 -04:00
"ref": "master",
"runner": null,
"stage": "test",
"started_at": "2015-12-24T17:54:24.729Z",
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"bio": null,
"created_at": "2015-12-21T13:14:24.077Z",
"id": 1,
"linkedin": "",
"name": "Administrator",
"skype": "",
"state": "active",
"twitter": "",
"username": "root",
2016-10-13 07:24:09 -04:00
"web_url": "http://gitlab.dev/root",
2016-06-10 15:45:06 -04:00
"website_url": ""
2016-01-05 10:36:14 -05:00
}
2016-06-10 15:45:06 -04:00
}
2016-01-05 10:36:14 -05:00
]
2016-01-12 05:50:14 -05:00
```
2017-03-06 04:24:03 -05:00
## Get a single job
2016-01-05 10:36:14 -05:00
2017-03-06 04:24:03 -05:00
Get a single job of a project
2016-01-05 10:36:14 -05:00
```
2017-03-06 04:24:03 -05:00
GET /projects/:id/jobs/:job_id
2016-01-05 10:36:14 -05:00
```
2016-02-10 09:07:11 -05:00
| Attribute | Type | Required | Description |
2016-02-10 08:31:30 -05:00
|------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-01-13 15:19:18 -05:00
```
2017-03-06 04:24:03 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8"
2016-01-13 15:19:18 -05:00
```
2016-02-10 08:31:30 -05:00
Example of response
2016-01-05 10:36:14 -05:00
```json
{
2016-06-10 15:45:06 -04:00
"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,
"created_at": "2015-12-24T15:51:21.880Z",
"artifacts_file": null,
"finished_at": "2015-12-24T17:54:31.198Z",
"id": 8,
"name": "rubocop",
2016-09-23 19:43:57 -04:00
"pipeline": {
"id": 6,
"ref": "master",
"sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"status": "pending"
2016-11-15 05:40:36 -05:00
},
2016-06-10 15:45:06 -04:00
"ref": "master",
"runner": null,
"stage": "test",
"started_at": "2015-12-24T17:54:30.733Z",
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"bio": null,
"created_at": "2015-12-21T13:14:24.077Z",
"id": 1,
"linkedin": "",
"name": "Administrator",
"skype": "",
"state": "active",
"twitter": "",
"username": "root",
2016-10-13 07:24:09 -04:00
"web_url": "http://gitlab.dev/root",
2016-06-10 15:45:06 -04:00
"website_url": ""
}
2016-01-05 10:36:14 -05:00
}
```
2017-03-06 04:24:03 -05:00
## Get job artifacts
2016-02-08 16:32:36 -05:00
2016-02-22 07:30:22 -05:00
> [Introduced][ce-2893] in GitLab 8.5
2017-03-06 04:24:03 -05:00
Get job artifacts of a project
2016-02-08 16:32:36 -05:00
```
2017-03-06 04:24:03 -05:00
GET /projects/:id/jobs/:job_id/artifacts
2016-02-08 16:32:36 -05:00
```
2016-02-20 07:13:21 -05:00
| Attribute | Type | Required | Description |
|------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-02-08 16:32:36 -05:00
```
2017-03-06 04:24:03 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8/artifacts"
2016-02-08 16:32:36 -05:00
```
2016-02-20 07:13:21 -05:00
Response:
2016-02-08 16:32:36 -05:00
| Status | Description |
|-----------|---------------------------------|
| 200 | Serves the artifacts file |
| 404 | Build not found or no artifacts |
2016-02-22 07:30:22 -05:00
[ce-2893]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2893
2016-07-21 05:34:36 -04:00
## Download the artifacts file
> [Introduced][ce-5347] in GitLab 8.10.
Download the artifacts file from the given reference name and job provided the
2017-03-06 04:24:03 -05:00
job finished successfully.
2016-07-21 05:34:36 -04:00
```
2017-03-06 04:24:03 -05:00
GET /projects/:id/jobs/artifacts/:ref_name/download?job=name
2016-07-21 05:34:36 -04:00
```
Parameters
| Attribute | Type | Required | Description |
|-------------|---------|----------|-------------------------- |
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2016-07-21 05:34:36 -04:00
| `ref_name` | string | yes | The ref from a repository |
| `job` | string | yes | The name of the job |
Example request:
```
2017-03-06 04:24:03 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/master/download?job=test"
2016-07-21 05:34:36 -04:00
```
Example response:
| Status | Description |
|-----------|---------------------------------|
| 200 | Serves the artifacts file |
| 404 | Build not found or no artifacts |
[ce-5347]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347
2016-06-03 13:56:26 -04:00
## Get a trace file
2017-03-06 04:24:03 -05:00
Get a trace of a specific job of a project
2016-06-03 13:56:26 -04:00
```
2017-03-06 04:24:03 -05:00
GET /projects/:id/jobs/:job_id/trace
2016-06-03 13:56:26 -04:00
```
| Attribute | Type | Required | Description |
|------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| id | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| job_id | integer | yes | The ID of a job |
2016-06-03 13:56:26 -04:00
```
2017-03-06 04:24:03 -05:00
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8/trace"
2016-06-03 13:56:26 -04:00
```
Response:
| Status | Description |
|-----------|-----------------------------------|
| 200 | Serves the trace file |
| 404 | Build not found or no trace file |
2017-03-06 04:24:03 -05:00
## Cancel a job
2016-01-05 10:36:14 -05:00
2017-03-06 04:24:03 -05:00
Cancel a single job of a project
2016-01-05 10:36:14 -05:00
```
2017-03-06 04:24:03 -05:00
POST /projects/:id/jobs/:job_id/cancel
2016-01-05 10:36:14 -05:00
```
2016-02-10 09:07:11 -05:00
| Attribute | Type | Required | Description |
2016-02-10 08:31:30 -05:00
|------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-01-13 15:19:18 -05:00
```
2017-03-06 04:24:03 -05:00
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/cancel"
2016-01-13 15:19:18 -05:00
```
2016-01-05 10:36:14 -05:00
2016-02-10 08:31:30 -05:00
Example of response
2016-01-05 10:36:14 -05:00
```json
{
2016-06-10 15:45:06 -04:00
"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,
"created_at": "2016-01-11T10:13:33.506Z",
"artifacts_file": null,
"finished_at": "2016-01-11T10:14:09.526Z",
"id": 69,
"name": "rubocop",
"ref": "master",
"runner": null,
"stage": "test",
"started_at": null,
"status": "canceled",
"tag": false,
"user": null
2016-01-05 10:36:14 -05:00
}
```
2017-03-06 04:24:03 -05:00
## Retry a job
2016-01-05 10:36:14 -05:00
2017-03-06 04:24:03 -05:00
Retry a single job of a project
2016-01-05 10:36:14 -05:00
```
2017-03-06 04:24:03 -05:00
POST /projects/:id/jobs/:job_id/retry
2016-01-05 10:36:14 -05:00
```
2016-02-10 09:07:11 -05:00
| Attribute | Type | Required | Description |
2016-02-10 08:31:30 -05:00
|------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-01-13 15:19:18 -05:00
```
2017-03-06 04:24:03 -05:00
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/retry"
2016-01-13 15:19:18 -05:00
```
2016-01-05 10:36:14 -05:00
2016-02-10 08:31:30 -05:00
Example of response
2016-01-05 10:36:14 -05:00
```json
{
2016-06-10 15:45:06 -04:00
"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,
"created_at": "2016-01-11T10:13:33.506Z",
"artifacts_file": null,
"finished_at": null,
"id": 69,
"name": "rubocop",
"ref": "master",
"runner": null,
"stage": "test",
"started_at": null,
"status": "pending",
"tag": false,
"user": null
2016-01-05 10:36:14 -05:00
}
```
2016-02-04 06:03:47 -05:00
2017-03-06 04:24:03 -05:00
## Erase a job
2016-02-04 06:03:47 -05:00
2017-03-06 04:24:03 -05:00
Erase a single job of a project (remove job artifacts and a job trace)
2016-02-04 06:03:47 -05:00
```
2017-03-06 04:24:03 -05:00
POST /projects/:id/jobs/:job_id/erase
2016-02-04 06:03:47 -05:00
```
Parameters
2016-07-21 05:34:36 -04:00
| Attribute | Type | Required | Description |
2016-02-16 03:30:58 -05:00
|-------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-02-04 06:03:47 -05:00
Example of request
```
2017-03-06 04:24:03 -05:00
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/erase"
2016-02-04 06:03:47 -05:00
```
Example of response
```json
{
2016-06-10 15:45:06 -04:00
"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,
"download_url": null,
"id": 69,
"name": "rubocop",
"ref": "master",
"runner": null,
"stage": "test",
"created_at": "2016-01-11T10:13:33.506Z",
"started_at": "2016-01-11T10:13:33.506Z",
"finished_at": "2016-01-11T10:15:10.506Z",
"status": "failed",
"tag": false,
"user": null
2016-02-04 06:03:47 -05:00
}
```
2016-06-10 11:11:27 -04:00
## Keep artifacts
2016-06-10 15:45:06 -04:00
Prevents artifacts from being deleted when expiration is set.
2016-06-10 11:11:27 -04:00
```
2017-03-06 04:24:03 -05:00
POST /projects/:id/jobs/:job_id/artifacts/keep
2016-06-10 11:11:27 -04:00
```
Parameters
2016-07-21 05:34:36 -04:00
| Attribute | Type | Required | Description |
2016-06-10 11:11:27 -04:00
|-------------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-06-10 11:11:27 -04:00
2016-06-10 15:45:06 -04:00
Example request:
2016-06-10 11:11:27 -04:00
```
2017-03-06 04:24:03 -05:00
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/artifacts/keep"
2016-06-10 11:11:27 -04:00
```
2016-06-10 15:45:06 -04:00
Example response:
2016-06-10 11:11:27 -04:00
```json
{
2016-06-10 15:45:06 -04:00
"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,
"download_url": null,
"id": 69,
"name": "rubocop",
"ref": "master",
"runner": null,
"stage": "test",
"created_at": "2016-01-11T10:13:33.506Z",
"started_at": "2016-01-11T10:13:33.506Z",
"finished_at": "2016-01-11T10:15:10.506Z",
"status": "failed",
"tag": false,
"user": null
2016-06-10 11:11:27 -04:00
}
```
2016-08-16 04:11:32 -04:00
2017-03-06 04:24:03 -05:00
## Play a job
2016-08-16 04:11:32 -04:00
2017-03-06 04:24:03 -05:00
Triggers a manual action to start a job.
2016-08-16 04:11:32 -04:00
```
2017-03-06 04:24:03 -05:00
POST /projects/:id/jobs/:job_id/play
2016-08-16 04:11:32 -04:00
```
2017-03-06 04:24:03 -05:00
| Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------|
2017-04-08 05:21:11 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](README.md#namespaced-path-encoding ) owned by the authenticated user |
2017-03-06 04:24:03 -05:00
| `job_id` | integer | yes | The ID of a job |
2016-08-16 04:11:32 -04:00
```
2017-03-06 04:24:03 -05:00
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/play"
2016-08-16 04:11:32 -04:00
```
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,
"created_at": "2016-01-11T10:13:33.506Z",
"artifacts_file": null,
"finished_at": null,
"id": 69,
"name": "rubocop",
"ref": "master",
"runner": null,
"stage": "test",
"started_at": null,
"status": "started",
"tag": false,
"user": null
}
```