Help Center> Log Tank Service> API Reference> Examples> Example 3: Creating a Log Stream
Updated on 2024-04-19 GMT+08:00

Example 3: Creating a Log Stream

Scenario

This section describes how to create a log stream in a specified log group.

Other Involved APIs

None

Creating a Log Stream

  • URI format

POST /v2/{project_id}/groups/{log_group_id}/streams

  • Example Request

POST https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams

Obtain the value of {endpoint} from Endpoints.

Body:

{
  "log_stream_name": "lts-stream-02kh"
}
  • Example Response
{
  "log_stream_id" : "string"
}