Data ServicesConfiguration Parameters for HTTP Data Services

The following panels and panes may be displayed when configuring an HTTP data serviceClosed A connection to plain text data or image data that is external to Loftware. A File data service or an HTTP data service drives Alternate data sources used in documents. or an Alternate data sourceClosed A connection to a file external to Loftware that acts as a data source and can serve as the data ref for a document field. An Alternate data source is associated with either a File data service or an HTTP data service..

Ribbon

ClosedService Management

ClosedConnection

ClosedGeneral

Parameter Description

Request Method

Whether the HTTP data service uses the GET method to retrieve data or the POST method to send data.

  • GET: Request data from a specified URL. Data is passed in the URL. (Default)
  • POST: Send data to create or update a resource at a specified URL. Data is passed in the request body.

In most cases, the Data Service Administrator should clear the Is Parameter check box so that this parameter cannot be configured in Alternate data sources by Designers.

Result Name

Required. A name (key) by which to refer to the data returned by the data service. To print an external file, such as a PDF, without associating the file with a label template, enter the !INLINE_DOCUMENT! reserved key.

When the POST method is used, the result name receives the response code for the HTTP transaction, such as 200 OK or 404 Not Found.

This parameter cannot be displayed or customized in Alternate data sources, therefore no Is Parameter check box is provided for it in an HTTP data service.

Data Type

The data type of the data to retrieve via the URL if using the GET method or to send via the URL if using the POST method.

Depending on the request method, the following values can be selected.

  • Custom: Data is of a custom data type defined by the Custom Content Type parameter. Available only with POST.
  • Image: Data is an image. You can also use this value if retrieving a PDF file using the GET method.

    Note: Loftware Enterprise SP supports images that use an RGB color model and one of the following file formats: PNG, GIF, JPG, BMP, SVG, or PCX.

  • JSON: Data is a standard JSON package. Available only with POST.
  • PDF: Data is a PDF file. Available only with POST. To retrieve a PDF file using the GET method, use Image instead.
  • Text: Data is free form plain text.
  • XML: Data is an XML file.

    Important! If you select XML for the Data Type, the data service must be managed by using a business rule.

Custom Content Type

For a custom data type, the type of data to send using the format type/subtype.

This parameter is available only if Custom is selected for Data Type.

Max Size (MB)

The maximum amount of data to retrieve from the external file for use in Loftware Enterprise SP if using the GET method, or to send from Loftware Enterprise SP if using the POST method.

Note: A maximum data size of 5MB is recommended and set by default.

Body

The data to send to the URL. For text-based data types, you can enter the data, formatted as appropriate for that data type. Alternatively, you can enter the fully-qualified name (key) of a data map entryClosed A name (key) and value pair in the data map for a job. for which the value is the data to be sent. For Image, PDF, and Custom data types that are not text-based, you must use the latter approach.

This parameter is available only if POST is selected for Request Method. The expected format of the data depends on the value selected for Data Type.

HTTP Headers

The names and values that define the operating parameters of the HTTP transaction.

ClosedProperties Pane