List Devices
Http Method: GET
URL Path: /v1/a/{groupPath}/d
Response Type: application/json
Required Permissions: EnumDevices
Returns an array of devices connected to the specified Device Group. The Device Group must belong to the account authenticated by the API key.
Request
Path Parameters
groupPath
The {groupPath} parameter provides the path identifier of the Device Group being queried. This Device Group must be owned by the account authenticated by the calling API Key.
Response
Return Codes
| Code | Description |
|---|---|
| 200 | Success, check the returned body data for the device list |
| 400 | BadRequest, unable to process the request, check calling path |
| 403 | Forbidden, the authenticated API key does not have permission to access this resource. Check that the Key is correct and has suitable permissions. |
| 404 | Not Found, no Device Group owned by the authenticated account can be found with the path supplied. |
| 500 | Server side error, such as inaccessible database. Please contact Star if this occurs frequently. |
Note
Currently, a 404 will never be returned, a 400 or 403 would occur instead, but it is recommended to handle a 404 as it may be returned in the future.
Response Body
In case of a successful call, a JSON body will be returned by the service, containing an array of device information, which includes the last known status and connection time of the device.
Example
[{
"Mac": "deviceMac",
"Id": "deviceName",
"Status": {
"Online": true,
"CoverOpen": false,
"CompulsionSwitch": false,
"OverTemperature": false,
"Recoverable": true,
"CutterError": false,
"MechanicalError": false,
"ReceiveBufferOverflow": false,
"BlackMarkError": false,
"PresenterPaperJam": false,
"VoltageError": false,
"PaperEmpty": false,
"PaperLow": false
},
"AccessIdentifier": "appId",
"HorizontalResolution": 8.0,
"VerticalResolution": 8.0,
"PrintableWidthMM": 48.0,
"PaperWidthMM": 58.0,
"ClientType": "Star mC-Print2",
"LastConnection": 0.8726004,
"QueuedJobs": 0,
"GroupInfo": {
"Name": "groupName",
"MatchPath": "groupPath",
"Owner": "ownerAccount"
}
}]
Returns an array of device information objects, each object providing the following fields:
| Field | Info |
|---|---|
| Mac | String: Unique Mac address based identifier of the device. |
| Id | String: ID/Name that has been assigned to this device. |
| Status | Object: a printer status object representing the last reported status of this device. |
| AccessIdentifier | String: The Application Access ID of this device |
| HorizontalResolution | Number: Horizontal print resolution of the device in dots/mm |
| VerticalResolution | Number: Vertical print resolution of the device in dots/mm |
| PrintableWidthMM | Number: Printable area for this device in mm |
| PaperWidthMM | Number Width of paper installed into this device in mm |
| ClientType | String: Identifier of client type |
| LastConnection | Number: Time in seconds since the server last received an update from the device |
| QueuedJobs | Number: the number of pending jobs in the devices print queue |
| GroupInfo | Object: summary of information about the group that the device is owned by. |
Usage Example
An example, using curl to retrieve the list of devices from a group with a path name of examplegroup.
curl --header "Star-Api-Key: 6800ffd6-2367-4c8d-b067-d6a28151276a" https://beta.starprinter.online/v1/a/examplegroup/d