RSJ LPSNG provides the following web services:
| Parameter | Value | | --- | --- | | URL | /produceLabel | | Method | GET or POST | | Content-Type | multipart/form-data | | id | Layout Id | | _targetFormat | pdf or png | | _width | For PNG: Width in pixels. Default: 1000 | | _height | For PNG: Height in pixels. Default: 1000 | | Label layout parameters | Their value |
This webservice request returns the rendered label (in PDF or PNG format) in the response.
| Parameter |Value | | --- | --- | | URL | /printLabel | | Method | GET oder POST | | Content-Type | multipart/form-data | | id | Layout Id | | _targetDevice | Printer name (from configuration file) | | _action | print or raw Default: print | | Label layout parameters | Their value |
Renders and prints the label on a printer directly connected to the server. The _action raw responds with printer specific print file, so it can be saved with the client browser (instead of printing it)
This function is only available in the On Premises edition of RSJ LPSNG.
| Parameter | Value | | --- | --- | | URL | /submit | | Method | POST | | Content-Type | multipart/form-data | | title | Job description for display | | format | Layout Id | | data | Data (in CSV, JSON, XML or Excel) | | callback | optional JSONP callback | | oauth_token | OAuth2 access token (if not specified in Authorization HTTP header in OAuth scheme) |
This webservice requests submits a new print job (data file with one or more data records) to the job queue. The response will be available in a few seconds (and is routed as configured).
RSJ LPSNG uses the standard OAuth2 protocol to securely integrate muliple independed external application for a multitude of users.
RSJ LPSNG uses this authentication as basis for it's routing decisions
Developers can register an external application with RSJ LPS NG online by providing:
They will receive:
End users can online authorize external applications to use RSJ LPS NG on their behalve.
The external application provides the following information with the redirect:
| Parameter | Value | |-----------| --- | | URL | /authorize | | Method GET | | clientid | Client Id (from application registration) | | responsetype | code | | scope | full | | redir_uri | Redirect URI (must match URI in application registration) | | state | Optional context information for callback |
After succesfull authorization, the end user session is redirected to the external application with the following parameters:
The external application calls a webservice to exchanges the temporary authorization with the permanent refresh token by providing:
The external application permanently stores the refresh token for the end user
| Parameter | Value | | --- | --- | | URL | /auth | | Method | POST | | granttype | refreshtoken | | refresh_token | Refresh token (from application authorization) | | Returns | JSON structure |
The external application must exchange the refresh token for an temporarily (60 minutes) valid access token before accessing RSJ LPSNG for an end user. It calls a webservice with:
It receives:
The external application includes this access token in its web service requests (in the Auth HTTP Header or as a parameter)
RSJ LPSNG associates the access token with the external application and the end user.
The access token can become invalid at any time (even before it is expired). In this case, an 401 error is returned and the external application must retrieve a new access token before retrying the failing request.
| Parameter | Value | | --- | --- | | URL | /auth | | Method | POST | | granttype | authorizationcode | | code | Authorization code (from redirect) | | clientid | Client Id (from application registration) | | clientsecret | Client Secret (from application registration) | | refresh_token | Refresh token (from application authorization) | | Returns | JSON structure |
Contact us for more information:
Or contact us directly:
RSJ Software GmbH
Holzstrasse 4
82120 Germering
Germany
Phone: +49 89 89 41 42-0
Fax: +49 89 89 41 42-80
E-Mail: info@rsj.de