Get repository permissions for a user
const url = 'https://gitea.com/api/v1/repos/example/example/collaborators/example/permission';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.com/api/v1/repos/example/example/collaborators/example/permission \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Username of the collaborator whose permissions are to be obtained
Responses
Section titled “Responses”RepoCollaboratorPermission
RepoCollaboratorPermission to get repository permission for a collaborator
object
Permission level of the collaborator
RoleName is the name of the permission role
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private
The user’s website
Example
{ "permission": "none", "user": { "visibility": "public" }}APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APINotFound is a not found empty response