2019-04-26
|
Modified as follows:
A maximum of 100 log groups and 100 log streams are supported.
diff --git a/docs/lts/api-ref/lts_02_0019.html b/docs/lts/api-ref/lts_02_0019.html
new file mode 100644
index 000000000..ca7e40d61
--- /dev/null
+++ b/docs/lts/api-ref/lts_02_0019.html
@@ -0,0 +1,15 @@
+
+
+Public Parameters
+
+
+
diff --git a/docs/lts/api-ref/lts_02_0011.html b/docs/lts/api-ref/lts_02_0020.html
similarity index 52%
rename from docs/lts/api-ref/lts_02_0011.html
rename to docs/lts/api-ref/lts_02_0020.html
index 40b6d25ed..0ea35c739 100644
--- a/docs/lts/api-ref/lts_02_0011.html
+++ b/docs/lts/api-ref/lts_02_0020.html
@@ -1,91 +1,91 @@
-
+
Status Code
-Table 1 lists the status code.
+ Table 1 lists the status code.
- Table 1 Status code descriptionStatus Code
+Table 1 Status code descriptionStatus Code
|
-Returned Value
+ | Returned Value
|
-Description
+ | Description
|
-200
+ | 200
|
-OK
+ | OK
|
-The results of GET and PUT operations are returned normally.
+ | The results of GET and PUT operations are returned normally.
|
-201
+ | 201
|
-OK
+ | OK
|
-The POST request is successful and the query result is returned.
+ | The POST request is successful and the query result is returned.
|
-204
+ | 204
|
-No Content
+ | No Content
|
-The result of the DELETE operation is returned normally.
+ | The result of the DELETE operation is returned normally.
|
-400
+ | 400
|
-Bad Request
+ | Bad Request
|
-Request error.
+ | Request error.
|
-401
+ | 401
|
-Unauthorized
+ | Unauthorized
|
-The authentication information is not provided or is incorrect.
+ | The authentication information is not provided or is incorrect.
|
-403
+ | 403
|
-Forbidden
+ | Forbidden
|
-You are forbidden to access the requested page.
+ | You are forbidden to access the requested page.
|
-404
+ | 404
|
-Not Found
+ | Not Found
|
-The server failed to find the requested resource.
+ | The server failed to find the requested resource.
|
-408
+ | 408
|
-Request Timeout
+ | Request Timeout
|
-The request timed out.
+ | The request timed out.
|
-429
+ | 429
|
-Too Many Requests
+ | Too Many Requests
|
-The number of requests exceeds the upper limit.
+ | The number of requests exceeds the upper limit.
|
-500
+ | 500
|
-Internal Server Error
+ | Internal Server Error
|
-Failed to complete the request because of a service error.
+ | Failed to complete the request because of a service error.
|
-503
+ | 503
|
-Service Unavailable
+ | Service Unavailable
|
-Failed to complete the request because the system is unavailable.
+ | Failed to complete the request because the system is unavailable.
|
@@ -94,7 +94,7 @@
diff --git a/docs/lts/api-ref/lts_02_0012.html b/docs/lts/api-ref/lts_02_0021.html
similarity index 57%
rename from docs/lts/api-ref/lts_02_0012.html
rename to docs/lts/api-ref/lts_02_0021.html
index d572971bb..c6a99a1da 100644
--- a/docs/lts/api-ref/lts_02_0012.html
+++ b/docs/lts/api-ref/lts_02_0021.html
@@ -1,189 +1,189 @@
-
+
Error Code
-DescriptionThis section explains the meanings of error code responses returned by LTS APIs.
+ DescriptionThis section explains the meanings of error code responses returned by LTS APIs.
- Response Format{"error_msg":"Current user is not authenticated correctly, check your token.","error_code":"LTS.0002"}
+ Response Format{"error_msg":"Current user is not authenticated correctly, check your token.","error_code":"LTS.0002"}
- Error Code Description
- Table 1 Error code descriptionResponse Code
+Error Code Description
+ Table 1 Error code descriptionResponse Code
|
-Error Code
+ | Error Code
|
-Description
+ | Description
|
-Error Message
+ | Error Message
|
-Handling Measure
+ | Handling Measure
|
-400
+ | 400
|
-LTS.0101
-
+ | LTS.0101
+
|
-Failed to create the log group because a log group with the same name already exists.
+ | Failed to create the log group because a log group with the same name already exists.
|
-Failed to create log group, the group name has been existed
+ | Failed to create log group, the group name has been existed
|
-Check the log group name.
+ | Check the log group name.
|
-400
+ | 400
|
-LTS.0104
-
+ | LTS.0104
+
|
-Failed to create the log group because the maximum number of log groups has been reached.
+ | Failed to create the log group because the maximum number of log groups has been reached.
|
-Failed to create log group, the number of log groups exceeds the quota
+ | Failed to create log group, the number of log groups exceeds the quota
|
-Check whether the number of log groups reaches the quota (100 by default).
+ | Check whether the number of log groups reaches the quota (100 by default).
|
-400
+ | 400
|
-LTS.0105
+ | LTS.0105
|
-Failed to delete the log group because the log group has associated log transfer tasks.
+ | Failed to delete the log group because the log group has associated log transfer tasks.
|
-Log group is associated by transfer
+ | Log group is associated by transfer
|
-Check whether the associated log transfer tasks have been deleted.
+ | Check whether the associated log transfer tasks have been deleted.
|
-404
+ | 404
|
-LTS.0201
+ | LTS.0201
|
-Failed to create a log stream because the associated log group does not exist.
+ | Failed to create a log stream because the associated log group does not exist.
|
-The group is not existed
+ | The group is not existed
|
-Check the ID of the log group.
+ | Check the ID of the log group.
|
-400
+ | 400
|
-LTS.0205
+ | LTS.0205
|
-Failed to create a log stream because the log stream name already exists.
+ | Failed to create a log stream because the log stream name already exists.
|
-The topic name has been existed
+ | The topic name has been existed
|
-Check whether the log stream with the same name already exists.
+ | Check whether the log stream with the same name already exists.
|
-400
+ | 400
|
-LTS.0206
+ | LTS.0206
|
-Failed to create a log stream because the maximum number of log streams has been reached.
+ | Failed to create a log stream because the maximum number of log streams has been reached.
|
-Failed to create log topic, the number of log topics exceeds the quota
+ | Failed to create log topic, the number of log topics exceeds the quota
|
-Check whether the number of log streams reaches the quota (100 by default).
+ | Check whether the number of log streams reaches the quota (100 by default).
|
-400
+ | 400
|
-LTS.0207
+ | LTS.0207
|
-Failed to delete the log stream because the log stream has associated a log transfer task.
+ | Failed to delete the log stream because the log stream has associated a log transfer task.
|
-Log topic is associated by transfer
+ | Log topic is associated by transfer
|
-Check whether the associated log transfer task has been deleted.
+ | Check whether the associated log transfer task has been deleted.
|
-500
+ | 500
|
-LTS.0010
-
+ | LTS.0010
+
|
-System internal error.
+ | System internal error.
|
-The system encountered an internal error
+ | The system encountered an internal error
|
-Contact the administrator.
+ | Contact the administrator.
|
-500
+ | 500
|
-LTS.0102
+ | LTS.0102
|
-Failed to create the log group.
+ | Failed to create the log group.
|
-Failed to create log group.
+ | Failed to create log group.
|
-Check whether the project ID is correct and whether the log group name meets the requirements.
+ | Check whether the project ID is correct and whether the log group name meets the requirements.
|
-500
+ | 500
|
-LTS.0103
+ | LTS.0103
|
-Failed to delete the log group.
+ | Failed to delete the log group.
|
-Failed to delete log group
+ | Failed to delete log group
|
-Check whether the database is normal or whether the network connection is normal.
+ | Check whether the database is normal or whether the network connection is normal.
|
-500
+ | 500
|
-LTS.0202
+ | LTS.0202
|
-Failed to create a log stream.
+ | Failed to create a log stream.
|
-Failed to create log topic
+ | Failed to create log topic
|
-Check whether the project and group IDs are correct and whether the log stream name meets the requirements.
+ | Check whether the project and group IDs are correct and whether the log stream name meets the requirements.
|
-500
+ | 500
|
-LTS.0203
+ | LTS.0203
|
-Failed to delete the log stream.
+ | Failed to delete the log stream.
|
-Failed to delete log topic
+ | Failed to delete log topic
|
-Check whether the database is normal or whether the network connection is normal.
+ | Check whether the database is normal or whether the network connection is normal.
|
-400
+ | 400
|
-LTS.0001
+ | LTS.0001
|
-The API version /projectId is invalid or does not exist.
+ | The API version /projectId is invalid or does not exist.
|
-API version/project id invalid or missing
+ | API version/project id invalid or missing
|
-Check whether the version and projectID information is correct.
+ | Check whether the version and projectID information is correct.
|
-401
+ | 401
|
-LTS.0002
+ | LTS.0002
|
-Unauthorized user token.
+ | Unauthorized user token.
|
-Current user is not authenticated correctly, check your token
+ | Current user is not authenticated correctly, check your token
|
-Check the token information of the current user.
+ | Check the token information of the current user.
|
-400
+ | 400
|
-LTS.0011
+ | LTS.0011
|
-Invalid resource ID.
+ | Invalid resource ID.
|
-The resource id is invalid or missing
+ | The resource id is invalid or missing
|
-Check whether the resource ID in the request is correct.
+ | Check whether the resource ID in the request is correct.
|
@@ -193,7 +193,7 @@
diff --git a/docs/lts/api-ref/lts_api_0006.html b/docs/lts/api-ref/lts_api_0006.html
new file mode 100644
index 000000000..b6900de13
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0006.html
@@ -0,0 +1,16 @@
+
+
+Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID
+Obtaining Account and Project IDsAccount and project IDs are required in URLs when you call some APIs.
+
+ Obtaining Log Group and Log Stream IDs- Obtain the IDs from the console.
- Log in to the LTS console.
- On the Log Management page, obtain the log group ID.
- Click the name of a log group and obtain the log stream ID on the page displayed.
+ - Obtain the IDs by calling APIs.
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0011.html b/docs/lts/api-ref/lts_api_0011.html
new file mode 100644
index 000000000..fc0399be4
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0011.html
@@ -0,0 +1,17 @@
+
+
+Log Group Management (New Version)
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0012.html b/docs/lts/api-ref/lts_api_0012.html
new file mode 100644
index 000000000..81261f9f8
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0012.html
@@ -0,0 +1,370 @@
+
+
+Creating a Log Group
+FunctionThis API is used to create a log group for log retention and query. You can create a maximum of 100 log groups.
+
+ URIPOST /v2/{project_id}/groups
+
+
+
+ Request Parameters
+
+
+
+ Table 3 Request body parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_name
+ |
+Yes
+ |
+String
+ |
+Name of the log group to be created.
+Minimum length: 1 character
+Maximum length: 64 characters
+Enumerated value:
+
+ |
+
+ttl_in_days
+ |
+Yes
+ |
+Integer
+ |
+Log retention duration, in days (fixed to 7 days).
+ |
+
+
+
+
+
+ Response ParametersStatus code: 201
+
+ Table 4 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_id
+ |
+String
+ |
+ID of the created log group.
+Value length: 36 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 8 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 503
+
+ Table 9 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+
+ Example RequestPOST https://{endpoint}/v2/{project_id}/groups
+
+/v2/{project_id}/groups
+{
+ "log_group_name": "lts-group-01nh",
+ "ttl_in_days": 7
+}
+
+ Example ResponseStatus code: 201
+ {
+ "log_group_id":"b6b9332b-091f-4b22-b810-264318d2d664"
+}
+ Status code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0009",
+ "error_msg" : "Failed to validate the request body"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0102",
+ "error_msg" : "Failed to create log group"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+201
+ |
+The request has succeeded and the log group has been created.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0013.html b/docs/lts/api-ref/lts_api_0013.html
new file mode 100644
index 000000000..a8a7850ea
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0013.html
@@ -0,0 +1,304 @@
+
+
+Querying All Log Groups of an Account
+FunctionThis API is used to query all log groups of an account.
+
+ URIGET /v2/{project_id}/groups
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 3 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_groups
+ |
+Array of LogGroup objects
+ |
+Information of log groups.
+ |
+
+
+
+
+
+ Table 4 LogGroupParameter
+ |
+Type
+ |
+Description
+ |
+
+
+creation_time
+ |
+long
+ |
+Time when a log group was created.
+ |
+
+log_group_name
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_group_id
+ |
+String
+ |
+Log group ID.
+Value length: 36 characters
+ |
+
+ttl_in_days
+ |
+Integer
+ |
+Log retention duration, in days (fixed to 7 days).
+ |
+
+tag
+ |
+Map<String,String>
+ |
+Log group tag.
+ |
+
+
+
+
+ Status code: 401
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+
+ Example RequestGET https://{endpoint}/v2/{project_id}/groups
+
+/v2/{project_id}/groups
+
+ Example ResponseStatus code: 200
+ {"log_groups":[{"creation_time":1630547141853,"log_group_name":"lts-group-01nh","log_group_id":"b6b9332b-091f-4b22-b810-264318d2d664","ttl_in_days":7}]}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0010",
+ "error_msg" : "The system encountered an internal error"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The request is successful.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0014.html b/docs/lts/api-ref/lts_api_0014.html
new file mode 100644
index 000000000..9c8577745
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0014.html
@@ -0,0 +1,285 @@
+
+
+Deleting a Log Group
+FunctionThis API is used to delete a specified log group. If the log streams in a log group have been associated with log transfer tasks, you need to delete the tasks first.
+
+ URIDELETE /v2/{project_id}/groups/{log_group_id}
+
+
+
+
+ Response ParametersStatus code: 400
+
+ Table 3 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 4 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+
+ Example RequestDELETE https://{endpoint}/v2/{project_id}/groups/{log_group_id}
+
+/v2/{project_id}/groups/{log_group_id}
+
+ Example ResponseStatus code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0201",
+ "error_msg" : "The log group is not existed"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0103",
+ "error_msg" : "Failed to delete log group"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+204
+ |
+The request has succeeded and the log group has been deleted.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0015.html b/docs/lts/api-ref/lts_api_0015.html
new file mode 100644
index 000000000..48510c96e
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0015.html
@@ -0,0 +1,15 @@
+
+
+Log Stream Management (New Version)
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0016.html b/docs/lts/api-ref/lts_api_0016.html
new file mode 100644
index 000000000..c56e945e0
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0016.html
@@ -0,0 +1,363 @@
+
+
+Creating a Log Stream
+FunctionThis API is used to create a log stream in a specified log group.
+
+ URIPOST /v2/{project_id}/groups/{log_group_id}/streams
+
+ Table 1 URI parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+project_id
+ |
+Yes
+ |
+String
+ |
+Project ID. For details about how to obtain the ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID. Default value: None
+Value length: 32 characters
+ |
+
+log_group_id
+ |
+Yes
+ |
+String
+ |
+ID of the log group to which the log stream to be created will belong.
+Default value: None
+Value length: 36 characters
+ |
+
+
+
+
+
+ Request Parameters
+
+
+
+ Table 3 Request body parameterParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_stream_name
+ |
+Yes
+ |
+String
+ |
+Name of the log stream to be created.
+Minimum length: 1 character
+Maximum length: 64 characters
+Enumerated value:
+
+ |
+
+
+
+
+
+ Response ParametersStatus code: 201
+
+ Table 4 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_stream_id
+ |
+String
+ |
+ID of the created log stream.
+Value length: 36 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 8 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 503
+
+ Table 9 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+-
+ |
+String
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+ Example RequestPOST https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams
+
+/v2/{project_id}/groups/{log_group_id}/streams
+{
+ "log_stream_name": "lts-stream-02kh",
+ "ttl_in_days": 7,
+
+}
+
+
+ Example ResponseStatus code: 201
+ {
+ "log_stream_id":"c54dbc58-0fd8-48ed-b007-6d54981427a7"
+}
+ Status code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0009",
+ "error_msg" : "Failed to validate the request body"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0202",
+ "error_msg" : "Failed to create Log stream"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+201
+ |
+The request has succeeded and the log stream has been created.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0017.html b/docs/lts/api-ref/lts_api_0017.html
new file mode 100644
index 000000000..531fdd700
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0017.html
@@ -0,0 +1,345 @@
+
+
+Querying All Log Streams in a Specified Log Group
+FunctionThis API is used to query information about all log streams in a specified log group.
+
+ URIGET /v2/{project_id}/groups/{log_group_id}/streams
+
+ Table 1 URI parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+project_id
+ |
+Yes
+ |
+String
+ |
+Project ID. For details about how to obtain the ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID. Default value: None
+Value length: 32 characters
+ |
+
+log_group_id
+ |
+Yes
+ |
+String
+ |
+ID of the log group whose log streams will be queried.
+Default value: None
+Value length: 36 characters
+ |
+
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 3 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_streams
+ |
+Array of LogStream objects
+ |
+List of log streams.
+ |
+
+
+
+
+
+ Table 4 LogStreamParameter
+ |
+Type
+ |
+Description
+ |
+
+
+creation_time
+ |
+long
+ |
+Creation time.
+Minimum value: 1577808000000
+Maximum value: 4102416000000
+ |
+
+log_stream_name
+ |
+String
+ |
+Log stream name.
+Value length: 36 characters
+ |
+
+log_stream_id
+ |
+String
+ |
+Log stream ID.
+Value length: 36 characters
+ |
+
+filter_count
+ |
+Integer
+ |
+Number of filters.
+Minimum value: 0
+Maximum value: 5
+ |
+
+tag
+ |
+Map<String,String>
+ |
+Log stream tag.
+ |
+
+
+
+
+ Status code: 401
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 503
+
+ Table 8 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+-
+ |
+String
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+ Example RequestGET https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams
+
+/v2/{project_id}/groups/{log_group_id}/streams
+
+ Example ResponseStatus code: 200
+ {
+ "log_streams" : [ {
+ "creation_time":1630549842955,
+ "log_stream_name":"lts-stream-02kh",
+ "log_stream_id":"c54dbc58-0fd8-48ed-b007-6d54981427a7",
+ "filter_count":0
+ } ]
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0010",
+ "error_msg" : "The system encountered an internal error"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The request is successful.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0018.html b/docs/lts/api-ref/lts_api_0018.html
new file mode 100644
index 000000000..ca78493ce
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0018.html
@@ -0,0 +1,316 @@
+
+
+Deleting a Log Stream
+FunctionThis API is used to delete a specified log stream from a specified log group. If a log transfer task has been associated with the log stream, delete the task first.
+
+ URIDELETE /v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}
+
+ Table 1 URI parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+project_id
+ |
+Yes
+ |
+String
+ |
+Project ID. For details about how to obtain the ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID.
+Default value: None
+Value length: 32 characters
+ |
+
+log_group_id
+ |
+Yes
+ |
+String
+ |
+ID of the log group whose log streams will be deleted.
+Default value: None
+Value length: 36 characters
+ |
+
+log_stream_id
+ |
+Yes
+ |
+String
+ |
+ID of the log stream to be deleted. For details about how to obtain the log stream ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID.
+Default value: None
+Value length: 36 characters
+ |
+
+
+
+
+
+
+ Response ParametersStatus code: 400
+
+ Table 3 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 4 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 503
+
+ Table 7 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+-
+ |
+String
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+ Example RequestDELETE https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}
+
+/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}
+
+ Example ResponseStatus code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0208",
+ "error_msg" : "The log stream does not existed"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0203",
+ "error_msg" : "Failed to delete Log stream"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+204
+ |
+The request has succeeded and the log stream has been deleted.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0024.html b/docs/lts/api-ref/lts_api_0024.html
new file mode 100644
index 000000000..eb0180595
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0024.html
@@ -0,0 +1,358 @@
+
+
+Modifying a Log Group
+FunctionThis API is used to modify the log retention duration of a specified log group.
+
+ URIPOST /v2/{project_id}/groups/{log_group_id}
+
+
+
+ Request Parameters
+
+
+
+ Table 3 Request body parameterParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+ttl_in_days
+ |
+Yes
+ |
+Integer
+ |
+Log retention duration, in days (fixed to 7 days).
+ |
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 4 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+creation_time
+ |
+long
+ |
+Time when a log group was created.
+ |
+
+log_group_name
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_group_id
+ |
+String
+ |
+Log group ID.
+Value length: 36 characters
+ |
+
+ttl_in_days
+ |
+Integer
+ |
+Log retention duration, in days (fixed to 7 days).
+ |
+
+
+
+
+ Status code: 400
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 8 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+
+ Example RequestPOST https://{endpoint}/v2/{project_id}/groups/{log_group_id}
+
+/v2/{project_id}/groups/{log_group_id}
+{
+ "ttl_in_days": 8
+}
+
+ Example ResponseStatus code: 200
+ {"creation_time" : "number","log_group_name" : "string","log_group_id" : "string","ttl_in_days" : 8}
+ Status code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0009",
+ "error_msg" : "Failed to validate the request body"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0414",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0102",
+ "error_msg" : "Failed to update log group"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The request has succeeded and the log group has been modified.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0026.html b/docs/lts/api-ref/lts_api_0026.html
new file mode 100644
index 000000000..5ddfaa5b1
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0026.html
@@ -0,0 +1,17 @@
+
+
+Log Transfer
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0027.html b/docs/lts/api-ref/lts_api_0027.html
new file mode 100644
index 000000000..a3b249e3f
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0027.html
@@ -0,0 +1,449 @@
+
+
+Creating a Log Transfer Task
+FunctionThis API is used to transfer logs of one or more specified log streams to Object Storage Service (OBS).
+
+ URIPOST /v2/{project_id}/log-dump/obs
+
+
+
+ Request Parameters
+
+
+
+ Table 3 Request body parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_id
+ |
+Yes
+ |
+String
+ |
+Log group ID.
+Value length: 36 characters
+ |
+
+log_stream_ids
+ |
+Yes
+ |
+Array of strings
+ |
+Indicates IDs of log streams whose logs are to be periodically transferred to OBS. You can specify one or more log streams.
+Example value:
+- 7bb6b1e7-xxxx-4255-87f9-b3dc7fb2xxxx
+ |
+
+obs_bucket_name
+ |
+Yes
+ |
+String
+ |
+Indicates the name of an OBS bucket.
+Minimum length: 3 characters
+Maximum length: 63 characters
+ |
+
+type
+ |
+Yes
+ |
+String
+ |
+Set this parameter to cycle, which indicates that the log transfer is periodic.
+Value length: 5 characters
+ |
+
+storage_format
+ |
+Yes
+ |
+String
+ |
+Indicates whether the logs are stored in raw or JSON format. The default value is RAW.
+Minimum length: 3 characters
+Maximum length: 4 characters
+ |
+
+switch_on
+ |
+No
+ |
+Boolean
+ |
+Indicates whether the log transfer is enabled. The value is true (default) or false.
+ |
+
+prefix_name
+ |
+No
+ |
+String
+ |
+Indicates the file name prefix of the log files transferred to an OBS bucket.
+Minimum length: 0 characters
+Maximum length: 64 characters
+ |
+
+dir_prefix_name
+ |
+No
+ |
+String
+ |
+Indicates a custom path to store the log files.
+Minimum length: 0 characters
+Maximum length: 64 characters
+ |
+
+period
+ |
+Yes
+ |
+Integer
+ |
+Indicates the length of the log transfer interval.
+Example values: 1, 2, 3, 5, 6, 12, and 30
+ |
+
+period_unit
+ |
+Yes
+ |
+String
+ |
+Indicates the unit of the log transfer interval.
+Example values: min and hour
+Minimum length: 3 characters
+Maximum length: 4 characters
+ NOTE: The log transfer interval is specified by the combination of the values of period and period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours.
+
+ |
+
+
+
+
+
+ Response ParametersStatus code: 201
+
+ Table 4 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_dump_obs_id
+ |
+String
+ |
+Transfer task ID.
+Default value: None
+Value length: 36 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 5 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+- The request body format must be json
+ |
+
+
+
+
+ Status code: 403
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Example value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Example value:
+
+ |
+
+
+
+
+
+ Example RequestPOST https://{endpoint}/v2/{project_id}/log-dump/obs
+
+/v2/{project_id}/log-dump/obs
+{
+ "log_group_id": "d9dba9f3-xxxx-48bd-xxxx-xxxxa24a8053",
+ "log_stream_ids": ["45e7f609-xxxx-4cd3-835b-xxxx4a124718"],
+ "obs_bucket_name": "lts-test",
+ "type": "cycle",
+ "storage_format": "RAW",
+ "switch_on": "true",
+ "prefix_name": "fileprefixname",
+ "dir_prefix_name": "dirprefixname",
+ "period": 5,
+ "period_unit": "min"
+}
+
+ Example ResponseStatus code: 200
+ - The log group does not exist.
{
+ "error_code": "LTS.0201",
+ "error_msg": "The log group does not existed"
+}
+ - The log stream does not exist.
{
+ "error_code": "LTS.0208",
+ "error_msg": "Log stream id does not exist: 632b9bdc-5afd-4666-a5de-2579f8b80314-"
+}
+ - The OBS bucket does not exist.
{
+ "error_code": "LTS.0416",
+ "error_msg": "obs bucket does not exist: zhuanchu"
+}
+ - The log stream ID has been associated with a transfer task.
{
+ "error_code": "LTS.0207",
+ "error_msg": "Log stream id is associated by transfer: 632b9bdc-5afd-4666-a5de-2579f8b80314"
+}
+ - Invalid transfer type.
{
+ "error_code": "LTS.1901",
+ "error_msg": "type is not in the list [cycle]"
+}
+ - Invalid storage format.
{
+ "error_code": "LTS.1901",
+ "error_msg": "storage_format is not in the list [RAW, JSON]"
+}
+ - Invalid log transfer interval.
{
+ "error_code": "LTS.1901",
+ "error_msg": "period+period_unit is not in the list [2min, 5min, 30min, 1hour, 3hour, 6hour, 12hour]"
+}
+ - Invalid unit of the log transfer interval.
{
+ "error_code": "LTS.1901",
+ "error_msg": "period_unit is not in the list [min, hour]"
+}
+ - Invalid file name prefix.
{
+ "error_code": "LTS.1902",
+ "error_msg": "prefix_name is invalid, please verify if it's provided as required"
+}
+ - Invalid custom path to store log files.
{
+ "error_code": "LTS.1902",
+ "error_msg": "dir_prefix_name is invalid, please verify if it's provided as required"
+}
+
+ Status code: 201
+ {
+ "log_dump_obs_id" : "45fdc36b-xxxx-4567-xxxx-559xxxxdf968"
+}
+ Status code: 400
+ - The request is invalid. Modify the request based on the description in error_msg before a retry.
{
+ "error_code" : "LTS.0009",
+ "error_msg" : "Failed to validate the request body"
+}
+ - The request is invalid. Modify the request based on the description in error_msg before a retry.
{
+ "error_code": "LTS.0007",
+ "error_msg": "The request body format must be json"
+}
+
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+
+
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The request has succeeded.
+ |
+
+201
+ |
+The request has succeeded. The transfer task has been created.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0028.html b/docs/lts/api-ref/lts_api_0028.html
new file mode 100644
index 000000000..d0aaded43
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0028.html
@@ -0,0 +1,921 @@
+
+
+Querying Logs
+FunctionThis API is used to query logs in a specified log stream.
+
+ URIPOST /v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+
+ Table 1 URI parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+project_id
+ |
+Yes
+ |
+String
+ |
+Project ID. For details about how to obtain the ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID.
+Default value: None
+Value length: 32 characters
+ |
+
+log_group_id
+ |
+Yes
+ |
+String
+ |
+Log group ID.
+Default value: None
+Value length: 36 characters
+ |
+
+log_stream_id
+ |
+Yes
+ |
+String
+ |
+Log stream ID.
+Default value: None
+Value length: 36 characters
+ |
+
+
+
+
+
+ Request Parameters
+
+
+
+ Table 3 Request body parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+start_time
+ |
+Yes
+ |
+String
+ |
+UTC start time of the search window (in milliseconds). NOTE: Maximum query time range: 30 days
+
+
+ |
+
+end_time
+ |
+Yes
+ |
+String
+ |
+UTC end time of the search window (in milliseconds).
+ NOTE: Maximum query time range: 30 days
+
+ |
+
+labels
+ |
+No
+ |
+Map<String,String>
+ |
+Filter criteria, which vary between log sources.
+ |
+
+keywords
+ |
+No
+ |
+String
+ |
+Keyword used for search. A keyword is a word between two adjacent delimiters.
+Enumerated value:
+
+ |
+
+line_num
+ |
+No
+ |
+String
+ |
+Sequence number of a log event. This parameter is not required for the first query, but is required for subsequent pagination queries. The value can be obtained from the response of the last query. The value of line_num should be between the values of start_time and end_time.
+Value length: 19 characters
+ |
+
+is_desc
+ |
+No
+ |
+Boolean
+ |
+Whether the search order is descending or ascending. The default value is false, indicating that search results are displayed in ascending order.
+Enumerated value:
+
+ |
+
+search_type
+ |
+No
+ |
+String
+ |
+The value is init (default value) for the first query, or forwards or backwards for a pagination query. This parameter is used together with is_desc for pagination queries.
+Enumerated value:
+
+ |
+
+limit
+ |
+No
+ |
+Integer
+ |
+Number of logs to be queried each time. The value is 50 when this parameter is not set. You are advised to set this parameter to 100.
+Minimum value: 1
+Maximum value: 5000
+ |
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 4 Response body parameterParameter
+ |
+Type
+ |
+Description
+ |
+
+
+logs
+ |
+Array of LogContents objects
+ |
+Information of logs.
+ |
+
+count
+ |
+Integer
+ |
+Number of logs.
+ |
+
+
+
+
+
+ Table 5 LogContentsParameter
+ |
+Type
+ |
+Description
+ |
+
+
+content
+ |
+String
+ |
+Raw log data.
+Minimum length: 1 character
+Maximum length: 10,000 characters
+ |
+
+line_num
+ |
+String
+ |
+Sequence number of a log event.
+Value length: 19 characters
+ |
+
+labels
+ |
+Map<String,String>
+ |
+Labels contained in a log event. The labels vary depending on log events.
+ |
+
+
+
+
+ Status code: 400
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 401
+
+ Table 7 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 403
+
+ Table 8 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 9 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Enumerated value:
+
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+
+ Example RequestLog details:
+ 2020-07-25/14:44:42 this log is Error NO 1
+2020-07-25/14:44:43 this log is Error NO 2
+2020-07-25/14:44:44 this log is Error NO 3
+2020-07-25/14:44:45 this log is Error NO 4
+2020-07-25/14:44:46 this log is Error NO 5
+2020-07-25/14:44:47 this log is Error NO 6
+2020-07-25/14:44:48 this log is Error NO 7
+2020-07-25/14:44:49 this log is Error NO 8
+2020-07-25/14:44:50 this log is Error NO 9
+2020-07-25/14:44:51 this log is Error NO 10
+
+ POST https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+ - For the first query:
v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+{
+ "start_time": 1595659200000,
+ "end_time": 1595659500000,
+ "labels":
+ {
+ "hostName": "ecs-kwxtest"
+ },
+ "keywords": "log",
+ "limit": 10,
+ "is_count":true
+}
+
+
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 6, NO 7, and NO 8 are the target log events):
v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+{
+ "start_time": 1595659200000,
+ "end_time": 1595659500000,
+ "labels":
+ {
+ "hostName": "ecs-kwxtest"
+ },
+ "keywords": "log",
+ "line_num": "1595659490239433658",
+ "is_desc": "false",
+ "search_type": "forwards",
+ "limit": "3",
+ "is_count":true
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 8, NO 7, and NO 6 are the target log events):
{
+ "start_time": 1595659200000,
+ "end_time": 1595659500000,
+ "labels":
+ {
+ "hostName": "ecs-kwxtest"
+ },
+ "keywords": "log",
+ "line_num": "1595659490239433658",
+ "is_desc": "true",
+ "search_type": "backwards",
+ "limit": "3",
+ "is_count":true
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 2, NO 3, and NO 4 are the target log events):
v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+{
+ "start_time": 1595659200000,
+ "end_time": 1595659500000,
+ "labels":
+ {
+ "hostName": "ecs-kwxtest"
+ },
+ "keywords": "log",
+ "line_num": "1595659490239433658",
+ "is_desc": "false",
+ "search_type": "backwards",
+ "limit": "3",
+ "is_count":true
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 4, NO 3, and NO 2 are the target log events):
v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/content/query
+{
+ "start_time": 1595659200000,
+ "end_time": 1595659500000,
+ "labels":
+ {
+ "hostName": "ecs-kwxtest"
+ },
+ "keywords": "log",
+ "line_num": "1595659490239433658",
+ "is_desc": "true",
+ "search_type": "forwards",
+ "limit": "3",
+ "is_count":true
+}
+
+ Example Response- For the first query:
{
+ "count": 32,
+ "logs": [
+ {
+ "content": "2020-07-25/14:44:42 this <HighLightTag>log</HighLightTag> is Error NO 1\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433654"
+ },
+ {
+ "content": "2020-07-25/14:44:43 this <HighLightTag>log</HighLightTag> is Error NO 2\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433655"
+ },
+ {
+ "content": "2020-07-25/14:44:44 this <HighLightTag>log</HighLightTag> is Error NO 3\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433656"
+ },
+ {
+ "content": "2020-07-25/14:44:45 this <HighLightTag>log</HighLightTag> is Error NO 4\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433657"
+ },
+ {
+ "content": "2020-07-25/14:44:46 this <HighLightTag>log</HighLightTag> is Error NO 5\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433658"
+ },
+ {
+ "content": "2020-07-25/14:44:47 this <HighLightTag>log</HighLightTag> is Error NO 6\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433659"
+ },
+ {
+ "content": "2020-07-25/14:44:48 this <HighLightTag>log</HighLightTag> is Error NO 7\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433660"
+ },
+ {
+ "content": "2020-07-25/14:44:49 this <HighLightTag>log</HighLightTag> is Error NO 8\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433661"
+ },
+ {
+ "content": "2020-07-25/14:44:50 this <HighLightTag>log</HighLightTag> is Error NO 9\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490839420574"
+ },
+ {
+ "content": "2020-07-25/14:44:51 this <HighLightTag>log</HighLightTag> is Error NO 10\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659491839412667"
+ }
+]
+}
+
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 6, NO 7, and NO 8 are the target log events):
{
+ "count": 32,
+ "logs": [
+ {
+ "content": "2020-07-25/14:44:47 this <HighLightTag>log</HighLightTag> is Error NO 6\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433659"
+ },
+ {
+ "content": "2020-07-25/14:44:48 this <HighLightTag>log</HighLightTag> is Error NO 7\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433660"
+ },
+ {
+ "content": "2020-07-25/14:44:49 this <HighLightTag>log</HighLightTag> is Error NO 8\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433661"
+ }
+ ]
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 8, NO 7, and NO 6 are the target log events):
{
+ "count": 32,
+ "logs": [
+ {
+ "content": "2020-07-25/14:44:49 this <HighLightTag>log</HighLightTag> is Error NO 8\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433661"
+ },
+ {
+ "content": "2020-07-25/14:44:48 this <HighLightTag>log</HighLightTag> is Error NO 7\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433660"
+ },
+ {
+ "content": "2020-07-25/14:44:47 this <HighLightTag>log</HighLightTag> is Error NO 6\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433659"
+ }
+ ]
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 2, NO 3, and NO 4 are the target log events):
{
+ "count": 32,
+ "logs": [
+ {
+ "content": "2020-07-25/14:44:43 this <HighLightTag>log</HighLightTag> is Error NO 2\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433655"
+ },
+ {
+ "content": "2020-07-25/14:44:44 this <HighLightTag>log</HighLightTag> is Error NO 3\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433656"
+ },
+ {
+ "content": "2020-07-25/14:44:45 this <HighLightTag>log</HighLightTag> is Error NO 4\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433657"
+ }
+ ]
+}
+ - For a pagination query (Assume that the search starts from the log event containing NO 5 and the log events containing NO 4, NO 3, and NO 2 are the target log events):
{
+ "count": 32,
+ "logs": [
+ {
+ "content": "2020-07-25/14:44:45 this <HighLightTag>log</HighLightTag> is Error NO 4\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433657"
+ },
+ {
+ "content": "2020-07-25/14:44:44 this <HighLightTag>log</HighLightTag> is Error NO 3\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433656"
+ },
+ {
+ "content": "2020-07-25/14:44:43 this <HighLightTag>log</HighLightTag> is Error NO 2\n",
+ "labels": {
+ "hostName": "ecs-kwxtest",
+ "hostIP": "192.168.0.156",
+ "appName": "default_appname",
+ "containerName": "CONFIG_FILE",
+ "clusterName": "CONFIG_FILE",
+ "hostId": "9787ef31-fd7b-4eff-ba71-72d580f11f55",
+ "podName": "default_procname",
+ "clusterId": "CONFIG_FILE",
+ "nameSpace": "CONFIG_FILE",
+ "category": "LTS"
+ },
+ "line_num": "1595659490239433655"
+ }
+ ]
+}
+
+ Status code: 400
+ The request is invalid. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0009",
+ "error_msg" : "Failed to validate the request body"
+}
+ Status code: 401
+ Authentication failed. Check the token and try again.
+ {
+ "error_code" : "LTS.0003",
+ "error_msg" : "Invalid token"
+}
+ Status code: 403
+ The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ {
+ "error_code" : "LTS.0001",
+ "error_msg" : "Invalid projectId"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0202",
+ "error_msg" : "Failed to query lts log"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The request is successful.
+ |
+
+400
+ |
+The request is invalid. Modify the request based on the description in error_msg before a retry.
+ |
+
+401
+ |
+Authentication failed. Check the token and try again.
+ |
+
+403
+ |
+The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+503
+ |
+The requested service is unavailable.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0029.html b/docs/lts/api-ref/lts_api_0029.html
new file mode 100644
index 000000000..e7b728e31
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0029.html
@@ -0,0 +1,11 @@
+
+
+Log Management
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0030.html b/docs/lts/api-ref/lts_api_0030.html
new file mode 100644
index 000000000..81c174937
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0030.html
@@ -0,0 +1,474 @@
+
+
+Deleting a Log Transfer Task
+FunctionThis API is used to delete an OBS transfer task.
+
+ URIDELETE /v2/{project_id}/transfers
+
+
+
+ Table 2 Query parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_transfer_id
+ |
+Yes
+ |
+String
+ |
+Log transfer ID. You can obtain the ID by calling the API for querying a log transfer task or for creating a log transfer task.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+
+
+
+
+ Request Parameters
+ Table 3 Request header parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+X-Auth-Token
+ |
+Yes
+ |
+String
+ |
+User token obtained from IAM.
+Minimum length: 1000 characters
+Maximum length: 2000 characters
+ |
+
+Content-Type
+ |
+Yes
+ |
+String
+ |
+Set this parameter to application/json;charset=UTF-8.
+Minimum length: 30 characters
+Maximum length: 30 characters
+ |
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 4 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_id
+ |
+String
+ |
+Log group ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_group_name
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_streams
+ |
+Array of log_streams objects
+ |
+Log stream list.
+ |
+
+log_transfer_id
+ |
+String
+ |
+Log transfer task ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_transfer_info
+ |
+Table 6 object
+ |
+Log transfer information.
+ |
+
+
+
+
+
+ Table 5 log_streamsParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_stream_id
+ |
+String
+ |
+Log stream ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_stream_name
+ |
+String
+ |
+Log stream name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+
+
+
+
+ Table 6 log_transfer_infoParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_agency_transfer
+ |
+Table 7 object
+ |
+Information about delegated log transfer. This parameter is returned for a delegated log transfer task.
+ |
+
+log_create_time
+ |
+Integer
+ |
+Time when the log transfer task was created.
+Minimum value: 0
+Maximum value: 9999999999999
+ |
+
+log_storage_format
+ |
+String
+ |
+Log transfer format. The value can be RAW or JSON. RAW indicates raw log format, whereas JSON indicates JSON format. JSON and RAW are supported for OBS and DIS transfer tasks, but only RAW is supported for DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_detail
+ |
+Object
+ |
+Log transfer details.
+ |
+
+log_transfer_mode
+ |
+String
+ |
+Log transfer mode. cycle indicates periodical transfer, whereas realTime indicates real-time transfer. cycle is available to OBS transfer tasks and realTime is available to DIS and DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_status
+ |
+String
+ |
+Log transfer status. ENABLE indicates that log transfer is enabled, DISABLE indicates that log transfer is disabled, and EXCEPTION indicates that log transfer is abnormal.
+Enumerated values:
+
+ |
+
+log_transfer_type
+ |
+String
+ |
+Log transfer type. You can transfer logs to OBS, DIS, and DMS.
+Enumerated values:
+
+ |
+
+
+
+
+
+ Table 7 log_agency_transferParameter
+ |
+Type
+ |
+Description
+ |
+
+
+agency_domain_id
+ |
+String
+ |
+Delegator account ID.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_domain_name
+ |
+String
+ |
+Delegator account name.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_name
+ |
+String
+ |
+Name of the agency created by the delegator.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_project_id
+ |
+String
+ |
+Project ID of the delegator.
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+be_agency_domain_id
+ |
+String
+ |
+Account ID of the delegated party (ID of the account that created the log transfer task).
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+be_agency_project_id
+ |
+String
+ |
+Project ID of the delegated party (project ID of the account that created the log transfer task).
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 8 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 9 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+ |
+
+
+
+
+
+ Example RequestDeleting a log transfer task based on the task ID
+ DELETE https://{endpoint}/v2/{project_id}/transfers
+
+/v2/{project_id}/transfers?log_transfer_id=cfc43c45-9edc-4a03-8578-0eb00cxxxxxx
+
+ Example ResponseStatus code: 200
+ The log transfer task is deleted.
+ {
+ "log_group_id" : "9a7e2183-2d6d-4732-9a9b-e897fd4e49e0",
+ "log_group_name" : "lts-group-kafka",
+ "log_streams" : [{
+ "log_stream_id" : "839dac89-35af-4db2-ab4a-a7dda0d0d3f8",
+ "log_stream_name" : "lts-topic-kafka"
+ }
+ ],
+ "log_transfer_id" : "ddced522-233a-4181-a5fc-7b458c819afc",
+ "log_transfer_info" : {
+ "log_create_time" : 1634802241847,
+ "log_storage_format" : "JSON",
+ "log_agency_transfer" : {
+ "agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "agency_domain_name" : "paas_apm_z004xxxxx_xx",
+ "agency_name" : "test20210325",
+ "agency_project_id" : "2a473356cca5487f8373be891bfxxxxx",
+ "be_agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "be_agency_project_id" : "2a473356cca5487f8373be891bfxxxxx"
+ },
+ "log_transfer_detail" : {
+ //The following parameters are returned for an OBS transfer task:
+ "obs_period":2,
+ "obs_prefix_name":"",
+ "obs_period_unit":"min",
+ "obs_transfer_path":"/0002/LogTanks/xxx/",
+ "obs_bucket_name":"0002",
+ "obs_encrypted_enable":false,
+ "obs_dir_pre_fix_name":"",
+ "obs_time_zone": "UTC+01:00",
+ "obs_time_zone_id": "Africa/Lagos",
+ //The following parameters are returned for a DIS transfer task:
+ "dis_id":"xxxxx",
+ "dis_name":"xxxxxx"
+ //The following parameters are returned for a DMS transfer task:
+ "kafka_id":"xxxxxx",
+ "kafka_topic":"xxxxx"
+ },
+ "log_transfer_mode":"cycle",
+ "log_transfer_status":"ENABLE",
+ "log_transfer_type":"OBS"
+ }
+}
+ Status code: 400
+ Invalid request. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0207",
+ "error_msg" : "The log stream is associated by transfer"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0010",
+ "error_msg" : "The system encountered an internal error"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The log transfer task is deleted.
+ |
+
+400
+ |
+Invalid request. Modify the request based on the description in error_msg before a retry.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0031.html b/docs/lts/api-ref/lts_api_0031.html
new file mode 100644
index 000000000..8ff7dd792
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0031.html
@@ -0,0 +1,661 @@
+
+
+Updating a Log Transfer Task
+FunctionThis API is used to update an OBS transfer task.
+
+ URIPUT /v2/{project_id}/transfers
+
+
+
+ Request Parameters
+ Table 2 Request header parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+X-Auth-Token
+ |
+Yes
+ |
+String
+ |
+User token obtained from IAM.
+Minimum length: 1000 characters
+Maximum length: 2000 characters
+ |
+
+Content-Type
+ |
+Yes
+ |
+String
+ |
+Set this parameter to application/json;charset=UTF-8.
+Minimum length: 30 characters
+Maximum length: 30 characters
+ |
+
+
+
+
+
+ Table 3 Request body parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_transfer_id
+ |
+Yes
+ |
+String
+ |
+Log transfer task ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_transfer_info
+ |
+Yes
+ |
+Table 4 object
+ |
+Log transfer information.
+ |
+
+
+
+
+
+ Table 4 log_transfer_infoParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_storage_format
+ |
+Yes
+ |
+String
+ |
+Log transfer format. The value can be RAW or JSON. RAW indicates raw log format, whereas JSON indicates JSON format. JSON and RAW are supported for OBS and DIS transfer tasks, but only RAW is supported for DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_status
+ |
+Yes
+ |
+String
+ |
+Log transfer status. ENABLE indicates that log transfer is enabled, DISABLE indicates that log transfer is disabled, and EXCEPTION indicates that log transfer is abnormal.
+Enumerated values:
+
+ |
+
+log_transfer_detail
+ |
+Yes
+ |
+Table 5 object
+ |
+Log transfer details.
+ |
+
+
+
+
+
+ Table 5 log_transfer_detailParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+obs_period
+ |
+Yes
+ |
+Integer
+ |
+Length of the transfer interval for an OBS transfer task. This parameter is required to update an OBS transfer task. The log transfer interval is specified by the combination of the values of obs_period and obs_period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours.
+Enumerated values:
+
+ |
+
+obs_period_unit
+ |
+Yes
+ |
+String
+ |
+Unit of the transfer interval for an OBS transfer task. This parameter is required to update an OBS transfer task. The log transfer interval is specified by the combination of the values of obs_period and obs_period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours.
+Enumerated values:
+
+ |
+
+obs_bucket_name
+ |
+Yes
+ |
+String
+ |
+OBS bucket name. This parameter is required to update an OBS transfer task.
+Minimum length: 3 characters
+Maximum length: 63 characters
+ |
+
+obs_encrypted_id
+ |
+No
+ |
+String
+ |
+KMS key ID for an OBS transfer task. This parameter is required if encryption is enabled for the target OBS bucket.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+obs_dir_pre_fix_name
+ |
+No
+ |
+String
+ |
+Custom transfer path of an OBS transfer task. This parameter is optional.
+The value must match the regular expression:
+^(/)?([a-zA-Z0-9\._-]+)(/[a-zA-Z0-9\._-]+)*(/)?$
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+obs_prefix_name
+ |
+No
+ |
+String
+ |
+Transfer file prefix of an OBS transfer task. This parameter is optional.
+The value must match the regular expression:
+^[a-zA-Z0-9\._-]*$
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+obs_transfer_path
+ |
+No
+ |
+string
+ |
+OBS bucket path, which is the log transfer destination.
+ |
+
+obs_eps_id
+ |
+No
+ |
+string
+ |
+Enterprise project ID of an OBS transfer task.
+ |
+
+obs_encrypted_enable
+ |
+No
+ |
+boolean
+ |
+Whether OBS bucket encryption is enabled.
+ |
+
+tags
+ |
+No
+ |
+Array< String >
+ |
+If tag delivery is enabled, this field must contain the following host information: hostIP, hostId, hostName, pathFile, and collectTime.
+(Optional) Common fields include logStreamName, regionName, logGroupName, and projectId.
+(Optional) Enable the transfer tag: streamTag.
+ |
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 6 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_id
+ |
+String
+ |
+Log group ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_group_name
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_streams
+ |
+Array of Table 7 objects
+ |
+Log stream list.
+ |
+
+log_transfer_id
+ |
+String
+ |
+Log transfer task ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_transfer_info
+ |
+Table 8 object
+ |
+Log transfer information.
+ |
+
+
+
+
+
+ Table 7 log_streamsParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_stream_id
+ |
+String
+ |
+Log stream ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_stream_name
+ |
+String
+ |
+Log stream name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+
+
+
+
+ Table 8 log_transfer_infoParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_agency_transfer
+ |
+Table 9 object
+ |
+Information about delegated log transfer. This parameter is returned for a delegated log transfer task.
+ |
+
+log_create_time
+ |
+Integer
+ |
+Time when the log transfer task was created.
+Minimum value: 0
+Maximum value: 9999999999999
+ |
+
+log_storage_format
+ |
+String
+ |
+Log transfer format. The value can be RAW or JSON. RAW indicates raw log format, whereas JSON indicates JSON format. OBS transfer tasks support JSON.
+Enumerated values:
+
+ |
+
+log_transfer_detail
+ |
+Object
+ |
+Log transfer details.
+ |
+
+log_transfer_mode
+ |
+String
+ |
+Log transfer mode. cycle indicates periodical transfer, whereas realTime indicates real-time transfer. cycle is available to OBS transfer tasks and realTime is available to DIS and DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_status
+ |
+String
+ |
+Log transfer status. ENABLE indicates that log transfer is enabled, DISABLE indicates that log transfer is disabled, and EXCEPTION indicates that log transfer is abnormal.
+Enumerated values:
+
+ |
+
+log_transfer_type
+ |
+String
+ |
+Log transfer type. You can transfer logs to OBS.
+Enumerated values:
+
+ |
+
+
+
+
+
+ Table 9 log_agency_transferParameter
+ |
+Type
+ |
+Description
+ |
+
+
+agency_domain_id
+ |
+String
+ |
+Delegator account ID.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_domain_name
+ |
+String
+ |
+Delegator account name.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_name
+ |
+String
+ |
+Name of the agency created by the delegator.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_project_id
+ |
+String
+ |
+Project ID of the delegator.
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+be_agency_domain_id
+ |
+String
+ |
+Account ID of the delegated party (ID of the account that created the log transfer task).
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+be_agency_project_id
+ |
+String
+ |
+Project ID of the delegated party (project ID of the account that created the log transfer task).
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 10 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+ Status code: 500
+
+ Table 11 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+ |
+
+
+
+
+
+ Example Request- Updating an OBS transfer task
PUT https://{endpoint}/v2/{project_id}/transfers PUT https://{endpoint}/v2/{project_id}/transfers
+
+ /v2/{project_id}/transfers
+ {
+ "log_transfer_id" : "9f74e101-b969-483c-a610-d3f3064xxxxx",
+ "log_transfer_info" : {
+ "log_storage_format" : "JSON",
+ "log_transfer_status" : "DISABLE",
+ "log_transfer_detail" : {
+ "obs_period" : 3,
+ "obs_period_unit" : "hour",
+ "obs_bucket_name" : "0xxx",
+ "obs_encrypted_id" : "1bd90032-1424-481f-8558-ba49854xxxxx",
+ "obs_dir_pre_fix_name" : "xx",
+ "obs_prefix_name" : "xxxxx"
+ }
+ }
+}
+
+
+
+ Example ResponseStatus code: 200
+ The transfer task is updated.
+ The following parameters are returned for an OBS transfer task: {
+ "log_group_id" : "9a7e2183-2d6d-4732-9a9b-e897fd4e49e0",
+ "log_group_name" : "lts-group-kafka",
+ "log_streams" : [{
+ "log_stream_id" : "839dac89-35af-4db2-ab4a-a7dda0d0d3f8",
+ "log_stream_name" : "lts-topic-kafka"
+ }
+ ],
+ "log_transfer_id" : "ddced522-233a-4181-a5fc-7b458c819afc",
+ "log_transfer_info" : {
+ "log_create_time" : 1634802241847,
+ "log_storage_format" : "JSON",
+ "log_agency_transfer" : {
+ "agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "agency_domain_name" : "paas_apm_z004xxxxx_xx",
+ "agency_name" : "test20210325",
+ "agency_project_id" : "2a473356cca5487f8373be891bfxxxxx",
+ "be_agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "be_agency_project_id" : "2a473356cca5487f8373be891bfxxxxx"
+ },
+ "log_transfer_detail" : {
+ "obs_period":2,
+ "obs_prefix_name":"",
+ "obs_period_unit":"min",
+ "obs_transfer_path":"/0002/LogTanks/cn-north-7/",
+ "obs_bucket_name":"0002",
+ "obs_encrypted_enable":false,
+ "obs_dir_pre_fix_name":"",
+ "obs_time_zone": "UTC+01:00",
+ "obs_time_zone_id": "Africa/Lagos",
+ "tags": []
+ },
+ "log_transfer_mode":"cycle",
+ "log_transfer_status":"ENABLE",
+ "log_transfer_type":"OBS"
+ }
+}
+
+ Status code: 400
+ Invalid request. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0207",
+ "error_msg" : "The log stream is associated by transfer"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0010",
+ "error_msg" : "The system encountered an internal error"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The transfer task is updated.
+ |
+
+400
+ |
+Invalid request. Modify the request based on the description in error_msg before a retry.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/lts_api_0032.html b/docs/lts/api-ref/lts_api_0032.html
new file mode 100644
index 000000000..77ce086ab
--- /dev/null
+++ b/docs/lts/api-ref/lts_api_0032.html
@@ -0,0 +1,650 @@
+
+
+Querying a Log Transfer Task
+FunctionThis API is used to query an OBS transfer task.
+
+ URIGET /v2/{project_id}/transfers
+
+
+
+ Table 2 Query parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+log_transfer_type
+ |
+No
+ |
+String
+ |
+Log transfer type. You can transfer logs to OBS, DIS, and DMS.
+Enumerated values:
+
+ |
+
+log_group_name
+ |
+No
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_stream_name
+ |
+No
+ |
+String
+ |
+Log stream name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+offset
+ |
+No
+ |
+Integer
+ |
+Query cursor. Set the value to 0 in the first query. In subsequent queries, obtain the value from the response to the last request.
+Minimum value: 0
+Maximum value: 1024
+ |
+
+limit
+ |
+No
+ |
+Integer
+ |
+Number of records on each page.
+Minimum value: 0
+Maximum value: 100
+ |
+
+
+
+
+
+ Request Parameters
+ Table 3 Request header parametersParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+X-Auth-Token
+ |
+Yes
+ |
+String
+ |
+User token obtained from IAM.
+Minimum length: 1000 characters
+Maximum length: 2000 characters
+ |
+
+Content-Type
+ |
+Yes
+ |
+String
+ |
+Set this parameter to application/json;charset=UTF-8.
+Minimum length: 30 characters
+Maximum length: 30 characters
+ |
+
+
+
+
+
+ Response ParametersStatus code: 200
+
+ Table 4 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_transfers
+ |
+Array of Table 5 objects
+ |
+Log transfer task information.
+ |
+
+
+
+
+
+ Table 5 CreateTransferResponseBodyParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_group_id
+ |
+String
+ |
+Log group ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_group_name
+ |
+String
+ |
+Log group name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+log_streams
+ |
+Array of Table 6 objects
+ |
+Log stream list.
+ |
+
+log_transfer_id
+ |
+String
+ |
+Log transfer task ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_transfer_info
+ |
+Table 7 object
+ |
+Log transfer information.
+ |
+
+
+
+
+
+ Table 6 log_streamsParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_stream_id
+ |
+String
+ |
+Log stream ID.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+log_stream_name
+ |
+String
+ |
+Log stream name.
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+
+
+
+
+ Table 7 log_transfer_infoParameter
+ |
+Type
+ |
+Description
+ |
+
+
+log_agency_transfer
+ |
+Table 8 object
+ |
+Information about delegated log transfer. This parameter is returned for a delegated log transfer task.
+ |
+
+log_create_time
+ |
+Integer
+ |
+Time when the log transfer task was created.
+Minimum value: 0
+Maximum value: 9999999999999
+ |
+
+log_storage_format
+ |
+String
+ |
+Log transfer format. The value can be RAW or JSON. RAW indicates raw log format, whereas JSON indicates JSON format. JSON and RAW are supported for OBS and DIS transfer tasks, but only RAW is supported for DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_detail
+ |
+Object
+ |
+Log transfer details.
+ |
+
+log_transfer_mode
+ |
+String
+ |
+Log transfer mode. cycle indicates periodical transfer, whereas realTime indicates real-time transfer. cycle is available to OBS transfer tasks and realTime is available to DIS and DMS transfer tasks.
+Enumerated values:
+
+ |
+
+log_transfer_status
+ |
+String
+ |
+Log transfer status. ENABLE indicates that log transfer is enabled, DISABLE indicates that log transfer is disabled, and EXCEPTION indicates that log transfer is abnormal.
+Enumerated values:
+
+ |
+
+log_transfer_type
+ |
+String
+ |
+Log transfer type. You can transfer logs to OBS, DIS, and DMS.
+Enumerated values:
+
+ |
+
+
+
+
+
+ Table 8 log_agency_transferParameter
+ |
+Type
+ |
+Description
+ |
+
+
+agency_domain_id
+ |
+String
+ |
+Delegator account ID.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_domain_name
+ |
+String
+ |
+Delegator account name.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_name
+ |
+String
+ |
+Name of the agency created by the delegator.
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+agency_project_id
+ |
+String
+ |
+Project ID of the delegator.
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+be_agency_domain_id
+ |
+String
+ |
+Account ID of the delegated party (ID of the account that created the log transfer task).
+Minimum length: 1 character
+Maximum length: 128 characters
+ |
+
+be_agency_project_id
+ |
+String
+ |
+Project ID of the delegated party (project ID of the account that created the log transfer task).
+Minimum length: 32 characters
+Maximum length: 32 characters
+ |
+
+
+
+
+ Status code: 400
+
+ Table 9 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+Enumerated value:
+
+ |
+
+
+
+
+
+ Table 10 log_transfer_detailParameter
+ |
+Mandatory
+ |
+Type
+ |
+Description
+ |
+
+
+obs_period
+ |
+Yes
+ |
+Integer
+ |
+Length of the transfer interval for an OBS transfer task. This parameter is required to update an OBS transfer task. The log transfer interval is specified by the combination of the values of obs_period and obs_period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours.
+Enumerated values:
+
+ |
+
+obs_period_unit
+ |
+Yes
+ |
+String
+ |
+Unit of the transfer interval for an OBS transfer task. This parameter is required to update an OBS transfer task. The log transfer interval is specified by the combination of the values of obs_period and obs_period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours.
+Enumerated values:
+
+ |
+
+obs_bucket_name
+ |
+Yes
+ |
+String
+ |
+OBS bucket name. This parameter is required to update an OBS transfer task.
+Minimum length: 3 characters
+Maximum length: 63 characters
+ |
+
+obs_encrypted_id
+ |
+No
+ |
+String
+ |
+KMS key ID for an OBS transfer task. This parameter is required if encryption is enabled for the target OBS bucket.
+Minimum length: 36 characters
+Maximum length: 36 characters
+ |
+
+obs_dir_pre_fix_name
+ |
+No
+ |
+String
+ |
+Custom transfer path of an OBS transfer task. This parameter is optional.
+The value must match the regular expression:
+^(/)?([a-zA-Z0-9\._-]+)(/[a-zA-Z0-9\._-]+)*(/)?$
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+obs_prefix_name
+ |
+No
+ |
+String
+ |
+Transfer file prefix of an OBS transfer task. This parameter is optional.
+The value must match the regular expression:
+^[a-zA-Z0-9\._-]*$
+Minimum length: 1 character
+Maximum length: 64 characters
+ |
+
+obs_transfer_path
+ |
+No
+ |
+string
+ |
+OBS bucket path, which is the log transfer destination.
+ |
+
+obs_eps_id
+ |
+No
+ |
+string
+ |
+Enterprise project ID of an OBS transfer task.
+ |
+
+obs_encrypted_enable
+ |
+No
+ |
+boolean
+ |
+Whether OBS bucket encryption is enabled.
+ |
+
+
+
+
+ Status code: 500
+
+ Table 11 Response body parametersParameter
+ |
+Type
+ |
+Description
+ |
+
+
+error_code
+ |
+String
+ |
+Error code.
+Minimum length: 8 characters
+Maximum length: 8 characters
+ |
+
+error_msg
+ |
+String
+ |
+Error message.
+ |
+
+
+
+
+
+ Example RequestIf no parameter is specified, all log transfer tasks are returned. If log_transfer_type, log_group_name, and log_stream_name are specified, the corresponding log transfer task is returned.
+ GET https://{endpoint}/v2/{project_id}/transfers
+
+/v2/{project_id}/transfers
+/v2/{project_id}/transfers?log_group_name=lts-group-txxx
+/v2/{project_id}/transfers?log_transfer_type=OBS
+/v2/{project_id}/transfers?log_stream_name=lts-topic-testRexxx
+/v2/{project_id}/transfers?log_group_name=lts-group-txxx&log_transfer_type=OBS
+/v2/{project_id}/transfers?log_group_name=lts-group-txxx&log_stream_name=lts-topic-testRxxx
+/v2/{project_id}/transfers?log_transfer_type=OBS&log_stream_name=lts-topic-testRxxx
+/v2/{project_id}/transfers?log_group_name=lts-group-txxx&log_transfer_type=OBS&log_stream_name=lts-topic-testRexxx
+
+ Example ResponseStatus code: 200
+ The query is successful.
+ The following parameters are returned for an OBS transfer task:
+ {
+ "log_transfers" : [{
+ "log_group_id" : "9a7e2183-2d6d-4732-9a9b-e897fd4e49e0",
+ "log_group_name" : "lts-group-kafka",
+ "log_streams" : [{
+ "log_stream_id" : "839dac89-35af-4db2-ab4a-a7dda0d0d3f8",
+ "log_stream_name" : "lts-topic-kafka"
+ }
+ ],
+ "log_transfer_id" : "ddced522-233a-4181-a5fc-7b458c819afc",
+ "log_transfer_info" : {
+ "log_create_time" : 1634802241847,
+ "log_storage_format" : "JSON",
+ "log_agency_transfer" : {
+ "agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "agency_domain_name" : "paas_apm_z004xxxxx_xx",
+ "agency_name" : "test20210325",
+ "agency_project_id" : "2a473356cca5487f8373be891bfxxxxx",
+ "be_agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
+ "be_agency_project_id" : "2a473356cca5487f8373be891bfxxxxx"
+ },
+ "log_transfer_detail" : {
+ "obs_period":2,
+ "obs_prefix_name":"",
+ "obs_period_unit":"min",
+ "obs_transfer_path":"/0002/LogTanks/xxx/",
+ "obs_bucket_name":"0002",
+ "obs_encrypted_enable":false,
+ "obs_dir_pre_fix_name":""
+ },
+ "log_transfer_mode":"cycle",
+ "log_transfer_status":"ENABLE",
+ "log_transfer_type":"OBS"
+ }
+ }
+ ]
+}
+ Status code: 400
+ Invalid request. Modify the request based on the description in error_msg before a retry.
+ {
+ "error_code" : "LTS.0205",
+ "error_msg" : "The log stream name has been existed"
+}
+ Status code: 500
+ The server has received the request but encountered an internal error.
+ {
+ "error_code" : "LTS.0010",
+ "error_msg" : "The system encountered an internal error"
+}
+
+ Status Codes
+ Status Code
+ |
+Description
+ |
+
+
+200
+ |
+The query is successful.
+ |
+
+400
+ |
+Invalid request. Modify the request based on the description in error_msg before a retry.
+ |
+
+500
+ |
+The server has received the request but encountered an internal error.
+ |
+
+
+
+
+
+
+
+
+
diff --git a/docs/lts/api-ref/public_sys-resources/icon-arrowdn.gif b/docs/lts/api-ref/public_sys-resources/icon-arrowdn.gif
index 84eec9be2..379428032 100644
Binary files a/docs/lts/api-ref/public_sys-resources/icon-arrowdn.gif and b/docs/lts/api-ref/public_sys-resources/icon-arrowdn.gif differ
diff --git a/docs/lts/api-ref/public_sys-resources/icon-arrowrt.gif b/docs/lts/api-ref/public_sys-resources/icon-arrowrt.gif
index 39583d168..6aaaa11c2 100644
Binary files a/docs/lts/api-ref/public_sys-resources/icon-arrowrt.gif and b/docs/lts/api-ref/public_sys-resources/icon-arrowrt.gif differ
|
|---|
|
|---|
|