Help Center/ Log Tank Service/ API Reference/ Examples/ Example 1: Creating a Log Group
Updated on 2024-01-02 GMT+08:00

Example 1: Creating a Log Group

Scenario

This section describes how to create a log group in LTS.

Other Involved APIs

None

Creating a Log Group

  • URI format

POST /v2/{project_id}/groups

  • Example Request

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

Obtain the value of {endpoint} from Endpoints.

Body:

{
  "log_group_name": "lts-group-01nh",
  "ttl_in_days": 7
}
  • Example Response
{
  "log_group_id" : "string"
}