DeleteLogs
Deletes log data from a Logstore under a specified project
Operation description
The Host is composed of the project name and the Log Service endpoint. You need to specify the project in the Host.
Try it now
Test
RAM authorization
Request syntax
POST /logstores/{logstore}/deletelogs HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| logstore |
string |
No |
Queries data in the Logstore. |
ali-test-logstore |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Request parameters. |
|
| from |
integer |
Yes |
The start time of the query. This time refers to the log time specified when the log data was written. The time interval defined by the request parameters from and to follows the left-closed, right-open principle. That is, the interval includes the start time but does not include the end time. If the values of from and to are the same, the interval is invalid, and the function returns an error directly. Unix timestamp format, indicating the number of seconds elapsed since 1970-01-01 00:00:00 UTC. |
1627268100 |
| to |
integer |
Yes |
The end time of the query. This time refers to the log time specified when the log data was written. The time interval defined by the request parameters from and to follows the left-closed, right-open principle. That is, the interval includes the start time but does not include the end time. If the values of from and to are the same, the interval is invalid, and the function returns an error directly. Unix timestamp format, indicating the number of seconds elapsed since 1970-01-01 00:00:00 UTC. |
1627268200 |
| query |
string |
No |
Optional: The query statement used to filter the logs to be updated. For more information, see Query overview. Note: This parameter supports only query statements. Analysis statements such as SPL and SQL are not supported. |
status:400 |
| rowId |
string |
No |
Optional: The value of the built-in field rowid that is automatically returned in the query results. One of rowId and query must be specified. If both are specified, rowId takes precedence. |
0|1000001|638732499 |
| project |
string |
No |
The name of the project. |
ali-project-test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| affectedRows |
integer |
The number of log rows that were deleted. |
10 |
Examples
Success response
JSON format
{
"affectedRows": 10
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.