diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index b843d64e0003483922db5caec3ae2b241dff8633..c2aca779710ba09d73fc0b85494f16fa38b06b5e 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -17,7 +17,7 @@ GET /projects/:id/pipelines | `yaml_errors`| string | no | If true, returns only yaml error pipelines | | `name`| string | no | The name of user who triggered pipelines | | `username`| string | no | The username of user who triggered pipelines | -| `order_by`| string | no | Return requests ordered by `id`, `status`, `ref`, `username`, `started_at`, `finished_at`, `created_at` or `updated_at` fields. Default is `id` | +| `order_by`| string | no | Return requests ordered by `id`, `status`, `ref`, `sha`, or `user_id` fields. Default is `id` | | `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc` | ``` diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 79eea7e2e2822b922279d14e53a4660678055d62..7d91900212ad144f6a1817c4668790146ff2cb05 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -22,7 +22,7 @@ module API optional :yaml_errors, type: Boolean, desc: 'If true, returns only yaml error pipelines' optional :name, type: String, desc: 'The name of user who triggered pipelines' optional :username, type: String, desc: 'The username of user who triggered pipelines' - optional :order_by, type: String, values: %w[id status ref username started_at finished_at created_at updated_at], default: 'id', + optional :order_by, type: String, values: %w[id status ref sha user_id], default: 'id', desc: 'The order_by which is combined with a sort' optional :sort, type: String, values: %w[asc desc], default: 'desc', desc: 'The sort method which is combined with an order_by'