List Repository Roles (By ID)

Request

GET

https://api.sourcecraft.tech/repos/id:{repo_id}/roles

Path parameters

Name

Description

repo_id

Type: string

Example: ``

Query parameters

Name

Description

page_size

Type: string<uint64>

The maximum number of repo roles to return. The service may return fewer than
this value

Example: ``

page_token

Type: string

A page token, received from a previous call.
Provide this to retrieve the subsequent page.

When paginating, all other parameters must match
the call that provided the page token.

Example: ``

sort_by

Type: string

Ordering options: comma separated list of fields.
Default sorting order is ascending. To specify descending order for a field,
append a "-" prefix; for example: "foo, -bar"
Redundant space characters in the syntax are insignificant. "foo, -bar", " foo , -bar", and "foo,bar"
are all equivalent.
Available fields: name

Example: ``

Responses

200 OK

A successful response.

Body

application/json
{
  "subject_roles": [
    {
      "role": "viewer",
      "subject": {
        "type": "user",
        "id": "example"
      }
    }
  ],
  "next_page_token": "example"
}

Name

Description

next_page_token

Type: string

A token, which can be sent as page_token to retrieve the next page.
If this field is omitted, there are no subsequent pages.

Example: example

subject_roles

Type: SubjectRole[]

Example
[
  {
    "role": "viewer",
    "subject": {
      "type": "user",
      "id": "example"
    }
  }
]

RepoRole

Type: string

Enum: viewer, contributor, developer, maintainer, admin

SubjectType

Type: string

Enum: user, invitee, team

Subject

Name

Description

id

Type: string

Example: example

type

Type: SubjectType

Enum: user, invitee, team

Example
{
  "type": "user",
  "id": "example"
}

SubjectRole

Name

Description

role

Type: RepoRole

Enum: viewer, contributor, developer, maintainer, admin

subject

Type: Subject

Example
{
  "type": "user",
  "id": "example"
}
Example
{
  "role": "viewer",
  "subject": {
    "type": "user",
    "id": "example"
  }
}

default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": {}
}

Name

Description

details

Type: Optional details. Exact structure depends on error_code

[additional]

Type: string

Example: example

Example
{}

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example

Предыдущая