> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# repos.get_upstream_sync()

> Get one sync for a repository's configured upstream.

Fetch a sync by id through the repository's upstream.

**Required scope: `write`**

```python theme={null}
sync = await mesa.repos.get_upstream_sync(repo="app", sync_id="sync_...")
print(sync.id, sync.status)
```

## Options

<ParamField path="repo" type="str" required>
  Repository name.
</ParamField>

<ParamField path="sync_id" type="str" required>
  Sync ID.
</ParamField>

<ParamField path="org" type="str | None">
  Organization override.
</ParamField>

## Response

Returns a sync object.

<ResponseField name="id" type="str">
  Sync ID.
</ResponseField>

<ResponseField name="repo_id" type="str">
  Repository ID.
</ResponseField>

<ResponseField name="direction" type="'pull' | 'push'">
  Sync direction.
</ResponseField>

<ResponseField name="status" type="'queued' | 'in_progress' | 'completed' | 'failed'">
  Current sync status.
</ResponseField>

<ResponseField name="attempt" type="int">
  Attempt number for this run.
</ResponseField>

`read`
