Web Service API Reference

The ScriptX.Services API controls printing, paper and printer settings, license registration and print job management. An OpenAPI (Swagger) specification is also available here which includes functionality to try out API calls to the MeadCo ScriptX.Services for Cloud server.

Many of the reference pages listed below include example code that runs on the page and allows API calls to be made to the MeadCo ScriptX.Services for Cloud server, together with options to run the code against your own installations of both ScriptX.Services for On-Premise Devices and ScriptX.Services for Windows PC.

See below for more information on how to download and install ScriptX.Services for Windows PC for evaluation purposes.

Authentication

ScriptX.Services for Cloud and ScriptX.Services for Windows PC require that an authorization header be included in the HTTP request using Basic authentication with a user name of the subscription/license identifier and no password. For example:

    headers = { "Authorization" : 
                    "Basic " + btoa("13598d2f-8724-467b-ae64-6e53e9e9f644" + ":") };

  • ScriptX Services for Cloud:
    Basic authentication is used for all API calls with username of subscription identifier and no password.
  • ScriptX Services for On Premise devices:
    No authentication is used or validated by the service.
  • ScriptX Services for Windows PC:
    Basic authentication is used for all API calls with a username of the supplied publisher license identifier and no password.

API Reference

Licensing

  • licensing (GET) - returns descriptive detail about the license in use (obtained from the authorization header)
  • licensing (POST) - installs/updates a client-side license
  • licensing/ping (GET) - used to check if the service is available (the call will succeed), or the options enabled for a license

PrintHtml

PrintPdf (requires v2.8* or later)

* Note: ScriptX.Services for Windows PC version 2.8.6.0 is currently available as a beta and can be downloaded using the button below.

Using ScriptX.Services for Windows PC with API sample code

An installer for the latest version (2.7.6.0) of ScriptX.Services for Windows PC can be downloaded using this button:

You will need Administrator rights to run the installer. Once installed, ScriptX.Services for Windows PC is available to any browser at any time. The default URL (as used in the API sample code) for the server is http://127.0.0.1:41191. If a certificate for localhost is available the server will also be available on https://localhost:41192.

For the sample code on these reference pages to function, an evaluation license must first be installed using the example code on the licensing (POST) reference page. The evaluation license can be used both for this site and for your own content delivered from your own localhost server. There are no specific requirements for your own content server on localhost - it may be IIS, Apache, Node, IIS Express etc etc.

Please note: unless you are running Chrome 70 or later or Edge 42 or later your browser will block calls to http:// from web pages delivered via https:// such as this website. In this case you will need to have a certificate for localhost installed so that the server will be available on https://localhost:41192. You should also change the URL for the sample code accordingly (entered values will be persisted between pages until the "Reset to default URL values" button is clicked).

For a detailed discussion on installation and configuration of ScriptX.Services for Windows PC please follow this link.

Also see our samples site for more detailed usage. An http:// version of the samples site is available here.