diff options
author | James Lopez <james@jameslopez.es> | 2017-07-05 16:50:53 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-07-06 15:27:48 +0200 |
commit | bd9b62114f77e024390c2dc0af4325c76e740a71 (patch) | |
tree | c19d9f4048e41e1681f537a5d7db565f4ef12475 /doc | |
parent | 6ee87aea89ef78e2e98df0e61225950446a822aa (diff) | |
download | gitlab-ce-bd9b62114f77e024390c2dc0af4325c76e740a71.tar.gz |
add API documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/issues.md | 25 | ||||
-rw-r--r-- | doc/api/snippets.md | 24 |
2 files changed, 49 insertions, 0 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md index df5666bb7b6..befcc80de26 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -964,3 +964,28 @@ Example response: ## Comments on issues Comments are done via the [notes](notes.md) resource. + +## Get user agent details + +``` +GET /projects/:id/issues/:issue_iid/user_agent_detail +``` + +| 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 | +| `issue_iid` | integer | yes | The internal ID of a project's issue | + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/user_agent_detail +``` + +Example response: + +```json +{ + "user_agent": "AppleWebKit/537.36", + "ip_address": "127.0.0.1", + "submitted": false, +} +``` diff --git a/doc/api/snippets.md b/doc/api/snippets.md index efaab712367..7be6cb3da2d 100644 --- a/doc/api/snippets.md +++ b/doc/api/snippets.md @@ -234,3 +234,27 @@ Example response: } ] ``` + +## Get user agent details + +``` +GET /snippets/:id/user_agent_detail +``` + +| Attribute | Type | Required | Description | +|-------------|---------|----------|--------------------------------------| +| `id` | Integer | yes | The ID of a snippet | + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets/1/user_agent_detail +``` + +Example response: + +```json +{ + "user_agent": "AppleWebKit/537.36", + "ip_address": "127.0.0.1", + "submitted": false, +} +``` |