runs ยท version 0.1.0

Retry a run from retained inputs

POST /api/runs/{runId}/retry

Creates a new run using the prior run's retained OpenAPI/config inputs. Returns 422 when Sourced no longer has the raw inputs needed to retry safely.

Request

POST https://sourced.sh/api/runs/{runId}/retry

Parameters

NameLocationRequiredDescription
runIdpathYesRun identifier. string

Request body

application/json

type: object
properties:
  reason: string

Responses

202

Retry run accepted.

application/json

type: object
required: project, sourceRun, run
properties:
  project (required): Project
    Project:
      type: object
      required: id, name, createdAt
      properties:
        id (required): string
        name (required): string
        apiName: string
        mode: string enum flagship | stainless_compatible | custom | openapi | stainless_migration
          New writes use `flagship` or `stainless_compatible`; legacy `custom`, `openapi`, and `stainless_migration` records may still be returned.
        status: string enum created | active | archived
        createdAt (required): string
        updatedAt: string
        runCount: integer
  sourceRun (required): Run
    Run:
      type: object
      required: id, projectId, status, createdAt
      properties:
        id (required): string
        orgId: string
        projectId (required): string
        createdByUserId: string
        status (required): string enum queued | running | blocked | complete | ready | failed | expired | canceled
        mode: string enum flagship | stainless_compatible | custom | openapi | stainless | stainless_migration | reference-sample
        verdict: string enum queued | generated | ready | needs_review | not_ready | needs_worker | needs_setup | failed | canceled
        createdAt (required): string
        completedAt: string
        steps: array
          type: array
        inputSummary: object
        notes: string
        currentStep: string
        artifactManifest: ArtifactManifest
          ArtifactManifest:
            type: object
            properties:
              version: integer
              runId: string
              organizationId: string
              projectId: string
              quality: object
              artifacts: array
              expiresAt: string
        updatedAt: string
  run (required): Run
    Run:
      type: object
      required: id, projectId, status, createdAt
      properties:
        id (required): string
        orgId: string
        projectId (required): string
        createdByUserId: string
        status (required): string enum queued | running | blocked | complete | ready | failed | expired | canceled
        mode: string enum flagship | stainless_compatible | custom | openapi | stainless | stainless_migration | reference-sample
        verdict: string enum queued | generated | ready | needs_review | not_ready | needs_worker | needs_setup | failed | canceled
        createdAt (required): string
        completedAt: string
        steps: array
          type: array
        inputSummary: object
        notes: string
        currentStep: string
        artifactManifest: ArtifactManifest
          ArtifactManifest:
            type: object
            properties:
              version: integer
              runId: string
              organizationId: string
              projectId: string
              quality: object
              artifacts: array
              expiresAt: string
        updatedAt: string
  capabilities: object

401

402

403

404

422

The run cannot be retried because raw inputs were not retained.

application/json

Error:
  type: object
  required: error
  properties:
    error (required): string
      Stable machine-readable error code.
    message: string
      Optional human-readable description.

Back to version index