v1

latestOpenAPI 3.0.12026-07-24110189356.6 KB
stream

Enable message consumption from a specific stream layer.

Enables message consumption from a specific stream layer (topic). Use the base path returned from the API Lookup service. Note: For mode = parallel, one unit of parallelism currently equals 1 MBps inbound or 2 MBps outbound, whichever is greater, rounded up to the nearest integer. The number of subscriptions within the same group cannot exceed the parallelism allowed. For more details see Get Data from a Stream Layer.

post/layers/{layerId}/subscribe

Path parameters

layerIdstring required

The ID of the parent layer for this blob.

Query parameters

mode'serial' | 'parallel'

Specifies whether to use serial or parallel subscription mode. For more details see Get Data from a Stream Layer.

subscriptionIdstring

Include this parameter if you want to look up the nodeBaseURL for a given subscriptionId.

consumerIdstring

The ID to use to identify this consumer. It must be unique within the consumer group. If you do not provide one, the system will generate one.

Request body

Example request

{
  "kafkaConsumerProperties": {
    "auto.commit.interval.ms": 5000,
    "auto.offset.reset": "earliest",
    "fetch.max.bytes": 52428800,
    "fetch.max.wait.ms": 500,
    "fetch.min.bytes": 1,
    "max.partition.fetch.bytes": 1048576,
    "max.poll.records": 500
  }
}

Response

OK

nodeBaseURLstring

A subscription/Kafka Consumer is created in a specific server instance. This base URL represents the specific server node on which this subscription/Kafka Consumer was created. This base URL should be used instead of the base URL returned by the lookup service when making requests to these endpoints: /partitions, /offsets, /seek and /subscribe (DELETE).

subscriptionIdstring

Example response

{
  "nodeBaseURL": "https://web-2.streaming.data.api.platform.in.here.com/stream/v2/catalogs/webservice-catalog9fc50b27-4f4b-49e6-beb0-f974eb95863b",
  "subscriptionId": "-1920183912.123e4567-e89b-12d3-a456-556642440000"
}