Polytomic subpackage_modelSync.subpackage_modelSync/executions API
The subpackage_modelSync.subpackage_modelSync/executions API from Polytomic — 6 operation(s) for subpackage_modelsync.subpackage_modelsync/executions.
The subpackage_modelSync.subpackage_modelSync/executions API from Polytomic — 6 operation(s) for subpackage_modelsync.subpackage_modelsync/executions.
openapi: 3.1.0
info:
title: API Reference subpackage_bulkSync subpackage_modelSync.subpackage_modelSync/executions API
version: 1.0.0
servers:
- url: https://app.polytomic.com
tags:
- name: subpackage_modelSync.subpackage_modelSync/executions
paths:
/api/syncs/{sync_id}/executions:
get:
operationId: list
summary: List Executions
description: '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).'
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: page_token
in: query
required: false
schema:
type: string
- name: only_completed
in: query
required: false
schema:
type: boolean
- name: ascending
in: query
required: false
schema:
type: boolean
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListExecutionResponseEnvelope'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/api/syncs/{sync_id}/executions/{id}:
get:
operationId: get
summary: Get Execution
description: 'Returns a single model sync execution.
For the log files produced by this execution, use
[`GET /api/syncs/{sync_id}/executions/{id}/{type}`](../../../../../api-reference/model-sync/executions/get-log-urls) to retrieve
signed URLs grouped by log category.'
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetExecutionResponseEnvelope'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/api/syncs/{sync_id}/executions/{id}/cancel:
post:
operationId: cancel
summary: Cancel Sync Execution
description: Requests cancellation of a model sync execution.
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
description: The ID of the execution to cancel.
required: true
schema:
type: string
format: uuid
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CancelSyncExecutionResponseEnvelope'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/api/syncs/{sync_id}/executions/{id}/consolelog:
get:
operationId: get-console-logs
summary: Get Execution Console Logs
description: Fetch the latest console log entries for a sync execution. Returns at most the most recent 50 entries retained in Redis.
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: limit
in: query
description: Maximum number of entries to return. Values above the logger retention limit are capped to 50.
required: false
schema:
type: integer
- name: after
in: query
description: Return only entries newer than this cursor.
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionConsoleLogsResponseEnvelope'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'408':
description: Request Timeout
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/api/syncs/{sync_id}/executions/{id}/{type}:
get:
operationId: get-log-urls
summary: Get Execution Log Urls
description: 'Returns signed URLs for every log file of a given type on a model sync execution.
`{type}` identifies the log category, such as `errors` or `warnings`. The
response contains a signed URL for each log file in that category.
> 🚧 Signed URLs expire after a short period. If a URL has expired, re-request
> it from this endpoint. To fetch a single file''s URL directly, use
> [`GET /api/syncs/{sync_id}/executions/{id}/{type}/{filename}`](../../../../../../api-reference/model-sync/executions/get-logs).'
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: type
in: path
required: true
schema:
$ref: '#/components/schemas/ExecutionLogType'
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionLogsResponseEnvelope'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/api/syncs/{sync_id}/executions/{id}/{type}/{filename}:
get:
operationId: get-logs
summary: Get Execution Log
description: 'Returns a signed URL for a specific log file produced by a model sync execution.
The URL is signed and expires after a short period. If it has expired before
you download the file, call this endpoint again to obtain a fresh URL.'
tags:
- subpackage_modelSync.subpackage_modelSync/executions
parameters:
- name: sync_id
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: type
in: path
required: true
schema:
$ref: '#/components/schemas/ExecutionLogType'
- name: filename
in: path
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: Successful response
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
ExecutionLogsResponseEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/ExecutionLogResponse'
title: ExecutionLogsResponseEnvelope
GetExecutionResponseEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/GetExecutionResponseSchema'
title: GetExecutionResponseEnvelope
ListExecutionResponseEnvelope:
type: object
properties:
data:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/GetExecutionResponseSchema'
pagination:
$ref: '#/components/schemas/PaginationDetails'
title: ListExecutionResponseEnvelope
ExecutionLogResponse:
type: object
properties:
expires:
type:
- string
- 'null'
format: date-time
urls:
type:
- array
- 'null'
items:
type: string
title: ExecutionLogResponse
ExecutionLogType:
type: string
enum:
- records
- errors
- warnings
- inserts
- updates
- deletes
title: ExecutionLogType
UtilExecutionStatus:
type: string
enum:
- created
- scheduled
- queued
- waiting
- running
- processing
- canceling
- canceled
- completed
- failed
- interrupted
title: UtilExecutionStatus
PaginationDetails:
type: object
properties:
next_page_token:
type: string
title: PaginationDetails
GetExecutionResponseSchema:
type: object
properties:
completed_at:
type:
- string
- 'null'
format: date-time
counts:
$ref: '#/components/schemas/ExecutionCounts'
created_at:
type: string
format: date-time
errors:
type: array
items:
type: string
id:
type: string
format: uuid
started_at:
type:
- string
- 'null'
format: date-time
status:
$ref: '#/components/schemas/UtilExecutionStatus'
type:
type: string
title: GetExecutionResponseSchema
CancelSyncExecutionResponseEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/CancelSyncExecutionResponse'
title: CancelSyncExecutionResponseEnvelope
ExecutionConsoleLogsResponseEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/ExecutionConsoleLogsResponse'
title: ExecutionConsoleLogsResponseEnvelope
CancelSyncExecutionResponse:
type: object
properties:
message:
type: string
title: CancelSyncExecutionResponse
ExecutionCounts:
type: object
properties:
delete:
type: integer
format: int64
error:
type: integer
format: int64
insert:
type: integer
format: int64
total:
type: integer
format: int64
update:
type: integer
format: int64
upserts:
type: integer
format: int64
warnings:
type: integer
format: int64
title: ExecutionCounts
ExecutionConsoleLogEntry:
type: object
properties:
id:
type: string
level:
type: string
message:
type: string
payload:
type:
- object
- 'null'
additionalProperties:
description: Any type
timestamp:
type: string
format: date-time
title: ExecutionConsoleLogEntry
ApiError:
type: object
properties:
key:
type: string
message:
type: string
metadata:
type: object
additionalProperties:
description: Any type
status:
type: integer
title: ApiError
ExecutionConsoleLogsResponse:
type: object
properties:
entries:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ExecutionConsoleLogEntry'
next_cursor:
type:
- string
- 'null'
title: ExecutionConsoleLogsResponse
securitySchemes:
bearerUserAPIKey:
type: http
scheme: bearer
description: Bearer user API key
orgScopedAPIKey:
type: http
scheme: basic
description: Basic organization-scoped API key
bearerPartnerKey:
type: http
scheme: bearer
description: Bearer partner API key