Update Repository (By Repo ID)

Request

PATCH

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

Path parameters

Name

Description

repo_id

Type: string

Example: ``

Query parameters

Name

Description

silent

Type: boolean

Flag for update without any notifications. NOT IMPLEMENTED YET.

Body

application/json
{
  "description": "example",
  "default_branch": "example",
  "visibility": "public",
  "links": [
    {
      "link": "example",
      "type": "social_network"
    }
  ],
  "template_type": "not_a_template"
}

Name

Description

default_branch

Type: string

Example: example

description

Type: string

Example: example

links

Type: Link[]

Example
[
  {
    "link": "example",
    "type": "social_network"
  }
]

template_type

Type: RepoTemplate

Enum: not_a_template, organizational, system

visibility

Type: Repository.Visibility

Enum: public, internal, private

Repository.Visibility

Type: string

Enum: public, internal, private

Link.LinkType

Type: string

Enum: social_network, homepage, email, telegram

Name

Description

link

Type: string

Example: example

type

Type: Link.LinkType

Enum: social_network, homepage, email, telegram

Example
{
  "link": "example",
  "type": "social_network"
}

RepoTemplate

Type: string

Enum: not_a_template, organizational, system

Responses

200 OK

A successful response.

Body

application/json
{
  "id": "example",
  "name": "example",
  "default_branch": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  },
  "slug": "example",
  "template_type": "not_a_template",
  "is_empty": true,
  "description": "example",
  "visibility": "public",
  "logo": {
    "url": "example"
  },
  "clone_url": {
    "https": "example",
    "ssh": "example"
  },
  "web_url": "example",
  "links": [
    {
      "link": "example",
      "type": "social_network"
    }
  ],
  "counters": {
    "forks": "example",
    "pull_requests": "example",
    "issues": "example",
    "tags": "example",
    "branches": "example"
  },
  "last_updated": "2025-01-01T00:00:00Z",
  "language": {
    "name": "example",
    "color": "example"
  },
  "parent": {
    "id": "example",
    "slug": "example",
    "organization": null
  },
  "migration_source": {
    "url": "example",
    "domain": "example"
  }
}

Name

Description

clone_url

Type: CloneURL

Example
{
  "https": "example",
  "ssh": "example"
}

counters

Type: RepositoryCounters

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

default_branch

Type: string

Example: example

description

Type: string

Example: example

id

Type: string

Example: example

is_empty

Type: boolean

language

Type: Language

Example
{
  "name": "example",
  "color": "example"
}

last_updated

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

links

Type: Link[]

Example
[
  {
    "link": "example",
    "type": "social_network"
  }
]

logo

Type: Image

Example
{
  "url": "example"
}

migration_source

Type: MigrationSource

Example
{
  "url": "example",
  "domain": "example"
}

name

Type: string

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

parent

Type: RepositoryEmbedded

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

slug

Type: string

Example: example

template_type

Type: RepoTemplate

Enum: not_a_template, organizational, system

visibility

Type: Repository.Visibility

Enum: public, internal, private

web_url

Type: string

Example: example

OrganizationEmbedded

Name

Description

id

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example"
}

Image

Name

Description

url

Type: string

Example: example

Example
{
  "url": "example"
}

CloneURL

Name

Description

https

Type: string

Example: example

ssh

Type: string

Example: example

Example
{
  "https": "example",
  "ssh": "example"
}

RepositoryCounters

Name

Description

branches

Type: string<uint64>

Example: example

forks

Type: string<uint64>

Example: example

issues

Type: string<uint64>

Example: example

pull_requests

Type: string<uint64>

Example: example

tags

Type: string<uint64>

Example: example

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

Language

Name

Description

color

Type: string

Example: example

name

Type: string

Example: example

Example
{
  "name": "example",
  "color": "example"
}

RepositoryEmbedded

Name

Description

id

Type: string

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

MigrationSource

Name

Description

domain

Type: string

Example: example

url

Type: string

Example: example

Example
{
  "url": "example",
  "domain": "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