Get Printer Records

Gets printer records. The returned list depends on the query parameters, which serve as a filter.

For more information about this command, including descriptions of any path and request parameters, request body schema, response codes and schemas, and payload examples, refer to the online API reference for this command at the following web page:

Get printer records

URI

https://bartendercloud.com/api/printers

The bartendercloud.com domain that is referenced in the URI and in the code examples that follow must be replaced with the contents of the DataCenterURI claim that is extracted from your access token. For more information, refer to Extracting the DataCenterURI Claim.

Path Parameters

None.

Example

You can use any one of several methods to send the command to the server, as shown in the following code samples.

In each of the following samples, you must replace "____PASTE_YOUR_ACCESS_TOKEN_HERE____" with your access token. For more information about your access token, refer to Authentication.

The following cURL command returns a list of printer records (no query parameters are included).

Copy
--request GET \
--url 'https://bartendercloud.com/api/printers' \
--header 'Authorization: Bearer ____PASTE_YOUR_ACCESS_TOKEN_HERE____'

The following C# HttpClient example returns a list of five printer records (the value of the "limitCount" query parameter is set to 5).

Copy
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://bartendercloud.com/api/printers?limitCount=5"),
    Headers =
    {
        { "Authorization", "Bearer ____PASTE_YOUR_ACCESS_TOKEN_HERE____" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}