Delete a Logstore, including all the shards and indexes in the Logstore.

Request syntax

DELETE /logstores/{logstoreName} HTTP/1.1
Authorization: <AuthorizationString> 
Date: <GMT Date>
Host: <Project Endpoint>
x-log-apiversion: 0.6.0
x-log-signaturemethod: hmac-sha1

Request Parameters

Table 1. Request Parameters
Parameter Name Type Required  Description
logstoreName string Yes The Logstore name, which must be unique in the same project.

Request header

The DeleteLogstore API does not have a special request header. For more information about the public request headers of Log Service APIs, see  Public request header.

Response head

The DeleteLogstore API does not have a special response header. For more information about the public response headers of Log Service APIs, see Public response header.

Response element

The returned HTTP status code is 200.

Error code

Besides the  Log Service API 的 Common error codes of Log Service APIs, the DeleteLogstore API may return the following special error codes.

HTTP status code Error Code  Error message
404 LogStoreNotExist logstore {logstoreName} does not exist
500 InternalServerError Specified Server Error Message

Example

Request example:

DELETE /logstores/test_logstore HTTP/1.1
Header :
{
x-log-apiversion=0.6.0, 
Authorization=LOG 94to3z418yupi6ikawqqd370:fPsNBIuJR1xvQZolwi8+Cw5R/fQ=, 
Host=ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com, 
Date=Wed, 11 Nov 2015 08:09:38 GMT, 
Content-Length=0, 
x-log-signaturemethod=hmac-sha1, 
User-Agent=sls-java-sdk-v-0.6.0, 
Content-Type=application/json
}

Response example:

HTTP/1.1 200 OK
Header:
{
Date=Wed, 11 Nov 2015 08:09:39 GMT, 
Content-Length=0, 
x-log-requestid=5642F7C399248C817B013A07, 
Connection=close, 
Server=nginx/1.6.1
}