Skip to main content
POST
/
{org}
/
{repo}
/
upstream
/
syncs
Sync upstream
curl --request POST \
  --url https://api.mesa.dev/v1/{org}/{repo}/upstream/syncs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ref_globs": {
    "branches": "<string>",
    "tags": "<string>"
  }
}
'
{
  "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"
}
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
direction
enum<string>
required

Direction to sync between the repository and its upstream.

Available options:
pull,
push
ref_globs
object

Branch and tag glob filters for this sync. Omit to sync all branches and tags.

Response

Sync enqueued

id
string
required
repo_id
string
required
direction
enum<string>
required
Available options:
pull,
push
status
enum<string>
required
Available options:
queued,
in_progress,
completed,
failed
attempt
integer
required
ref_globs
object
required
stats
object
required
error
string | null
required
created_at
string<date-time>
required
started_at
string<date-time> | null
required
finished_at
string<date-time> | null
required