Skip to main content
GET
/
v1
/
industrial
/
vision
/
run
/
camera
/
{camera_id}
Fetch the latest run for a camera or program
curl --request GET \
  --url https://api.samsara.com/v1/industrial/vision/run/camera/{camera_id} \
  --header 'Authorization: Bearer <token>'
{
  "cameraId": 1234512345123,
  "endedAtMs": 0,
  "inspectionResults": [
    {
      "captureAtMs": 1553811994730,
      "result": "PASS",
      "stepResults": [
        {
          "angleCheck": {
            "angleConfigured": {
              "high": 150,
              "low": 90
            },
            "angleFound": 60,
            "endStepName": "Edge 2",
            "startStepName": "Edge 1"
          },
          "barcode": [
            {
              "contents": "10855639004823",
              "matchString": "10855639004823",
              "type": "EAN8"
            }
          ],
          "booleanLogic": {
            "operator": "AND",
            "steps": [
              {
                "name": "Expiration Date",
                "result": "PASS"
              }
            ]
          },
          "caliper": {
            "angleRange": {
              "high": 360,
              "low": 0
            },
            "contrastRange": {
              "high": 100,
              "low": 50
            },
            "distanceFound": 555.55,
            "filterPolarity": "LIGHT TO DARK",
            "maxDistance": 1000,
            "minDistance": 500,
            "sharpnessRange": {
              "high": 100,
              "low": 80
            },
            "straightnessRange": {
              "high": 100,
              "low": 80
            },
            "unit": "Millimeters"
          },
          "contour": {
            "angleDegrees": 0,
            "angleTolerance": 50,
            "matchPercentage": 46,
            "matchThreshold": 18
          },
          "distance": {
            "distanceFound": 123,
            "endStepName": "Bottom Right Square",
            "enforceOffsetAngleRange": true,
            "maxDistance": 900,
            "maxOffsetAngle": 90,
            "minDistance": 1500,
            "minOffsetAngle": 45,
            "offsetAngleFound": 50,
            "startStepName": "Top Left Square",
            "unit": "Millimeters"
          },
          "expirationDate": {
            "dateOffset": 1,
            "foundDate": "06/13/2019",
            "matchDate": "06/13/2019"
          },
          "findCopies": {
            "angleTolerance": 10,
            "foundCount": 1,
            "maxCount": 5,
            "minCount": 1,
            "threshold": 70
          },
          "findEdge": {
            "angleFound": 90,
            "angleRange": {
              "high": 360,
              "low": 0
            },
            "contrastPercent": 123,
            "contrastRange": {
              "high": 100,
              "low": 50
            },
            "filterPolarity": "ANY",
            "sharpnessPercent": 95,
            "sharpnessRange": {
              "high": 100,
              "low": 80
            },
            "straightnessFound": 95,
            "straightnessRange": {
              "high": 100,
              "low": 80
            }
          },
          "findShapes": {
            "foundCount": 1,
            "maxCount": 5,
            "minCount": 1
          },
          "fixture": {
            "coordinates": {
              "x": 10,
              "y": 10
            },
            "found": true,
            "rotationDegrees": 90
          },
          "labelMatch": {
            "score": 10,
            "threshold": 10
          },
          "name": "Chicken Caesar Label",
          "presenceAbsence": {
            "blueRange": {
              "high": 150,
              "low": 90
            },
            "checkForAbsence": true,
            "grayscaleRange": {
              "high": 100,
              "low": 20
            },
            "greenRange": {
              "high": 150,
              "low": 90
            },
            "hueRange": {
              "high": 100,
              "low": 20
            },
            "redRange": {
              "high": 150,
              "low": 90
            },
            "saturationRange": {
              "high": 50,
              "low": 10
            },
            "score": 50,
            "threshold": 50,
            "valueRange": {
              "high": 50,
              "low": 10
            }
          },
          "result": "PASS",
          "textMatch": {
            "foundText": "ABCD",
            "matchString": "ABCD"
          }
        }
      ]
    }
  ],
  "isOngoing": true,
  "program": {
    "id": 1,
    "name": "Barcode verification program"
  },
  "runSummary": {
    "itemsPerMinute": 0.1,
    "noReadCount": 0,
    "rejectCount": 0,
    "successCount": 181
  },
  "startedAtMs": 1553808606097
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

camera_id
integer<int64>
required

The camera_id should be valid for the given accessToken.

Query Parameters

program_id
integer<int64>

The configured program's ID on the camera.

startedAtMs
integer<int64>

EndMs is an optional param. It will default to the current time.

include
string

Include is a filter parameter. Accepts 'pass', 'reject' or 'no_read'.

limit
integer<int64>

Limit is an integer value from 1 to 1,000.

Response

Returns the details for this run.

cameraId
integer<int64>
Example:

1234512345123

endedAtMs
integer<int64>
Example:

0

inspectionResults
object[]
isOngoing
boolean
Example:

true

program
object
runSummary
object
startedAtMs
integer<int64>
Example:

1553808606097