> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# List Executions

GET https://app.polytomic.com/api/syncs/{sync_id}/executions

Lists executions for a model sync.

Results are ordered by start time descending. If more results are available, the
response includes `pagination.next_page_token`; pass that token back unchanged
to continue paging.

The token is opaque. Do not construct or edit it yourself.

For full details about a specific execution — including record counts and error
summaries — use
[`GET /api/syncs/{sync_id}/executions/{id}`](../../../../api-reference/model-sync/executions/get).

Reference: https://apidocs.polytomic.com/2024-02-08/api-reference/model-sync/executions/list

## Authentication

- `Authorization` header (basic auth, required) — This is the Polytomic deployment key (on-premises only)
- `Authorization` header (bearer token, required) — This is the Polytomic API key

## Request

### Path parameters

- `sync_id` (string, required)

### Query parameters

- `page_token` (string, optional)
- `only_completed` (boolean, optional)
- `ascending` (boolean, optional)

## Response

### 200

OK

- `data` (list of V2GetExecutionResponseSchema, optional, nullable)
- `pagination` (PaginationDetails, optional)

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional) — Application-specific error code.
- `context` (map from string to any, optional) — Application context.
- `error` (string, optional) — Error message.
- `status` (string, optional) — Status text.

### 404 Not Found Error

Not Found

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### V2GetExecutionResponseSchema

- `completed_at` (string, optional, nullable)
- `counts` (V2ExecutionCounts, optional)
- `created_at` (string, optional)
- `errors` (list of string, optional)
- `id` (string, optional)
- `started_at` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `created`, `scheduled`, `queued`, `waiting`, `running`, `processing`, `canceling`, `canceled`, `completed`, `failed`, `interrupted`
- `type` (string, optional)
- `version` (string, optional) — Polytomic version which last ran this execution.

### PaginationDetails

- `next_page_token` (string, optional)

### V2ExecutionCounts

- `delete` (long, optional)
- `error` (long, optional)
- `insert` (long, optional)
- `total` (long, optional)
- `update` (long, optional)
- `upserts` (long, optional)
- `warnings` (long, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "completed_at": "2024-01-01T00:00:00Z",
      "counts": {
        "delete": 42,
        "error": 5,
        "insert": 80,
        "total": 100,
        "update": 15,
        "upserts": 10,
        "warnings": 10
      },
      "created_at": "2024-01-01T00:00:00Z",
      "errors": [
        "something went wrong"
      ],
      "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "started_at": "2024-01-01T00:00:00Z",
      "status": "created",
      "type": "scheduled",
      "version": "rel2026.08.05.06~1a2b3c4"
    }
  ],
  "pagination": {
    "next_page_token": "AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K=="
  }
}
```

**SDK Code**

```typescript
import { PolytomicClient } from "polytomic";

async function main() {
    const client = new PolytomicClient({
        token: "YOUR_TOKEN_HERE",
        version: "X-Polytomic-Version",
    });
    await client.modelSync.executions.list("248df4b7-aa70-47b8-a036-33ac447e668d", {});
}
main();

```

```python
from polytomic import Polytomic

client = Polytomic(
    token="YOUR_TOKEN_HERE",
    version="X-Polytomic-Version",
)

client.model_sync.executions.list(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

```

```go
package example

import (
    context "context"

    client "github.com/polytomic/polytomic-go/v24/client"
    modelsync "github.com/polytomic/polytomic-go/v24/modelsync"
    option "github.com/polytomic/polytomic-go/v24/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "YOUR_TOKEN_HERE",
        ),
        option.WithVersion(
            "X-Polytomic-Version",
        ),
    )
    request := &modelsync.ExecutionsListRequest{}
    client.ModelSync.Executions.List(
        context.TODO(),
        "248df4b7-aa70-47b8-a036-33ac447e668d",
        request,
    )
}

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Polytomic-Version"] = 'X-Polytomic-Version'
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")
  .header("X-Polytomic-Version", "X-Polytomic-Version")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions', [
  'headers' => [
    'X-Polytomic-Version' => 'X-Polytomic-Version',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://app.polytomic.com/api/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Polytomic-Version", "X-Polytomic-Version");

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "X-Polytomic-Version": "X-Polytomic-Version",
  "Authorization": "Basic \(credentials)"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```