Updated on 2024-04-25 GMT+08:00

Querying LTS Settings

Function

This API is used to query the LTS settings.

URI

GET /v1/{project_id}/waf/config/lts

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. To obtain it, go to Cloud management console and hover the cursor over your username. On the displayed window, choose My Credentials.Then, in the Projects area, view Project ID of the corresponding project.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

You can obtain the ID by calling the ListEnterpriseProject API of EPS.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Content-Type

Yes

String

Content type.

Default: application/json;charset=utf8

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

LTS configuration information ID. Each enterprise project has a unique ID.

enabled

Boolean

Whether to enable LTS for WAF logging\n - false: LTS is disabled for WAF.\n - true: LTS is enabled for WAF.

ltsIdInfo

LtsIdInfo object

Log group and log stream IDs.

enabale

Boolean

This parameter has been discarded. Ignore it.

Table 5 LtsIdInfo

Parameter

Type

Description

ltsGroupId

String

Log group ID.

ltsAccessStreamID

String

Log stream ID for access logs

ltsAttackStreamID

String

Log stream ID for attack logs

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Requests

The following example shows how to query the LTS configuration in a project. The project ID is specified by project_id.

GET https://{Endpoint}/v1/{project_id}/waf/config/lts?enterprise_project_id=0

Example Responses

Status code: 200

Request succeeded.

{
  "enabled" : true,
  "id" : "c89a667487734f6a95e9967d1f373c77",
  "ltsIdInfo" : {
    "ltsAccessStreamID" : "4bcff74d-f649-41c8-8325-1b0a264ff683",
    "ltsAttackStreamID" : "0a7ef713-cc3e-418d-abda-85df04db1a3c",
    "ltsGroupId" : "f4fa07f6-277b-4e4a-a257-26508ece81e6"
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

401

The token does not have required permissions.

500

Internal server error.

Error Codes

See Error Codes.