Get a Printer Record

Retrieves a printer record.

Note: 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 a printer record

URI

https://bartendercloud.com/api/printers/{printerId}

Note: 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

printerId

Type: String

Identifies the printer record to retrieve. Required.

Example

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

Note: 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 specific printer record by using the value of the printerId parameter.

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

The following C# HttpClient example returns a specific printer record by using the value of the printerId parameter.

Copy
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://bartendercloud.com/api/printers/{printerId}"),
    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);
}