Skip to main content
PATCH
/
{org}
/
{repo}
Update repository
curl --request PATCH \
  --url https://api.mesa.dev/v1/{org}/{repo} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "default_bookmark": "<string>",
  "tags": {},
  "upstream": {
    "url": "<string>",
    "auth": {
      "kind": "<string>",
      "token": "<string>",
      "token_username": "<string>"
    }
  }
}
'
{
  "id": "<string>",
  "org": "<string>",
  "name": "<string>",
  "default_bookmark": "<string>",
  "head_change_id": "<string>",
  "upstream": {
    "url": "<string>",
    "latest_sync": {
      "id": "<string>",
      "repo_id": "<string>",
      "attempt": 123,
      "ref_globs": {
        "branches": "<string>",
        "tags": "<string>"
      },
      "stats": {
        "refs": [
          {
            "name": "<string>",
            "before": "<string>",
            "after": "<string>"
          }
        ]
      },
      "error": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "finished_at": "2023-11-07T05:31:56Z"
    }
  },
  "created_at": "2023-11-07T05:31:56Z",
  "tags": {}
}
Required scope: write

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required

Organization slug

Minimum string length: 1
repo
string
required

Repository name

Minimum string length: 1

Body

application/json
name
string
Required string length: 1 - 100
default_bookmark
string
Minimum string length: 1
tags
object
upstream
object

Set, replace, or remove the upstream remote. Pass an object to attach or update. Pass null to remove. Omit to leave unchanged.

Response

Repository updated

id
string
required
org
string
required
name
string
required
default_bookmark
string
required
head_change_id
string
required

Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz).

Pattern: ^[zyxwvutsrqponmlk]{32}$
upstream
object
required

Upstream remote configured for this repository, or null if none is configured.

created_at
string<date-time>
required
tags
object
required