Custom Forms

Top  Previous  Next

In addition to the REST API, CirrusPrint offers a facility to create custom forms that use the API to perform actions.  The forms are HTML pages stored in the web/forms directory of the server.  A form is accessed with a URL

 

To access the form, use a specific URL path.  The internal Apache server, if it is running, would be accessed as:

 

http://server:8482/run/form/formname

https://server:8483/run/form/formname

 

An external Apache server is accessed via the configured name space defined in the system configuration:

 

https://server/namespace/run/form/formname

 

The server will present a login page, and will then display the file web/forms/formname.html.  The login requirements are the same as for the REST API, where the login can be:

 

A site user, either an admin user or another username in the format company\userid.  Note that the user must be enabled as an API user.
 
A location user, in logging in as locationID@companyID.  A location user has read-only access, so any forms would have to be read-only forms. There are exceptions to the read-only usage, for uploading work files and submitting jobs.
 

An example custom form is named "sendto", used to submit jobs to target devices for a company.  This form is supplied to demonstrate the use of the API, and also provides a very useful function of allowing authenticated users to send jobs to other users or printers configured for a company.