summaryrefslogtreecommitdiff
path: root/doc/api/custom_attributes.md
diff options
context:
space:
mode:
authorMarkus Koller <markus-koller@gmx.ch>2017-09-18 15:03:24 +0200
committerMarkus Koller <markus.koller.ext@siemens.com>2017-11-06 10:51:46 +0100
commit6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5 (patch)
tree9a28f3a4e52c7e6108a7f0358f813a375eec90a2 /doc/api/custom_attributes.md
parent823a9d351b49a6be8c12cfe06edb4aa6ec08fe95 (diff)
downloadgitlab-ce-6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5.tar.gz
Support custom attributes on projects
Diffstat (limited to 'doc/api/custom_attributes.md')
-rw-r--r--doc/api/custom_attributes.md22
1 files changed, 14 insertions, 8 deletions
diff --git a/doc/api/custom_attributes.md b/doc/api/custom_attributes.md
index 8b26f7093ab..705f1d401cf 100644
--- a/doc/api/custom_attributes.md
+++ b/doc/api/custom_attributes.md
@@ -1,18 +1,21 @@
# Custom Attributes API
Every API call to custom attributes must be authenticated as administrator.
+Custom attributes are currently available on users and projects, which will
+be referred to as "resource" in this documentation.
## List custom attributes
-Get all custom attributes on a user.
+Get all custom attributes on a resource.
```
GET /users/:id/custom_attributes
+GET /projects/:id/custom_attributes
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
-| `id` | integer | yes | The ID of a user |
+| `id` | integer | yes | The ID of a resource |
```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/custom_attributes
@@ -35,15 +38,16 @@ Example response:
## Single custom attribute
-Get a single custom attribute on a user.
+Get a single custom attribute on a resource.
```
GET /users/:id/custom_attributes/:key
+GET /projects/:id/custom_attributes/:key
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
-| `id` | integer | yes | The ID of a user |
+| `id` | integer | yes | The ID of a resource |
| `key` | string | yes | The key of the custom attribute |
```bash
@@ -61,16 +65,17 @@ Example response:
## Set custom attribute
-Set a custom attribute on a user. The attribute will be updated if it already exists,
+Set a custom attribute on a resource. The attribute will be updated if it already exists,
or newly created otherwise.
```
PUT /users/:id/custom_attributes/:key
+PUT /projects/:id/custom_attributes/:key
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
-| `id` | integer | yes | The ID of a user |
+| `id` | integer | yes | The ID of a resource |
| `key` | string | yes | The key of the custom attribute |
| `value` | string | yes | The value of the custom attribute |
@@ -89,15 +94,16 @@ Example response:
## Delete custom attribute
-Delete a custom attribute on a user.
+Delete a custom attribute on a resource.
```
DELETE /users/:id/custom_attributes/:key
+DELETE /projects/:id/custom_attributes/:key
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
-| `id` | integer | yes | The ID of a user |
+| `id` | integer | yes | The ID of a resource |
| `key` | string | yes | The key of the custom attribute |
```bash