Custom Attributes API
Custom Attributes API
每个对自定义属性的 API 调用都必须经过管理员身份验证.
自定义属性当前可用于用户,组和项目,在本文档中将其称为”资源”.
响应示例:
[ { "key": "location", "value": "Antarctica" }, { "key": "role", "value": "Developer" } ]
在资源上获取单个自定义属性.
{ "key": "location", "value": "Antarctica" }
在资源上设置自定义属性. 如果该属性已经存在,则将对其进行更新;否则,将重新创建该属性.
响应示例:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/42/custom_attributes/location"