Gets messages from a stream.
GET {{baseUrl}}/streams/:streamId/messages?cursor=ea in nostrud&limit=9398
Returns messages from the specified stream using the specified cursor as the starting point for consumption. By default, the number of messages returned is undefined, but the service returns as many as possible. To get messages, you must first obtain a cursor using the CreateCursor operation. In the response, retrieve the value of the 'opc-next-cursor' header to pass as a parameter to get the next batch of messages in the stream.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
cursor | string | (Required) The cursor used to consume the stream. | |
limit | number | The maximum number of messages to return. You can specify any value up to 10000. By default, the service returns as many messages as possible. | |
Consider your average message size to help avoid exceeding throughput on the stream. | |||
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
opc-request-id | string | The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | |
particular request, please provide the request ID. | |||
Date | string | (Required) Current Date | |
Authorization | string | (Required) Signature Authentication on Authorization header |
RESPONSES
status: OK
[{"key":"+sIAuWmJgefw9SIWfj6m","offset":42,"partition":"1","stream":"ocid1.stream.realm.region.mnopqr789","timestamp":"2019-12-06T14:58:03.762Z","value":"Ou1D0arB8eSCPXEQnAGOx2P1"},{"key":"85pm1OaNHh0PNTsM6rpL0eFDNS8palp6","offset":42,"partition":"1","stream":"ocid1.stream.realm.region.mnopqr789","timestamp":"2010-12-15T07:33:40.470Z","value":"3stEbh/n"}]