Camera Trigger

Trigger cameras under a camera capture application

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:

ArgumentDescriptionExample
trigger_subject
string
(mandatory) the input subject into a camera capture apptesttriggersubject1_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

Responses

Status CodeDescription
200Successful sent trigger to camera capture application.
4xxCannot 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