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

# Get AWSS3 sync Progress status

## Endpoint:

```bash theme={"dark"}
POST /datasource/getDatasourceProgress
```

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer [API TOKEN](https://docs.usedatabrain.com/developer-docs/helpers/api-token)
</ParamField>

## Request Body

<ParamField body="input" type="object" required>
  Input object containing the datasource configuration.

  <ParamField body="input.datasourceId" type="string" required>
    The unique identifier of the datasource to check sync progress for.
  </ParamField>
</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={"dark"}
  curl --request POST \
    --url https://api.usedatabrain.com/api/v2/datasource/getDatasourceProgress \
    --header 'Authorization: Bearer dbn_live_abc123...' \
    --header 'Content-Type: application/json' \
    --data '{
      "input": {
        "datasourceId": "your-datasource-id"
      }
    }'
  ```

  ```javascript Node.js theme={"dark"}
  const response = await fetch('https://api.usedatabrain.com/api/v2/datasource/getDatasourceProgress', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer dbn_live_abc123...',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      input: {
        datasourceId: 'your-datasource-id'
      }
    })
  });

  const data = await response.json();
  console.log('Progress:', data.status.progress);
  console.log('Error:', data.status.error);
  ```

  ```python Python theme={"dark"}
  import requests

  response = requests.post(
      'https://api.usedatabrain.com/api/v2/datasource/getDatasourceProgress',
      headers={
          'Authorization': 'Bearer dbn_live_abc123...',
          'Content-Type': 'application/json'
      },
      json={
          'input': {
              'datasourceId': 'your-datasource-id'
          }
      }
  )

  data = response.json()
  print(f"Progress: {data['status']['progress']}")
  print(f"Error: {data['status']['error']}")
  ```
</RequestExample>

## Response Body

<ResponseExample>
  ```json theme={"dark"}
  {
    "status": {
      "progress": "16/16",
      "error": ""
    }
  }
  ```
</ResponseExample>

### Response Body:

Below is a response when no sync is completed for AWSS3:

```json theme={"dark"}
{
  "status": {
    "progress": "0/...",
    "error": ""
  }
}
```

### Response Error:

Below is a response error when while syncing AWSS3 throws an error:

```json theme={"dark"}
{
  "status": {
    "progress": "0/...",
    "error": "Error: Bind error data type"
  }
}
```

## Error Codes

* **INVALID\_REQUEST\_BODY**: The request body is invalid.
* **DATASOURCE\_ID\_ERROR**: The datasource ID provided does not exist or is invalid.
