Table of contents

Streams application services

An IBM Streams application service provides a REST API for inserting and retrieving Streams job data.

To enable a Streams application service, add one or more endpoint operators to your Streams application. Providing a standard REST interface for Streams data access eases the integration of Streams data with other data services and externally hosted applications.

For more information about adding endpoint operators to enable Streams application services, see Enabling Streams application services

Accessing the Streams application services

A Streams application service is created when a job is submitted for an application that contains one or more endpoint operators. You can access the service from the Cloud Pak for Data web user interface by using the navigation menu and choosing Services > Instances.

Application service instances have a type of streams-application and have a name built from the Streams instance name, project, and job identifier. You can select the service instance name to view the REST API Swagger documentation for the service. This documentation is generated dynamically when the job is submitted, using information from the Streams application source code.

The application service APIs can be called from a REST client that runs within or external to the cluster where Cloud Pak for Data runs. Cross-origin resource sharing (CORS) support is provided for access from browser scripts. For more information, see Enabling cross-origin requests to the IBM Streams REST API.

In addition to viewing the API documentation, you can retrieve the documentation in JSON and YAML formats as part of the API set. This documentation is in standard OpenAPI format and can be used to programmatically discover the endpoint APIs that are available from the service. The documentation can also be used by tools that support the OpenAPI format for generating client API code.

Managing access to an application service

An application service is created when a job is submitted for an application that contains one or more endpoint operators. The user who submits the job is granted admin access to the service.

You can grant access to new users or change access for existing users. To grant additional user access:
  1. Click Services > Instances from the Cloud Pak for Data web user interface navigation menu.
  2. Locate the application service in the list, open its action menu, and click Manage access.
The following service roles can be used:
  • Admin: Add and retrieve data by using the REST API, manage service access, and delete the service.
  • DataConsumer: Retrieve data by using the REST API.
  • DataProvider: Add data by using the REST API.
  • DataConsumerProvider: Add and retrieve data by using the REST API.
Note: Streams application service users are not required to have access to the Streams instance where the job is running or to the Streams job itself.

If a user has been granted admin access to the service, the action menu also contains a delete option. Deleting the application service also cancels the corresponding Streams job.