Skip to content

Latest commit

 

History

History
98 lines (54 loc) · 1.92 KB

File metadata and controls

98 lines (54 loc) · 1.92 KB
title Repository Invitations

Repository Invitations

{{#tip}}

We're currently offering a preview of the Repository Invitations API.

To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.swamp-thing-preview+json

{{/tip}}

{:toc}

Use the API endpoint for adding a collaborator here.

GET /repositories/:repo_id/invitations

When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.

Response

<%= headers 200, :pagination => default_pagination_rels %> <%= json(:repository_invitation) { |h| [h] } %>

DELETE /repositories/:repo_id/invitations/:invitation_id

Response

<%= headers 204 %>

PATCH /repositories/:repo_id/invitations/:invitation_id

Input

Name Type Description
permissions string The permissions that the associated user will have on the repository. Valid values are read, write, and admin.

Response

<%= headers 200 %> <%= json(:repository_invitation) %>

GET /user/repository_invitations

When authenticating as a user, this endpoint will list all currently open repository invitations for that user.

Response

<%= headers 200 %> <%= json(:repository_invitation) { |h| [h] } %>

PATCH /user/repository_invitations/:invitation_id

Response

<%= headers 204 %>

DELETE /user/repository_invitations/:invitation_id

Response

<%= headers 204 %>