Platform APIEnterprise
Append stream-message packets
Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete.
HTTP request
POST {API_ADDRESS}/msg/append_stream_msgRequest example
curl --request POST "${API_ADDRESS}/msg/append_stream_msg" \
--header "Content-Type: application/json; charset=utf-8" --header "operationID: ${OPERATION_ID}" --header "token: ${TOKEN}" \
--data-raw '{"conversationID":"si_user_001_user_002","clientMsgID":"client_msg_001","startIndex":0,"packets":["Hello", " world"],"end":true}'Request body
| Parameter | Required | Type | Description |
|---|---|---|---|
| conversationID | Yes | string | Conversation containing the stream message. |
| clientMsgID | Yes | string | Client message ID of the stream message. |
| startIndex | Yes | int | Index assigned to the first packet in this batch. |
| packets | Yes | string[] | Ordered stream-message packets. |
| end | Yes | bool | Whether this batch completes the stream. |
Response
The common response has errCode: 0 when the batch was accepted.
Errors
See Error codes.
Permissions and limits
- Available only in OpenIM Enterprise.
- Preserve packet indexes when retrying; do not blindly append duplicate content.
Related pages
Was this page helpful?