Skip to content

Commit ec2f078

Browse files
Merge pull request #396 from rubygems/colby/owner-role-api
Add documentation for managing owner roles in V1 API
2 parents 194e2ed + 31802b1 commit ec2f078

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

rubygems-org-api.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ View all owners of a gem. These users can all push to this gem.
375375

376376
### POST - `/api/v1/gems/[GEM NAME]/owners`
377377

378-
Add an owner to a RubyGem you own, giving that user permission to manage it.
378+
Add an owner to a RubyGem you own, giving that user permission to manage it. See [Owner & Maintainer Roles](/managing-owners-using-ui#owner--maintainer-roles) for more details on roles.
379379

380380
$ curl -H 'Authorization:rubygems_b9ce70c306b3a2e248679fbbbd66722d408d3c8c4f00566c' \
381-
-F 'email=josh@technicalpickles.com' \
381+
-F 'email=josh@technicalpickles.com&role=owner' \
382382
https://rubygems.org/api/v1/gems/gemcutter/owners
383383

384384
Owner added successfully.
@@ -393,6 +393,17 @@ Remove a user's permission to manage a RubyGem you own.
393393

394394
Owner removed successfully.
395395

396+
397+
### PATCH - `/api/v1/gems/[GEM NAME]/owners`
398+
399+
Update an existing owner's role for a RubyGem you own. See [Owner & Maintainer Roles](/managing-owners-using-ui/#owner--maintainer-roles) for more details on roles.
400+
401+
$ curl -X PATCH -H 'Authorization:rubygems_b9ce70c306b3a2e248679fbbbd66722d408d3c8c4f00566c' \
402+
-d "email=josh@technicalpickles.com&role=maintainer" \
403+
https://rubygems.org/api/v1/gems/gemcutter/owners
404+
405+
Owner updated successfully.
406+
396407
Profile Methods
397408
-------------
398409

0 commit comments

Comments
 (0)