From 310d209b67938acdb1cde3cf5622440bf42c5bc4 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Thu, 11 Jan 2018 17:45:35 +0100 Subject: Adds sorting to deployments API Adds sorting to deployments API through the `order_by` and sort `fields`. --- doc/api/deployments.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/api') diff --git a/doc/api/deployments.md b/doc/api/deployments.md index ab9e63e01d3..fd11894ea8f 100644 --- a/doc/api/deployments.md +++ b/doc/api/deployments.md @@ -11,6 +11,8 @@ GET /projects/:id/deployments | Attribute | Type | Required | Description | |-----------|---------|----------|---------------------| | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `order_by`| string | no | Return deployments ordered by `id` or `iid` or `created_at` or `ref` fields. Default is `id` | +| `sort` | string | no | Return deployments sorted in `asc` or `desc` order. Default is `asc` | ```bash curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/deployments" -- cgit v1.2.1