Reads ('peeks') the Parameter or Range definition addressed by {messageId} from the backend's message cache. If no such message is present in the cache, the M&C server is asked to deliver the message. The API call waits up to 3 seconds for the M&C server to answer, then a 404 error is returned. Peeking parameters is a very inefficient way to get a parameter value. It only should be used if a parameter value is required only once (without subsequent updates) or for testing purposes. Section WebSocket Communication describes the subscription model using STOMP/websockets which is the preferred way to read/update parameters in the UI.
The {messageId} supplied to /api/v1/peek must be a complete message identifier consisting of M&C-, device- and parameter-ID.
The document returned on success is either a Parameter or a Range, depending on the {messageId} supplied. For details about messages and message identifiers, see section Message later in this document.
Supported HTTP methods: GET, HEAD, OPTIONS
GET /api/v1/peek/{messageId}
Returns a Message document describing the requested parameter.
Parameters:
| Parameter | Description |
|---|---|
| messageId | The requested messageId. Must be a complete message identifier consisting of M&C-, device- and parameter-ID. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a Message document describing the requested parameter. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | no parameter with the given messageId exists. In this case a ApiError document is returned, describing details of the error. |