Industrial

Fetch the latest run for a camera or program

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>

get/v1/industrial/vision/run/camera/{camera_id}

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Path parameters

camera_idinteger required

The camera_id should be valid for the given accessToken.

Query parameters

program_idinteger

The configured program's ID on the camera.

startedAtMsinteger

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

includestring

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

limitinteger

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

Response

Returns the details for this run.

cameraIdinteger
endedAtMsinteger
isOngoingboolean
startedAtMsinteger

Example response

{
  "cameraId": 1234512345123,
  "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
            },
            "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": {
            "angleTolerance": 50,
            "matchPercentage": 46,
            "matchThreshold": 18
          },
          "distance": {
            "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
            },
            "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,
    "successCount": 181
  },
  "startedAtMs": 1553808606097
}

Changes

No recorded changes to this operation across all 1 revision of this API.