### Run PrintNode Client with Web Interface (Linux) Source: https://www.printnode.com/en/docs/reading-usb-scales-over-the-internet Enable the web interface for initial scale setup on Linux. This is often automatic if installed as a service. ```bash ./PrintNode --web-interface ``` -------------------------------- ### Run PrintNode Client with Web Interface (Windows) Source: https://www.printnode.com/en/docs/reading-usb-scales-over-the-internet Enable the web interface for initial scale setup on Windows. This is often automatic if installed as a service. ```bash PrintNode.exe --web-interface ``` -------------------------------- ### Example Authentication URL GET Request Source: https://www.printnode.com/en/docs/api/curl This is an example of the HTTPS GET request your authentication URL must respond to. It includes a client identifier, version, and edition as URL parameters. ```HTTP GET https://api.printnode.com/client/key/a6860624-3838-4efd-b918-f4de765cf192?version=4.7.1&edition=printnode ``` -------------------------------- ### Run PrintNode Client with Web Interface (macOS) Source: https://www.printnode.com/en/docs/reading-usb-scales-over-the-internet Enable the web interface for initial scale setup on macOS. This is often automatic if installed as a service. ```bash open /Applications/PrintNode.app --args --web-interface ``` -------------------------------- ### Install Nano Text Editor Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Install the nano text editor to easily modify configuration files in the terminal. ```bash sudo apt install nano -y ``` -------------------------------- ### Install CUPS and Printer Configuration Tools Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Install the CUPS printing system and the system-config-printer utility required for printer management on Chrome OS Linux. ```bash sudo apt install cups -y ``` ```bash sudo apt install system-config-printer -y ``` -------------------------------- ### Start PrintNode Service Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Start the PrintNode service using the service command. ```bash sudo service PrintNode start ``` -------------------------------- ### Pagination Example Source: https://www.printnode.com/en/docs/api/curl Demonstrates how to use query parameters to control the pagination of results for endpoints that return a set of records. ```APIDOC ## Pagination By default, endpoints which return a set of records (such as `GET /computers` or `GET /printjobs`) will return up to 100 records, in descending id order. You can control the range of records returned using the URL query parameters `limit`, `after` and `dir`. ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of rows that will be returned by the endpoint. Default is 100. - **dir** (string) - Optional - Controls the ordering - `asc` for ascending, `desc` for descending. Default is `desc`. - **after** (integer) - Optional - Controls the point at which records start. You would usually set this to the last id in the previous set of records retrieved, in order to look at the next "page" of records. Default is blank. ### Example Request cURL ```bash curl https://api.printnode.com/printjobs?after=123456&dir=asc&limit=20 \ -u YOUR_API_KEY: ``` This returns (up to) 20 print jobs, starting from the record after id 123456, in ascending order. ``` -------------------------------- ### Run PrintNode Client Source: https://www.printnode.com/en/docs/remote-printing-with-raspberry-pi After extracting the archive, navigate into the created directory and run this command to start the PrintNode Client application. ```bash ./PrintNode ``` -------------------------------- ### Navigate to PrintNode Client Directory Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Change the current directory to the unpacked PrintNode client folder to prepare for starting the application. ```bash cd PrintNode-4.24.0-beta-chrome_os-x86_64 ``` -------------------------------- ### Example Response for Unauthorized Access Source: https://www.printnode.com/en/docs/api/curl Shows the response when authentication credentials are invalid or missing. ```http HTTP/1.1 401 Unauthorized Date: Thu, 20 Mar 2014 16:54:06 GMT Content-Type: application/json Content-Length: 87 Connection: keep-alive WWW-Authenticate: Basic realm="Api" { "code": "InvalidCredentials", "message": "Expects HTTP Basic authentication." } ``` -------------------------------- ### Get Client Key Source: https://www.printnode.com/en/docs/api/curl Retrieve a client key for delegated authentication. This is useful for creating user accounts on-the-fly. ```bash curl "https://api.printnode.com/client/key/5470de8f-40be-4c0e-9712-46806d9e8d42?version=4.7.1&edition=printnode" \ -H 'X-Child-Account-By-Id: 477' \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Get All Supported Client Versions Source: https://www.printnode.com/en/docs/api/curl Use this cURL command to retrieve a list of all client versions available for your account. Ensure you replace the placeholder API key with your actual key. ```bash curl https://api.printnode.com/download/clients \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Start PrintNode Client in Headless Mode Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Run the PrintNode client in headless mode with web interface enabled. This command should be executed from within the PrintNode client directory. ```bash ./PrintNode --headless --web-interface ``` -------------------------------- ### Update and Upgrade Linux Environment Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Before installing components, update your Linux package list and upgrade existing packages. Press 'y' and Enter if prompted. ```bash sudo apt update ``` ```bash sudo apt upgrade ``` -------------------------------- ### Example Response for Rate Limiting Source: https://www.printnode.com/en/docs/api/curl Illustrates the HTTP response when the API request rate limit is exceeded. ```http HTTP/1.1 429 Too Many Requests Date: Thu, 20 Mar 2014 16:20:07 GMT Content-Type: application/json Content-Length: 95 Connection: keep-alive { "code": "TooManyRequests", "message": "You have exceeded your request rate of 10 r/s." } ``` -------------------------------- ### Example 200 OK Response for Print Job States Source: https://www.printnode.com/en/docs/api/curl This is a sample successful response when querying for print job states. It details the attributes of a 'new' state. ```json [ { "printJobId": 624, "state": "new", "message": null, "data": null, "clientVersion": null, "createTimestamp": "2015-11-26T16:55:05.757Z", "age": 0 } ] ``` -------------------------------- ### Example cURL Request for Paginated Print Jobs Source: https://www.printnode.com/en/docs/api/curl Demonstrates how to fetch a specific range of print jobs using query parameters like 'after', 'dir', and 'limit'. ```bash curl https://api.printnode.com/printjobs?after=123456&dir=asc&limit=20 \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### GET /download/clients Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of all client versions supported for your account. This endpoint is useful for understanding the available software versions for integration. ```APIDOC ## GET /download/clients ### Description Retrieves a list of all client versions supported for your account. ### Method GET ### Endpoint /download/clients ### Parameters ### Request Example ```bash curl https://api.printnode.com/download/clients \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the client version. - **enabled** (boolean) - Indicates if the client version is currently enabled. - **edition** (string) - The edition of the client (e.g., 'tyrell'). - **version** (string) - The version number of the client software. - **os** (string) - The operating system the client version is for (e.g., 'osx', 'linux', 'windows'). - **filename** (string) - The name of the client file. - **filesize** (integer) - The size of the client file in bytes. - **sha1** (string) - The SHA1 hash of the client file. - **releaseTimestamp** (string) - The timestamp when the client version was released. - **url** (string) - The URL to download the client file. #### Response Example ```json [ { "id": 18, "enabled": false, "edition": "tyrell", "version": "3.3.0", "os": "osx", "filename": "TyrellCorporation-3.3.0+f71.dmg", "filesize": 14665374, "sha1": "dda838dc045e1b0b31de249a686d42549fd701e3", "releaseTimestamp": "2015-11-16T24:14:19.235Z", "url": "https://app.printnode.com/bundles/printnodemain/downloads/3.3.0/tyrell/TyrellCorporation-3.3.0+f71.dmg" } ] ``` ``` -------------------------------- ### Get Latest Client Information Source: https://www.printnode.com/en/docs/api/curl Fetch information about the latest client version for a specific operating system. This helps in managing client downloads for custom-branded clients. ```bash curl https://api.printnode.com/download/client/windows \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Printer Capabilities Object Example Source: https://www.printnode.com/en/docs/api/curl This object shows the capabilities of a printer, including supported paper sizes, color, duplex printing, and print rate. ```json { "bins": [ "Auto", "Multipurpose Tray", "Tray 1", "Tray 2" ], "collate": true, "color": true, "copies": 999, "dpis": [ "300x300", "600x600" ], "duplex": true, "extent": [ [640, 900], [2970, 13208] ], "medias": [], "nup": [], "papers": { "Letter": [2159, 2794], "Tabloid": [2794, 4318], "Legal": [2159, 3556], "Statement": [1397, 2159], "Executive": [1842, 2667], "A3": [2970, 4200], "A4": [2100, 2970], "A5": [1480, 2100], "B4": [2570, 3640], "B5": [1820, 2570], "Legal13": [2159, 3302], "Com-10": [1047, 2413], "DL": [1100, 2200], "C5": [1620, 2290], "C4": [2290, 3240], "Hagaki": [1000, 1480], "A6": [1050, 1480], "Kakugata #2": [2400, 3320], "Kakugata #3": [2160, 2770], "Nagagata #3": [1200, 2350], "Nagagata #4": [900, 2050], "Oufuku Hagaki": [2000, 1480], "Yougata #4": [1050, 2350], "User Defined Size": [2100, 2970], "B6": [1280, 1820], "B6 Half": [640, 1820], "Yougata #0": [1200, 2350], "Legal 13.5": [2159, 3429], "Index Card": [762, 1270], "16K": [1840, 2600], "16K 195 x 270mm": [1950, 2700], "16K 197 x 273mm": [1970, 2730], "8K": [2600, 3680], "8K 270 x 390mm": [2700, 3900], "8K 273 x 394mm": [2730, 3940], "Nagagata #40": [900, 2250], "Banner": [2100, 9000], "Banner 215.0 x 900.0mm": [2150, 9000], "Banner 215.0 x 1200.0mm": [2150, 12000], "Banner 297.0 x 900.0mm": [2970, 9000], "Banner 297.0 x 1200.0mm": [2970, 12000] }, "printrate": { "unit": "ppm", "rate": 23 }, "supports_custom_paper_size": false } ``` -------------------------------- ### Getting the Latest Client Information Source: https://www.printnode.com/en/docs/api/curl Fetches information about the latest available client version for a specified operating system. This is useful for managing client downloads. ```APIDOC ## GET /download/clients/OPERATING_SYSTEM ### Description Retrieves information about the latest client version available for a given operating system. This endpoint is part of managing client downloads and updates. ### Method GET ### Endpoint `/download/clients/{OPERATING_SYSTEM}` ### Parameters #### Path Parameters - **OPERATING_SYSTEM** (string) - Required - The target operating system. Valid values are `osx` and `windows`. ### Request Example cURL ```bash curl https://api.printnode.com/download/client/windows \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` ### Response #### Success Response (200) - **edition** (string) - The edition name of the client. - **version** (string) - The version number of the client. - **os** (string) - The operating system for which the client is available. - **filename** (string) - The name of the client file. - **filesize** (integer) - The size of the client file in bytes. - **sha1** (string) - The SHA1 hash of the client file. - **releaseTimestamp** (string) - The timestamp when the client was released. - **url** (string) - The URL to download the client. #### Response Example ```json { "edition": "tyrell", "version": "3.3.0", "os": "windows", "filename": "TyrellCorporation-3.3.0+050.exe", "filesize": 14582098, "sha1": "22d34b7644e6a7cd3b9979d8f3629f98832650be", "releaseTimestamp": "2015-11-16T24:14:19.235Z", "url": "https://app.printnode.com/download/client/tyrell/windows" } ``` ``` -------------------------------- ### Get API Key using cURL Source: https://www.printnode.com/en/docs/api/curl This cURL command retrieves an existing API Key for a specified child account. The API key name should be substituted for 'description'. ```bash curl https://api.printnode.com/account/apikey/description \ -H 'X-Child-Account-By-Id: 477' \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Example cURL Request for Print Job States Source: https://www.printnode.com/en/docs/api/curl This snippet shows how to retrieve print job states using cURL. It includes authentication and a limit parameter. ```bash curl https://api.printnode.com/printjobs/states?limit=1 \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Getting a Client Key Source: https://www.printnode.com/en/docs/api/curl Retrieves a client key from PrintNode, typically used for Delegated Client Authentication. This allows for on-the-fly creation of child accounts. ```APIDOC ## GET /client/key/UUID ### Description Retrieves a client key for a specific UUID, used in Delegated Client Authentication. This endpoint can facilitate the creation of child accounts on-the-fly. ### Method GET ### Endpoint `/client/key/{UUID}` ### Parameters #### Query Parameters - **edition** (string) - Optional - The edition of the client. - **version** (string) - Optional - The version of the client. #### Headers - **X-Child-Account-By-Id** (integer) - Optional - The ID of the child account to use or create. ### Request Example cURL ```bash curl "https://api.printnode.com/client/key/5470de8f-40be-4c0e-9712-46806d9e8d42?version=4.7.1&edition=printnode" \ -H 'X-Child-Account-By-Id: 477' \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` ### Response #### Success Response (200) - **ck-X98csd4gDb+3OpEkNjKZ1J5SskXLhxCUNRTGdPy+y1ue** (string) - The client key. #### Response Example ```json "ck-X98csd4gDb+3OpEkNjKZ1J5SskXLhxCUNRTGdPy+y1ue" ``` ``` -------------------------------- ### Send a Print Job via HTTP Request Source: https://www.printnode.com/en/docs/gcp Use this example to send a print job using an HTTP request to the PrintNode API. This is a common use case for web applications needing automated printing. ```http curl -X POST https://api.printnode.com/prints \ -H "Content-Type: application/json" \ -H "Authorization: Basic YOUR_API_KEY" \ -d "{ \"printerId\": 12345, \"title\": \"My First Print Job\", \"content\": \"Hello World!\", \"contentType\": \"raw\" }" ``` -------------------------------- ### Get Controllable Accounts Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of accounts that can be controlled. ```APIDOC ## GET /account/controllable ### Description Retrieves a list of accounts that can be controlled. ### Method GET ### Endpoint /account/controllable ### Parameters None ### Request Example None ### Response #### Success Response (200) - **accounts** (array) - A list of controllable account objects. #### Response Example { "accounts": [ { "id": 12345, "name": "Controllable Account" } ] } ``` -------------------------------- ### Get Account State Source: https://www.printnode.com/en/docs/api/curl Retrieves the current state of the account. ```APIDOC ## GET /account/state ### Description Retrieves the current state of the account. ### Method GET ### Endpoint /account/state ### Parameters None ### Request Example None ### Response #### Success Response (200) - **state** (string) - The current state of the account (e.g., 'active', 'suspended'). #### Response Example { "state": "active" } ``` -------------------------------- ### Copy PrintNode Client Files Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Copy the PrintNode Client files and the init.sh script to their recommended locations in the filesystem. ```bash cd ``` ```bash sudo cp -r PrintNode-4.24.0-beta-chrome_os-x86_64 /usr/local/PrintNode ``` ```bash sudo cp /usr/local/PrintNode/init.sh /etc/init.d/PrintNode ``` -------------------------------- ### Get API Key Source: https://www.printnode.com/en/docs/api/curl Retrieves details for a specific API key. ```APIDOC ## GET /account/apikey/{DESCRIPTION} ### Description Retrieves details for a specific API key. ### Method GET ### Endpoint /account/apikey/{DESCRIPTION} ### Parameters #### Path Parameters - **DESCRIPTION** (string) - Required - The description of the API key. ### Request Example None ### Response #### Success Response (200) - **apiKey** (object) - The API key object. #### Response Example { "apiKey": { "key": "44784dd8d88be9631046ff83e9044419ff824b10", "description": "My Test Key" } } ``` -------------------------------- ### Get Account Tag Source: https://www.printnode.com/en/docs/api/curl Retrieves the value of a specific account tag. ```APIDOC ## GET /account/tag/{NAME} ### Description Retrieves the value of a specific account tag. ### Method GET ### Endpoint /account/tag/{NAME} ### Parameters #### Path Parameters - **NAME** (string) - Required - The name of the tag. ### Request Example None ### Response #### Success Response (200) - **value** (string) - The value of the tag. #### Response Example { "value": "example_tag_value" } ``` -------------------------------- ### Get Current Account Information Source: https://www.printnode.com/en/docs/api/curl Retrieves information about the currently authenticated account. ```APIDOC ## GET /whoami ### Description Retrieves information about the currently authenticated account. ### Method GET ### Endpoint /whoami ``` -------------------------------- ### Get Print Job States Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of print job states. You can limit the number of results returned. ```APIDOC ## GET /printjobs/states ### Description Retrieves a list of print job states. This endpoint allows for pagination and filtering. ### Method GET ### Endpoint /printjobs/states ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of states to return. ### Request Example ```bash curl https://api.printnode.com/printjobs/states?limit=1 \ -u YOUR_API_KEY: ``` ### Response #### Success Response (200) - **printJobId** (Integer) - The id of the print job this state relates to. - **state** (String) - The current state of the print job (e.g., `new`, `sent_to_client`, `done`, `error`, `expired`). - **message** (String) - Additional information about the state. - **data** (Object) - Reserved for future use. - **clientVersion** (String) - The version of the PrintNode Client that generated the state, or `null` if generated by the server. - **createTimestamp** (String) - The timestamp when the state was reported or generated. - **age** (Integer) - The time elapsed in milliseconds since the print job's `new` state. #### Response Example ```json [ { "printJobId": 624, "state": "new", "message": null, "data": null, "clientVersion": null, "createTimestamp": "2015-11-26T16:55:05.757Z", "age": 0 } ] ``` ``` -------------------------------- ### List Available Clients Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of all available client download options. ```APIDOC ## GET /download/clients ### Description Retrieves a list of all available client download options. ### Method GET ### Endpoint /download/clients ### Parameters None ### Request Example None ### Response #### Success Response (200) - **clients** (array) - A list of available client download objects. #### Response Example { "clients": [ { "id": "win-latest", "os": "windows", "version": "latest" } ] } ``` -------------------------------- ### Create API Key using cURL Source: https://www.printnode.com/en/docs/api/curl Use this cURL command to create a new API Key for a child account. Ensure you replace 'description' with the desired key name and provide the correct account and API key credentials. ```bash curl -X POST https://api.printnode.com/account/apikey/description \ -H 'X-Child-Account-By-Id: 477' \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Get API Key Source: https://www.printnode.com/en/docs/api/curl Retrieves an existing API Key for a child account. The key is identified by a name provided in the URL. ```APIDOC ## GET /account/apikey/description ### Description Retrieves an existing API Key for a child account, identified by the `description` in the URL. ### Method GET ### Endpoint /account/apikey/description ### Request Example ```bash curl https://api.printnode.com/account/apikey/description \ -H 'X-Child-Account-By-Id: 477' \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` ### Response #### Success Response (200) Returns the API Key string upon successful retrieval. #### Response Example ``` "23d5b4259465ca7bfd36caf761f05db5845d1b16" ``` ``` -------------------------------- ### Create Account Source: https://www.printnode.com/en/docs/api/curl Creates a new account. ```APIDOC ## POST /account ### Description Creates a new account. ### Method POST ### Endpoint /account ### Parameters #### Request Body - **email** (string) - Required - The email address for the new account. - **password** (string) - Required - The password for the new account. - **name** (string) - Optional - The name of the account. ### Request Example ```json { "email": "newuser@example.com", "password": "securepassword", "name": "New Account" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **accountId** (integer) - The ID of the newly created account. #### Response Example { "message": "Account created successfully.", "accountId": 12346 } ``` -------------------------------- ### Example Response for Bad Request (Invalid JSON) Source: https://www.printnode.com/en/docs/api/curl Illustrates the response when the API receives malformed JSON in the request body. ```http HTTP/1.1 400 Bad Request Date: Thu, 20 Mar 2014 16:55:43 GMT Content-Type: application/json Content-Length: 86 Connection: keep-alive { "code": "InvalidContent", "message": "Invalid JSON: Unexpected end of input" } ``` -------------------------------- ### View All Webhooks Source: https://www.printnode.com/en/docs/api/curl Use this cURL command to retrieve a list of all configured webhooks for your account. The response includes details about each webhook's configuration and performance metrics. ```bash curl https://api.printnode.com/webhooks \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Edit init.sh Configuration Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Use the nano editor to modify the init.sh file, specifically updating the line that specifies the user with your username. ```bash sudo nano /etc/init.d/PrintNode ``` -------------------------------- ### Getting All Scales for a Computer Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of all weighing scales attached to a specified computer. This endpoint can return data for multiple scales. ```APIDOC ## GET /computer/{COMPUTER ID}/scales ### Description Retrieves a list of all weighing scales attached to a specified computer. This endpoint can return data for multiple scales. ### Method GET ### Endpoint /computer/{COMPUTER ID}/scales ### Parameters #### Path Parameters - **COMPUTER ID** (integer) - Required - The ID of the computer to query scales for. ### Response #### Success Response (200) - **scales** (array) - A list of scale data objects. ### Response Example ```json [ { "massArray": [ 125000000, 5000000 ], "computerIdInteger": 0, "vendorText": "Example Vendor", "vendorIdInteger": 1234, "productIdInteger": 5678, "portText": "USB1", "deviceNameText": "Example Scale Model", "deviceNumInteger": 0, "countInteger": null, "measurementObject": { "g": 125000000000 }, "clientReportedCreateTimestampDateTime": "2023-10-27T10:00:00Z", "ntpOffsetInteger": null, "ageOfDataInteger": 10 } ] ``` ``` -------------------------------- ### Get Print Job States Source: https://www.printnode.com/en/docs/api/curl Retrieves the states of print jobs. This can be done for all print jobs or for a specific set of print jobs. ```APIDOC ## GET /printjobs/states ### Description Retrieves the states of all print jobs. ### Method GET ### Endpoint /printjobs/states ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **states** (object) - An object containing the states of print jobs. #### Response Example ```json { "job1": "completed", "job2": "pending" } ``` ``` ```APIDOC ## GET /printjobs/`PRINT JOB SET`/states ### Description Retrieves the state of a specific print job. ### Method GET ### Endpoint /printjobs/`PRINT JOB SET`/states ### Parameters #### Path Parameters - **PRINT JOB SET** (string) - The ID of the print job. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **state** (string) - The state of the specified print job. #### Response Example ```json "completed" ``` ``` -------------------------------- ### Get All Scales for a Computer Source: https://www.printnode.com/en/docs/api/curl Retrieves an array of the most recent scale data objects produced by this computer. Returns an empty array if no scales are attached. ```bash curl "https://api.printnode.com/computer/0/scales/PrintNode%20Test%20Scale" \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Download PrintNode Client for Chrome OS Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Use this command to download the PrintNode client archive for Chrome OS. Ensure you are in the Linux terminal. ```bash wget https://dl.printnode.com/client/printnode/4.24.0/PrintNode-4.24.0-beta-chrome_os-x86_64.tar.gz ``` -------------------------------- ### Create API Key Source: https://www.printnode.com/en/docs/api/curl Creates a new API key. ```APIDOC ## POST /account/apikey/{DESCRIPTION} ### Description Creates a new API key. ### Method POST ### Endpoint /account/apikey/{DESCRIPTION} ### Parameters #### Path Parameters - **DESCRIPTION** (string) - Required - The description for the new API key. ### Request Example None ### Response #### Success Response (200) - **apiKey** (object) - The newly created API key object. #### Response Example { "apiKey": { "key": "a1b2c3d4e5f678901234567890abcdef", "description": "My New Key" } } ``` -------------------------------- ### Get Current User Information Source: https://www.printnode.com/en/docs/api/curl Retrieves information about the currently authenticated user. This is useful for verifying API key validity and understanding account details. ```APIDOC ## GET /whoami ### Description Retrieves information about the currently authenticated user. ### Method GET ### Endpoint /whoami ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the user. - **firstname** (string) - The first name of the user. - **lastname** (string) - The last name of the user. - **email** (string) - The email address of the user. - **canCreateSubAccounts** (boolean) - Indicates if the user can create sub-accounts. - **creatorEmail** (string) - The email of the user's creator, if applicable. - **creatorRef** (string) - A reference to the user's creator, if applicable. - **childAccounts** (array) - A list of child accounts associated with the user. - **credits** (integer) - The number of credits available to the user. - **numComputers** (integer) - The number of computers connected to the user's account. - **totalPrints** (integer) - The total number of prints made by the user. - **versions** (array) - Information about software versions associated with the account. - **connected** (array) - Details about connected services or devices. - **Tags** (array) - Tags associated with the user account. - **state** (string) - The current state of the user account (e.g., 'active'). - **permissions** (array) - A list of permissions granted to the user. ### Response Example { "id": 433, "firstname": "Peter", "lastname": "Tuthill", "email": "peter@omlet.co.uk", "canCreateSubAccounts": false, "creatorEmail": null, "creatorRef": null, "childAccounts": [], "credits": 10134, "numComputers": 3, "totalPrints": 110, "versions": [], "connected": [], "Tags": [], "state": "active", "permissions": [ "Unrestricted" ] } ``` -------------------------------- ### Download Client Source: https://www.printnode.com/en/docs/api/curl Downloads a specific client for a given operating system. ```APIDOC ## GET /download/client/{OPERATING SYSTEM} ### Description Downloads a specific client for a given operating system. ### Method GET ### Endpoint /download/client/{OPERATING SYSTEM} ### Parameters #### Path Parameters - **OPERATING SYSTEM** (string) - Required - The operating system for which to download the client (e.g., 'windows', 'macos', 'linux'). ### Request Example None ### Response #### Success Response (200) - **downloadUrl** (string) - The URL to download the client installer. #### Response Example { "downloadUrl": "https://cdn.printnode.com/client/windows/latest" } ``` -------------------------------- ### Create a Webhook Source: https://www.printnode.com/en/docs/api/curl Use this cURL command to create a new webhook. Specify the target URL, a secret for verification, and the message types to trigger the webhook. The secret allows you to verify that messages originate from PrintNode. ```bash curl -X POST -u 44784dd8d88be9631046ff83e9044419ff824b10: https://api.printnode.com/webhook -d '{ "url": "http://www.myserver.com", "secret": "password", "messages": ["*"] }' ``` -------------------------------- ### Create a Child Account (JSON) Source: https://www.printnode.com/en/docs/api/curl This cURL command demonstrates creating a new child account using a JSON payload. It includes details for the account, API keys, and tags. ```bash curl -X POST https://api.printnode.com/account \ -u 44784dd8d88be9631046ff83e9044419ff824b10: \ -H "Content-Type: application/json" \ -d '{ "Account": { "firstname": "Ada", "lastname": "Lovelace", "email": "ada.lovelace@myfirstprogram.com", "password": "password", "creatorRef": "ada.lovelace" }, "ApiKeys": [ "development", "production" ], "Tags": { "likes": "pianos" } }' ``` -------------------------------- ### Simulate Scale Measurement Source: https://www.printnode.com/en/docs/api/curl Simulates a single measurement from a virtual scale for development and testing. The simulated measurement is available via the API and websockets for 45 seconds. ```bash PUT /scale ``` -------------------------------- ### Get Account Information with cURL Source: https://www.printnode.com/en/docs/api/curl Use this cURL command to retrieve details about your PrintNode account. Ensure you replace the placeholder API key with your actual key. ```bash curl https://api.printnode.com/whoami \ -u 44784dd8d88be9631046ff83e9044419ff824b10: ``` -------------------------------- ### Launch Printer Configuration Utility Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Execute the system-config-printer program to add, configure, or manage printers on your Chromebook's Linux environment. ```bash sudo system-config-printer ``` -------------------------------- ### Viewing Webhooks Source: https://www.printnode.com/en/docs/api/curl Retrieves a list of all configured webhooks for the account. Each webhook object contains details about its configuration and performance metrics. ```APIDOC ## GET /webhooks ### Description Retrieves a list of all configured webhooks for the account. Each webhook object contains details about its configuration and performance metrics. ### Method GET ### Endpoint /webhooks ### Parameters None ### Request Example ```bash curl https://api.printnode.com/webhooks \ -u YOUR_API_KEY: ``` ### Response #### Success Response (200) An array of webhook objects. Each object includes: - **url** (string): The URL of the webhook's target. - **secret** (string): A string used for verifying webhook requests. - **messages** (array of strings): Message types that trigger the webhook. '*' triggers all message types. - **webhookId** (integer): A system-generated ID for the webhook. - **counts** (object): Contains metrics like `receivedEvents`, `droppedEvents`, `successfulRequests`, and `failedRequests`. - **exp1d**, **exp1h**, **exp5m**, **exp7d** (objects): Performance metrics for different time periods (e.g., last 1 day, 1 hour, 5 minutes, 7 days). #### Response Example ```json [ { "counts": { "droppedEvents": 0, "failedRequests": 0, "receivedEvents": 0, "successfulRequests": 0 }, "exp1d": { "droppedEvents": 0, "failedRequests": 0, "receivedEvents": 0, "successfulRequests": 0 }, "exp1h": { "droppedEvents": 0, "failedRequests": 0, "receivedEvents": 0, "successfulRequests": 0 }, "exp5m": { "droppedEvents": 0, "failedRequests": 0, "receivedEvents": 0, "successfulRequests": 0 }, "exp7d": { "droppedEvents": 0, "failedRequests": 0, "receivedEvents": 0, "successfulRequests": 0 }, "messages": ["*"], "secret": "password", "url": "http://10.1.1.2:8000", "webhookId": 11 } ] ``` ``` -------------------------------- ### Create Account Tag Source: https://www.printnode.com/en/docs/api/curl Creates or updates a specific account tag. ```APIDOC ## POST /account/tag/{NAME} ### Description Creates or updates a specific account tag. ### Method POST ### Endpoint /account/tag/{NAME} ### Parameters #### Path Parameters - **NAME** (string) - Required - The name of the tag. #### Request Body - **value** (string) - Required - The value of the tag. ### Request Example ```json { "value": "new_tag_value" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example { "message": "Account tag created/updated successfully." } ``` -------------------------------- ### View PrintNode Log Files Source: https://www.printnode.com/en/docs/remote-printing-with-chromebook Examine the log and error files for PrintNode to troubleshoot issues. Use 'less' to view the contents. ```bash less /var/log/PrintNode.log ``` ```bash less /var/log/PrintNode.err ```