---
title: "Fetch the latest run for a camera or program"
method: GET
path: "/v1/industrial/vision/run/camera/{camera_id}"
tags: ["Industrial"]
---

# Fetch the latest run for a camera or program

`GET /v1/industrial/vision/run/camera/{camera_id}`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/v1/industrial/vision/run/camera/{camera_id}`
- Auth: HTTP bearer

Fetch the latest run for a camera or program by default. If startedAtMs is supplied, fetch the specific run that corresponds to that start time. 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Read Industrial** under the Industrial category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Path parameters

- `camera_id` integer, required

## Query parameters

- `program_id` integer
- `startedAtMs` integer
- `include` string
- `limit` integer

## Response `200`

Returns the details for this run.

- V1VisionRunByCameraResponse
  - `cameraId` integer
  - `endedAtMs` integer
  - `inspectionResults` V1VisionRunByCameraResponseInspectionResults[]
    - `captureAtMs` number
    - `result` string
    - `stepResults` object[]
      - `angleCheck` object
        - `angleConfigured` object: The configured angle allowance range (in degrees)
          - `high` integer
          - `low` integer
        - `angleFound` integer: The counter-clockwise angle detected from the first edge to the second edge
        - `endStepName` string: The name of the second reference step used to check the angle
        - `startStepName` string: The name of the first reference step used to check the angle
      - `barcode` object[]
        - `contents` string
        - `matchString` string
        - `type` string
      - `booleanLogic` object
        - `operator` string
        - `steps` object[]
          - `name` string
          - `result` string
      - `caliper` object
        - `angleRange` object: The configured angle allowance range
          - `high` integer
          - `low` integer
        - `contrastRange` object: The configured contrast allowance range
          - `high` integer
          - `low` integer
        - `distanceFound` number, float: The distance found between the found edges
        - `filterPolarity` 'LIGHT TO DARK' | 'DARK TO LIGHT': The configured polarity for finding edges. Valid values: `LIGHT TO DARK`, `DARK TO LIGHT`.
        - `maxDistance` number, float: The maximum allowed distance threshold
        - `minDistance` number, float: The minumum allowed distance threshold
        - `sharpnessRange` object: The configured sharpness allowance range
          - `high` integer
          - `low` integer
        - `straightnessRange` object: The configured straightness allowance range
          - `high` integer
          - `low` integer
        - `unit` string: The measurement unit of the distance found and the min and max distance threshold
      - `contour` object
        - `angleDegrees` integer: The rotation angle found
        - `angleTolerance` integer: The rotation angle allowance
        - `matchPercentage` integer: The contour match percentage with the configured contour
        - `matchThreshold` integer: The configured match threshold for contours
      - `distance` object
        - `distanceFound` integer: The distance found between the start and end references
        - `endStepName` string: The name of the second reference step that we're checking the distances between
        - `enforceOffsetAngleRange` boolean: Whether an offset angle range is enforced
        - `maxDistance` integer: The maximum allowed distance threshold
        - `maxOffsetAngle` integer: The maximum angle allowance (in degrees) if enforceOffsetAngleRange is true
        - `minDistance` integer: The minumum allowed distance threshold
        - `minOffsetAngle` integer: The minimum angle allowance (in degrees) if enforceOffsetAngleRange is true
        - `offsetAngleFound` integer: The counter-clockwise angle (in degrees) found between the horizontal axis of the start reference step and the last
        - `startStepName` string: The name of the first reference step that we're checking the distances between
        - `unit` string: The measurement unit of the distance found and the min and max distance threshold
      - `expirationDate` object
        - `dateOffset` integer
        - `foundDate` string
        - `matchDate` string
      - `findCopies` object
        - `angleTolerance` integer: The orientation angle tolerance (+/- °)
        - `foundCount` integer: The number of copies found
        - `maxCount` integer: The maximum number of copies allowed
        - `minCount` integer: The minimum number of copies allowed
        - `threshold` integer: The minimum required similarity (in %) of a found copy compared to the configured match region
      - `findEdge` object
        - `angleFound` integer: The detected angle in degrees
        - `angleRange` object: The configured angle allowance range
          - `high` integer
          - `low` integer
        - `contrastPercent` integer: The detected contrast percentage
        - `contrastRange` object: The configured contrast allowance range
          - `high` integer
          - `low` integer
        - `filterPolarity` string: The configured polarity for finding edges. Valid values: `LIGHT TO DARK`, `DARK TO LIGHT`.
        - `sharpnessPercent` integer: The detected sharpness percentage
        - `sharpnessRange` object: The configured sharpness allowance range
          - `high` integer
          - `low` integer
        - `straightnessFound` integer: The detected straightness percentage
        - `straightnessRange` object: The configured straightness allowance range
          - `high` integer
          - `low` integer
      - `findShapes` object
        - `foundCount` integer
        - `maxCount` integer
        - `minCount` integer
      - `fixture` object
        - `coordinates` object
          - `x` integer
          - `y` integer
        - `found` boolean
        - `rotationDegrees` integer
      - `labelMatch` object
        - `score` integer
        - `threshold` integer
      - `name` string
      - `presenceAbsence` object
        - `blueRange` object
          - `high` integer
          - `low` integer
        - `checkForAbsence` boolean
        - `grayscaleRange` object
          - `high` integer
          - `low` integer
        - `greenRange` object
          - `high` integer
          - `low` integer
        - `hueRange` object
          - `high` integer
          - `low` integer
        - `redRange` object
          - `high` integer
          - `low` integer
        - `saturationRange` object
          - `high` integer
          - `low` integer
        - `score` integer
        - `threshold` integer
        - `valueRange` object
          - `high` integer
          - `low` integer
      - `result` string
      - `textMatch` object
        - `foundText` string
        - `matchString` string
  - `isOngoing` boolean
  - `program` V1VisionRunByCameraResponseProgram
    - `id` integer
    - `name` string
  - `runSummary` V1VisionRunByCameraResponseRunSummary
    - `itemsPerMinute` number
    - `noReadCount` integer
    - `rejectCount` integer
    - `successCount` integer
  - `startedAtMs` integer

## Other responses

- `default`: Unexpected error.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
