diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-12 14:04:40 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-12 14:04:40 +0000 |
commit | a5512099cec6219261ac821775f0cc02e99bc1a6 (patch) | |
tree | c9d2b8995d86fc76d349201baf1e2ca6e6176af5 /doc/api | |
parent | 01d4995ae6aad70d9d74f5ed5e3983a1f38b5d34 (diff) | |
parent | 08a217cfcfc2e2387c6d4070ed8b0e121f47f50c (diff) | |
download | gitlab-ce-a5512099cec6219261ac821775f0cc02e99bc1a6.tar.gz |
Merge branch 'api-get-tag' into 'master'
API: Ability to retrieve a single tag
* Closes #14330
/cc @dblessing
See merge request !3577
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/tags.md | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/doc/api/tags.md b/doc/api/tags.md index 17d12e9cc62..ac9fac92f4c 100644 --- a/doc/api/tags.md +++ b/doc/api/tags.md @@ -38,6 +38,50 @@ Parameters: ] ``` +## Get a single repository tag + +Get a specific repository tag determined by its name. It returns `200` together +with the tag information if the tag exists. It returns `404` if the tag does not +exist. + +``` +GET /projects/:id/repository/tags/:tag_name +``` + +Parameters: + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | +| `tag_name` | string | yes | The name of the tag | + +```bash +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/tags/v1.0.0 +``` + +Example Response: + +```json +{ + "name": "v5.0.0", + "message": null, + "commit": { + "id": "60a8ff033665e1207714d6670fcd7b65304ec02f", + "message": "v5.0.0\n", + "parent_ids": [ + "f61c062ff8bcbdb00e0a1b3317a91aed6ceee06b" + ], + "authored_date": "2015-02-01T21:56:31.000+01:00", + "author_name": "Arthur Verschaeve", + "author_email": "contact@arthurverschaeve.be", + "committed_date": "2015-02-01T21:56:31.000+01:00", + "committer_name": "Arthur Verschaeve", + "committer_email": "contact@arthurverschaeve.be" + }, + "release": null +} +``` + ## Create a new tag Creates a new tag in the repository that points to the supplied ref. @@ -148,4 +192,4 @@ Parameters: "tag_name": "1.0.0", "description": "Amazing release. Wow" } -```
\ No newline at end of file +``` |