Skip to main content

SRS API

Use the SRS API to query the system, request spot-weld measurements, and upload acquisition settings. Requests use TCP and JSON. The protocol guide describes packet framing and all resources. The reference lists every field.

Request format​

The SRS system listens on TCP port 8001. End each JSON request and response with a zero byte (\x00). A connection can carry multiple exchanges.

Use get to query data or request an acquisition. Its payload is optional:

{"get":"<resource>","payload":{}}

Use put to update the application config, acquisition config, or templates. For example, acq-config accepts the complete acquisition configuration:

{"put":"acq-config","payload":<complete-config-object>}

See Acquire Config for the full schema of the above example.

Request a measurement​

info

Below is a simple example of how the SRS API can be used to request measurements. See Obtaining Measurements for the full guide, including request overrides and a fuller response.

Send get acq with a unique inspection UUID. Measurements with the same UUID belong to the same inspection. Include the part and weld location:

{
"get": "acq",
"payload": {
"inspection-uid": "b628394a-4723-430a-822b-eaff99d477c4",
"part-id": "LHS Driver Door",
"location-id": "Weld 1"
}
}

The response type is measurement-info. Its payload includes the measurement UID, timestamp, and results. This abbreviated example shows the response shape:

{
"type": "measurement-info",
"payload": {
"uid": "b628394a-4723-430a-822b-eaff99d477c4",
"acq-timestamp": "2023-10-30T13:47:41.455-05:00",
"nugget": { "shape": "circle", "quality": 1, "size": 4.0 }
}
}