Skip to main content
POST
/
graphql#ListPrinters
List printers
curl --request POST \
  --url 'https://clarus-api.com/graphql#ListPrinters' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "query": "query($filter: PrinterFilterType) { printers { all(filter: $filter) { edges { node { id name description is_default supports_documents supports_labels status integration { id } } } } } }"
}
'
{
  "data": {
    "printers": {
      "all": {
        "edges": [
          {
            "node": {
              "id": "3",
              "name": "Zebra ZD420 - Packing",
              "description": "Label printer at pack station 2",
              "is_default": true,
              "supports_documents": false,
              "supports_labels": true,
              "status": "AVAILABLE",
              "integration": {
                "id": "12"
              }
            }
          }
        ]
      }
    }
  }
}

Query Structure

query($filter: PrinterFilterType) {
  printers {
    all(filter: $filter) {
      edges {
        node {
          id
          name
          description
          is_default
          supports_documents
          supports_labels
          status
          integration { id }
        }
      }
    }
  }
}

Filter Argument

All filters are passed inside the filter argument. Each filter field accepts an input object with operators (e.g. eq, ilike, from, to, between):
{
  "filter": {
    "id": {
      "eq": "value"
    }
  }
}

Available Filters

FilterInput TypeOperatorsDescription
idIdInputTypeeq, in, gt, gteq, lt, lteq, filledPrinter ID
integration_idIdInputTypeeq, in, gt, gteq, lt, lteq, filledCloud Print integration ID
integration_nameStringInputTypeeq, ilike, like, in, betweenCloud Print integration name
nameStringInputTypeeq, ilike, like, in, betweenPrinter name
descriptionStringInputTypeeq, ilike, like, in, betweenPrinter description
is_defaultBooleanInputTypeeqWhether this is the default printer
supports_documentsBooleanInputTypeeqWhether the printer can print documents
supports_labelsBooleanInputTypeeqWhether the printer can print labels
statusStatusInputTypeeq, inPrinter status (enum input — AVAILABLE, ACCESS_REVOKED)
More fields and filters available via GraphQL introspection.

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json
query
string<textarea>
required

GraphQL query string

Example:

"query($filter: PrinterFilterType) { printers { all(filter: $filter) { edges { node { id name description is_default supports_documents supports_labels status integration { id } } } } } }"

variables
object

Query variables including the filter object

Example:
{
"filter": { "name": { "ilike": "Zebra" } }
}

Response

Successful GraphQL response

data
object

Query result data

errors
object[]

GraphQL errors, if any