Deletes a Logstore, including all 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

  • Request headers

    The DeleteLogstore operation does not have operation-specific request headers. For information about the common request headers of Log Service API operations, see Common request headers.

  • Parameters
    Parameter Type Required Example Description
    logstoreName string Yes test_logstore The name of the Logstore. The name must be unique in a project.

Response parameters

  • Response headers

    The DeleteLogstore operation does not have operation-specific response headers. For information about the common response headers of Log Service API operations, see Common response headers.

  • Response elements

    The HTTP status code 200 is returned.

Examples

  • Sample requests
    DELETE /logstores/test_logstore HTTP/1.1
    Header :
    {
    x-log-apiversion=0.6.0, 
    Authorization=LOG <yourAccessKeyId>:<yourSignature>, 
    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
    }
  • Sample success responses
    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
    }

Error codes

HTTP status code Error code Error message Description
404 LogStoreNotExist logstore {logstoreName} does not exist The error message returned because the specified Logstore does not exist.
500 InternalServerError Specified Server Error Message The error message returned because an internal server error has occurred.

For more information about the error codes, see Common error codes.