Camera Trigger
  • 14 Nov 2024
  • 1 Minute to read
  • Dark
    Light

Camera Trigger

  • Dark
    Light

Article summary

Trigger camera capture

Cameras under a camera capture app can be triggered using this endpoint. Each camera capture app must have an input subject. The number of frames triggered during one trigger can be configured via the camera capture app.

POST /1/trigger
HOST: http://<gateway ip address or hostname>:8000

Arguments for the app are shown below:

Argument

Description

Example

trigger_subject string

(mandatory) the input subject into a camera capture app

testtriggersubject1_4ac

domain_unit string

(optional) domain id for set assignment grouping or allowing correlation between groups of images

"test-domain-1

custom_data string

(optional) opaque data carried through an application pipeline

<any string>

Responses

Status Code

Description

200

Successfully sent trigger to camera capture application.

4xx

Cannot parse trigger data

API usage example:

def trigger_cam(input_subject_uid, domain_unit):
    custom_data = json.dumps('{"test_132": "abcded", "alpha": 29333393}')
    data = {'trigger_subject': input_subject_uid, 'domain_unit': domain_unit,
            'custom_data': custom_data}
    resp = requests.post(URL_PREFIX + 'trigger', data=data,  timeout=TIMEOUT)
    if not resp.ok:
        logger.error("Error: %d" % resp.status_code)
        return None


Was this article helpful?