# Datasets_CorrectCameraLags

`POST /v1/accounts/{account}/datasets/{dataset}:correctCameraLags`

Corrects camera stamp offsets through a recorded corrective re-ingest.
Explicit offsets are desired absolute values. A trusted legacy estimate on
a zero-offset channel maps to -lag_ms. FAILED_PRECONDITION on a merged
dataset (correct its uploads before they merge) and on an
upload merged into one (naming it).

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header

## Parameters

- `account` (path, string, required): The account id.
- `dataset` (path, string, required): The dataset id.

## Request body

Required: `application/json` `qualia.v1.CorrectCameraLagsRequest`

## Responses

- `200` OK: `application/json` `qualia.v1.CorrectCameraLagsResponse`
- `default` Default error response: `application/json` `google.rpc.Status`

## Schemas

```yaml
qualia.v1.CorrectCameraLagsRequest:
  required:
    - name
    - corrections
    - requestId
  type: object
  properties:
    name:
      type: string
      description: Upload or merged dataset to correct.
    corrections:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.CameraLagCorrection"
      description: Each upload in a merged dataset must be covered. Names disambiguate topics.
    requestId:
      type: string
      description: Required UUID4; retries return the same member re-ingest receipt for 24 hours.
  description: Request for Datasets.CorrectCameraLags.
qualia.v1.CameraLagCorrection:
  required:
    - upload
    - topic
  type: object
  properties:
    upload:
      type: string
      description: The upload containing this camera topic.
    topic:
      type: string
      description: Camera topic in this upload.
    stampOffsetMs:
      type: number
      description: Desired absolute stamp_offset_ms, not a delta.
      format: double
    useEstimate:
      type: boolean
      description: Apply a trusted estimate only when its measurement basis is known.
  description: An absolute camera offset to publish through a corrective re-ingest.
qualia.v1.CorrectCameraLagsResponse:
  type: object
  properties:
    reingests:
      readOnly: true
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.CameraLagReingest"
      description: Accepted operations or per-upload dispatch errors.
  description: The member re-ingest operation for each corrected upload.
qualia.v1.CameraLagReingest:
  type: object
  properties:
    upload:
      readOnly: true
      type: string
      description: Upload whose camera offset was corrected.
    reingest:
      readOnly: true
      type: string
      description: Name to poll with Datasets.GetReingest.
    unchanged:
      readOnly: true
      type: boolean
      description: True when the requested config was already published.
    dispatchError:
      readOnly: true
      type: string
      description: Non-empty when dispatch for this member failed; other members may proceed.
  description: The corrective re-ingest operation started for one upload.
google.rpc.Status:
  oneOf:
    - $ref: "#/components/schemas/ApiError"
    - $ref: "#/components/schemas/GatewayError"
  description: "The body of a failed call: one of the two shapes below."
ApiError:
  title: API error
  type: object
  required:
    - code
    - message
    - retryable
    - details
  properties:
    code:
      type: string
      description: The gRPC code name in upper case, e.g. `NOT_FOUND`.
    message:
      type: string
    retryable:
      type: boolean
      description: Whether the same call may succeed if retried.
    details:
      type: array
      items:
        type: object
      description: "Empty, except when a dataset copy or move is refused: then one `google.rpc.ErrorInfo` with the refusal's `reason` code, its `domain` and, in `metadata`, the datasets it names."
  description: A refusal from the API itself.
GatewayError:
  title: Gateway error
  type: object
  required:
    - detail
  properties:
    detail:
      type: string
      description: What went wrong.
  description: A refusal from the gateway before the call reaches the API, for example `401` bad or missing API key, `403` key lacks the scope or environment closed, `413` body too large.
```
