diff options
author | Valery Sizov <valery@gitlab.com> | 2015-03-03 11:31:35 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-03-03 11:31:35 +0000 |
commit | eb24743b70b1ae57002d8c40aadb87c10e7a8993 (patch) | |
tree | 9c68ec99edbaa2afeab1a0b8afdd9b5e7472e2fc /doc/api | |
parent | 6c264f4fc4ab5cdb43855421bea51af98333935f (diff) | |
parent | 122befc180769809d5f093a052b118a1d75cdd6a (diff) | |
download | gitlab-ci-eb24743b70b1ae57002d8c40aadb87c10e7a8993.tar.gz |
Merge branch 'feature_project_jobs_rest_api-1' into 'master'
Implemented api for project jobs with working tests and updated doc
The rest API allows you to manipulate a project on gitlab-ci but there is no way to manipulate build jobs through the api.
I tested it, implemented truly working tests & updated documentation
http://feedback.gitlab.com/forums/176466-general/suggestions/7068630-expose-the-job-api-to-the-rest-api
See merge request !39
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/projects.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md index 61514b8..dae4591 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -150,3 +150,43 @@ Parameters: * `id` (required) - The ID of the Gitlab CI project * `runner_id` (required) - The ID of the Gitlab CI runner +### List All Jobs for a Project + +List the jobs associated to a Gitlab CI Project (only via +authorized user). + + GET /projects/:id/jobs + +Parameters: + + * `id` (required) - The ID of the Gitlab CI project + +### Add a Job to a Project + +Adds a Job to a Gitlab CI Project (only via +authorized user). + + POST /projects/:id/jobs + +Parameters: + + * `id` (required) - The ID of the Gitlab CI project + * `name` (required) - The name of the Job to add + * `commands` (required) - The script commands of the job + * `active` (optional) - The command is active of not + * `build_branches` (optional) - Trigger commit builds + * `build_tags` (optional) - Trigger tag builds + * `tags` (optional) - The tags associated with this job + +### Remove a Job from a Project + +Removes a Job from a Gitlab CI Project (only +via authorized user). + + DELETE /projects/:id/jobs/:job_id + +Parameters: + + * `id` (required) - The ID of the Gitlab CI project + * `job_id` (required) - The ID of the Job + |