Remove Repository Roles (By ID)

Request

POST

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

Path parameters

Name

Description

repo_id

Type: string

Example: ``

Body

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

Name

Description

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"
  }
}

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"
    }
  }
]

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

Предыдущая
Следующая