Show / Hide Table of Contents

Fetch Device Information

Http Method: GET
URL Path: /v1/a/{groupPath}/d/{appId}
Response Type: application/json
Required Permissions: ViewDevice

Returns information about a device within a 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.

appId

The {appId} parameter provides the Application Access ID of the device being queried.


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 within the specified device group and owned by the authenticated account can be found.
500 Server side error, such as inaccessible database. Please contact Star if this occurs frequently.

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"
    },
    "DeviceKey": "deviceKey"
}

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.
DeviceKey If per-device key authentication is enabled, this contains the key for that device, otherwise the field will be null or excluded from the response.

Usage Example

An example, using curl to retrieve a devices with Application Access ID e9042f5f 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/e9042f5f
In this article
Back to top Generated by DocFX