Enabling Streams application services

Streams 5.5.1 or later An IBM® Streams application service provides a REST API for inserting and retrieving Streams job data. You can add one or more endpoint operators to your Streams application to enable a Streams application service. Providing a standard REST interface for Streams data access eases the integration of Streams data with other data services and externally hosted applications.

Enabling a Streams application service

To create a Streams application service, add one or more endpoint operators to your Streams application. The endpoint operators are as follows:
You can also optionally update the Streams application source code to provide customized content that is included with the service API documentation.
  • SPL development: You can use annotations to provide customized documentation content. The following annotations are supported:
    Note: These annotations are not required to enable a Streams application service; rather, they can be used to provide more helpful API documentation.
  • Python development: See the streamsx.service package in Supported Python toolkit packages for IBM Streams for information about how to provide customized documentation.

Enabling a Streams application service by submitting a job

A Streams application service is created when a job is submitted for an application that contains endpoint operators. The application service provides the REST API for adding data to and retrieving data from the job. The service runs on a separate resource from the job. You can control the configuration of this resource when you submit the job by providing a IBM Streams 5.5 for IBM Cloud Pak for Data > Reference > Job configuration overlays reference ‘job configuration overlay’ that includes a JobServiceConfig section. For more information about the overlay options, see Job configuration overlays reference.

The Swagger API documentation is dynamically generated when the service is created. The documentation is available as part of the API interface, enabling programmatic discovery of the supported API endpoints. The API documentation is provided in standard OpeneAPI format and is available in both JSON and YAML. This content can be imported into tools that generate client code from Swagger documentation.

Accessing a Streams application service

If a Streams job has an associated application service, the Streams instance REST API includes URLs for accessing the JSON and YAML versions of the service API documentation, as well as a URL to view the documentation. These properties are provided as part of the job resource. For more information about the Instance API, see Streams REST Instance.

In the IBM Cloud Pak for Data environment, access to Streams application services is available from the Instances list of the Cloud Pak for Data web interface. For more information see, Accessing the Streams application services.