4. Inspect a single channel

Request

The request URL for retrieving information about a single channel has the following form:

/channels/all/by-name/<channel-name>/
/channels/by-server/<server ID>/by-name/<channel-name>/

Both variants return the same data. The only difference between them is that the variant that includes the server ID in the URL will return status code 404 (not found) when the channel exists, but belongs to a different server. The <channel name> has to be replaced by the encoded form of the channel name. The <server ID> has to be replaced by the UUID associated with the respective server. Only use the second variant if the query shall be limited to a specific server. The request must use the GET method.

Response

The response is a JSON object with the following attributes:

Field nameInternal data typeJSON data typeDescription
channelDataIdUUIDstring internal ID for the channel
channelNamestringstring channel’s name
controlSystemNamestringstring human-readable name of the control-system support used for the channel
controlSystemTypestringstring internal identifier for the control-system support used for the channel
decimationLevelToRetentionPeriodmap of int to intobject with string attribute values decimation levels that exist for the channel and their respective retention periods (both specified in seconds)
enabledbooleanboolean true if the channel is enabled, false if it is disabled.
errorMessagestringstring error message for the channel. May be null.
optionsmap of string to stringobject with string attribute values control-system-specific configuration options that have been specified for the channel (the attribute name is the option name and the attribute value is the option value)
serverIdUUIDstring ID of the server that owns the channel
serverNamestringstring human-readable name of the server that owns the channel
statestringstring channel’s current state. One of destroyed, disabled, disconnected, error, initializing, or ok. null if status information is not available.
totalSamplesDroppedlongstring number of samples that have been dropped for the channel (since the last reinitialization). null if status information is not available.
totalSamplesSkippedBacklongstring number of samples that were discarded because they skipped back in time (since the last reinitialization). null if status information is not available.
totalSamplesWrittenlongstring number of samples that have been written for the channel (since the last reinitialization). null if status information is not available.

If information about the channel can currently not be retrieved, HTTP error code 503 (service unavailable) is returned and the response body is invalid. If the channel does not exist or if a server ID has been specified and the channel belongs to a different server, HTTP error code 404 (not found) is returned and the response body is invalid.

Example

Request:

GET /admin/api/1.0/channels/all/by-name/someChannel/

Response:

{
  "channelDataId": "ef126a63-375b-4f28-a1d1-17e8f42271a9",
  "channelName": "someChannel",
  "controlSystemName": "Channel Access",
  "controlSystemType": "channel_access",
  "decimationLevelToRetentionPeriod": {
    "0": "864000",
    "30": "31536000",
    "900": "0"
  },
  "enabled": true,
  "errorMessage": null,
  "options": {},
  "serverId": "7cf8f393-cd00-46ae-9343-53e9cb5793fd",
  "serverName": "myserver",
  "state": "OK",
  "totalSamplesDropped": "0",
  "totalSamplesSkippedBack": "1",
  "totalSamplesWritten": "42"
}