Request (GET)
End Point
[http/https]://[modified_cloudprntURL]/cloudprnt-setting.json?uid=<printer ID>&mac=<printer-mac-address>&replaced_path=<replaced-path>
https://cloudprnt.net/printer.php
https://cloudprnt.net/cloudprnt-setting.json?mac=00%3A11%3A62%3A1d%3A9a%3Ab7&replaced_path=printer.php
Query Parameter |
Value |
---|---|
uid |
A server specified UniqueID.
This will only be included if it has been set by the server.
|
mac |
Printer Ethernet MAC address |
replaced_path |
Part of the CloudPRNT URL set on the printer that has been replaced with [cloudprnt-setting.json] |
Client HTTP Request Body
none
Client HTTP Request Header
Please refer to Client HTTP Request Headers for detail.
Request Timeout
15 seconds
Request execution timing
A printer that supports CloudPRNT Version MQTT executes this GET request in the following cases.
When a printer is connected to the Internet after it is turned on.
When the “nextUrl” key is defined in the obtained configuration file. Execute this GET request again for the URL specified by the value.
Whenever a printer is operating normally and the time indicated by the value of the “reloadIntervalMin” key defined in the retrieved configuration file has elapsed.
When A printer is working with CloudPRNT Version MQTT and receives the MQTT message request-get-server-info .
When A printer is running with CloudPRNT Version MQTT and the communication with a MQTT broker is disconnected. Executed under the conditions described in Retry GET request .
When a printer tried to connect to a MQTT broker according to the setting file obtained from the server, but could not connect. Executed under the conditions described in ref:retry_server-info-get-request .
Printer action for server response
A printer operates as follows for a server response to this GET request.
Normal Case
- If the status code is 200 :
Operate according to the setting items obtained in the response body.
- If the status code is 404 (not found) :
The printer will start working with CloudPRNT Version HTTP .
Error Case
- If the request times out / doesn’t reach server :
This GET request will be retried according to Retry GET request .
- If the status code is 500 series (server error) :
This GET request will be retried according to Retry GET request .
- If the status code is anything else :
- For the first GET request after starting the printer :
The printer will start working with CloudPRNT Version HTTP .
- For GET requests after the CloudPRNT communication protocol used by the printer has been determined :
The printer will continue to work with the current CloudPRNT protocol.
Retry GET request
If a printer is running on CloudPRNT Version HTTP
- If a GET response can be obtained correctly and is working with CloudPRNT Version HTTP :
Execute this GET request according to the value of the “reloadIntervalMin” key.
- If a GET response cannot be obtained correctly and the operation starts with CloudPRNT Version HTTP :
Execute this GET request every 60 minutes.
If a server response status code is 500 series, or if a request times out / doesn’t reach server
A printer will retry the GET request under the following conditions.
Execute this GET request 5 seconds after getting a 500 series response or after request timeout.
Attempt the request up to 3 times. If that doesn’t complete, the printer will start working with CloudPRNT Version HTTP .
When communication with the MQTT broker is disconnected while the printer is running with CloudPRNT Version MQTT
When a printer tried to connect to a MQTT broker according to the response of this GET request but could not connect
A printer executes the GET request under the following conditions.
Execute the GET request 30 seconds after a broker connection is disconnected / failed. The following operations are performed according to the contents of the response.
If the response above instructs to connect to a broker, but it is not possible to connect again, the GET request will be executed after 1 minute.
Extend the interval of the GET request execution to 30sec, 1min, 2min, 4min, 8min. The maximum interval is 8 minutes.
Note
During the retry operation, the printer that is not connected to the MQTT broker operates CloudPRNT Version HTTP .