Skip to content
Snippets Groups Projects

Support Project Avatar removal in REST API

5 files
+ 111
28
Compare changes
  • Side-by-side
  • Inline
Files
5
  • 168fcb6f
    This change set adds support to remove project avatars using the REST
    API, much like it's already possible for the [Topics
    API](https://docs.gitlab.com/ee/api/topics.html#remove-a-topic-avatar).
    
    To support this I've changed the `POST | PUT /projects` endpoint to be
    handled by workhorse. Can someone with more experience and the big
    picture verify this particular part of the change? Is this something
    which makes sense? Is it implemented correctly?
    
    If this is the case and all looks good with the Projects API here, I'll
    also implement similar changes to the other `Avatarable` endpoints, like
    Groups and Users.
    
    Changelog: added
    MR: !92604
+ 13
0
@@ -2243,6 +2243,19 @@ Returned object:
}
```
## Remove a project avatar
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92604) in GitLab 15.2
To remove a project avatar, use a blank value for the `avatar` attribute.
Example request:
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
--data "avatar=" "https://gitlab.example.com/api/v4/projects/5"
```
## Share project with group
Allow to share project with group.
Loading