RESTful Web Service API

The webPDF server provides its functions in the form of RESTful web services. There are six web services for executing the server’s PDF functions. In addition, there is also a web service for creating the document storage for the user, and a web service for managing the documents in the storage.

 

The documentation for the RESTful API can be found online on the webPDF server under http://localhost:8080/webPDF/help/restful/

 

The functions of the webPDF server for the RESTful API are accessed via a Uniform Resource Identifier (URI). The different URIs of the web services can be executed via the HTTP methods PUT, GET, POST and DELETE.

 

Passing of parameters

 

Data is exchanged between the web services and the client application, i.e., web services are controlled with parameters, with the use of JSON (JavaScript Object Notation) (http://www.json.org/).

 

The execution and the behaviour of the web services can be controlled in the JSON data structures (objects) by means of the individual elements and parameters with values.

 

The data’s structure is defined as an XML schema (http://schema.webpdf.de/1.0/operation.xsd) and is used as a corresponding JSON structure for the REST API. For the XML structure in the definition of the web service parameters, you will find a corresponding JSON structure for the parameters.

 

Example of a JSON structure when calling the “Converter" web service

 

{
"converter": {
  "pages": "*",
  "accessPassword": "xyz",
  "compression": true,
  "dpi": 300,
  "embedFonts": true,
  "jpegQuality": 90,
  "reduceResolution": true,
  "html": {
    "adjustFonts": true,
    "attachmentMode": "convert",
    "baseURL": "http://www.webpdf.net/",
    "downloadImages": true,

    "language":"en"
   }

 }
}

 

hint

The easiest way to track the use of the REST API is on the webPDFportal.

 

A description of all transfer and return parameters can be found in the online documentation of the RESTful API based on the tool "Swagger" (http://swagger.io/).