Skip to content
SegmentStream/ Docs

Loading documentation…

↑ ↓ to navigate  ↵ to open  Esc to close
Website Console
Section menu

Preview an asset run

POST /api/workspaces/{workspaceId}/runs/preview

Endpoint

POST/api/workspaces/{workspaceId}/runs/preview

Resolve selected assets and return the deployment ID and plan digest without launching a run. This is a repeatable read. See applications_createAssetRun. Required personal key scopes: workspace:view, pipelines:read, pipelines:exec.

Authorization

Bearer token · workspace:view · pipelines:read · pipelines:exec

Parameters

workspaceId path · uuid · required
Workspace UUID returned by list workspaces.
API-Version header · string · optional
Optional platform API major version. Omit to use the current default. Allowed values: 1

Request body

application/json schema
{
  "type": "object",
  "properties": {
    "selection": {
      "type": "object",
      "properties": {
        "assetKeys": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "minItems": 1,
          "maxItems": 100,
          "description": "Keys of pipeline assets included in the selection."
        },
        "includeUpstream": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expand the selection to include upstream dependencies."
        },
        "includeDownstream": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expand the selection to include dependent assets."
        }
      },
      "required": [
        "assetKeys"
      ],
      "additionalProperties": false,
      "description": "Asset keys and dependency expansion requested for this execution.",
      "allOf": [
        {
          "description": "Assets selected for execution and any requested expansion."
        }
      ]
    },
    "partitionRange": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/SharedObject_112"
        },
        {
          "type": "null"
        }
      ],
      "description": "Inclusive partition interval for the selected assets."
    }
  },
  "required": [
    "selection"
  ],
  "additionalProperties": false
}
Full schema and referenced types ↗
Example
{
  "selection": {
    "assetKeys": [
      "orders"
    ]
  }
}

Responses

200 Success
application/json schema
{
  "type": "object",
  "properties": {
    "deploymentId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Identifier of the deployment associated with this operation."
    },
    "planDigest": {
      "type": "string",
      "description": "Digest from the asset-run preview. Submit it with the same selection and deployment."
    },
    "selection": {
      "type": "object",
      "properties": {
        "assetKeys": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "minItems": 1,
          "maxItems": 100,
          "description": "Keys of pipeline assets included in the selection."
        },
        "includeUpstream": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expand the selection to include upstream dependencies."
        },
        "includeDownstream": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expand the selection to include dependent assets."
        }
      },
      "required": [
        "assetKeys"
      ],
      "additionalProperties": false,
      "description": "Asset keys and dependency expansion requested for this execution."
    },
    "selectedAssetKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Assets that the resolved plan would execute."
    },
    "requiredAssetKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Assets required to execute the plan."
    },
    "selectedCheckKeys": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SharedObject_111"
      },
      "description": "Asset checks included in the resolved plan."
    },
    "externalAssetKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dependencies that are external to this deployment."
    },
    "unselectedInputAssetKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Input dependencies the plan reads without rematerializing them."
    },
    "partitionRange": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "startDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "First date in the interval, in YYYY-MM-DD form."
            },
            "endDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "Last date in the interval, in YYYY-MM-DD form."
            }
          },
          "required": [
            "startDate",
            "endDate"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Inclusive partition interval for the selected assets."
    },
    "availableRange": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "startDate": {
              "type": "string",
              "description": "First date in the interval, in YYYY-MM-DD form."
            },
            "endDate": {
              "type": "string",
              "description": "Last date in the interval, in YYYY-MM-DD form."
            },
            "timezone": {
              "type": "string",
              "description": "IANA time zone for interpreting dates and schedules."
            }
          },
          "required": [
            "startDate",
            "endDate",
            "timezone"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Partition bounds available for the selected assets."
    },
    "counts": {
      "type": "object",
      "properties": {
        "assets": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "enum": [
                "Infinity",
                "-Infinity",
                "NaN"
              ]
            }
          ],
          "allOf": [
            {
              "description": "Pipeline assets covered by this result."
            }
          ]
        },
        "assetPartitions": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "enum": [
                "Infinity",
                "-Infinity",
                "NaN"
              ]
            }
          ],
          "allOf": [
            {
              "description": "Number of asset and partition pairs in the plan."
            }
          ]
        }
      },
      "required": [
        "assets",
        "assetPartitions"
      ],
      "additionalProperties": false,
      "description": "Counts grouped by the categories named in this object."
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable identifier for the reported condition."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message emitted by the operation."
          },
          "assetKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keys of pipeline assets included in the selection."
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Field name by which to restrict results."
          }
        },
        "required": [
          "code",
          "message",
          "assetKeys"
        ],
        "additionalProperties": false
      },
      "description": "Problems identified while validating the plan."
    },
    "canLaunch": {
      "type": "boolean",
      "description": "Whether the previewed plan is eligible for execution."
    }
  },
  "required": [
    "deploymentId",
    "planDigest",
    "selection",
    "selectedAssetKeys",
    "requiredAssetKeys",
    "selectedCheckKeys",
    "externalAssetKeys",
    "unselectedInputAssetKeys",
    "counts",
    "issues",
    "canLaunch"
  ],
  "additionalProperties": false
}
Full schema and referenced types ↗
Example
{
  "deploymentId": "00000000-0000-4000-8000-000000000001",
  "planDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "selection": {
    "assetKeys": [
      "orders"
    ]
  },
  "selectedAssetKeys": [
    "orders"
  ],
  "requiredAssetKeys": [],
  "selectedCheckKeys": [],
  "externalAssetKeys": [],
  "unselectedInputAssetKeys": [],
  "counts": {
    "assets": 1,
    "assetPartitions": 0
  },
  "issues": [],
  "canLaunch": true
}
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
Deprecation
Present when the operation is deprecated. RFC 9745 date in seconds since the Unix epoch.
Sunset
Present when retirement is scheduled. HTTP date of planned removal, per RFC 8594.
400 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
401 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
403 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
404 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
406 Unsupported platform API version
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
409 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
413 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
422 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
429 Request limit reached
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
Retry-After
Seconds to wait before retrying the request.
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
503 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).