edit-icon download-icon

DeleteConfig

Last Updated: Apr 02, 2018

Delete a specific configuration. If the configuration has been applied to the machine group, logs cannot be collected based on this configuration.

DELETE /configs/{configName}

Request syntax

  1. DELETE /configs/<configName> HTTP/1.1
  2. Authorization: <AuthorizationString>
  3. Date: <GMT Date>
  4. Host: <Project Endpoint>
  5. x-log-apiversion: 0.6.0
  6. x-log-signaturemethod: hmac-sha1

Request parameters

URL parameters

Parameter name Type Required Description
ConfigName string Yes The configuration name.

Request header

The DeleteConfig 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 header

The DeleteConfig 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 common error codes of Log Service APIs, the DeleteConfig API may return the following special error codes.

HTTP status code Error code Error message
404 ConfigNotExist config {Configname} does not exist
400 InvalidParameter invalid config resource json
500 InternalServerError internal server error

Example

Request example

  1. DELETE /configs/logtail-config-sample
  2. Header :
  3. {
  4. "Content-Length": 0,
  5. "x-log-signaturemethod": "hmac-sha1",
  6. "x-log-bodyrawsize": 0,
  7. "User-Agent": "log-python-sdk-v-0.6.0",
  8. "Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com",
  9. "Date": "Mon, 09 Nov 2015 09:28:21 GMT",
  10. "x-log-apiversion": "0.6.0",
  11. "Authorization": "LOG 94to3z418yupi6ikawqqd370:utd/O1JNCYvcRGiSXHsjKhTzJDI="
  12. }

Response example

  1. Header :
  2. {
  3. "date": "Mon, 09 Nov 2015 09:28:21 GMT",
  4. "connection": "close",
  5. "x-log-requestid": "5640673599248CAA230836C6",
  6. "content-length": "0",
  7. "server": "nginx/1.6.1"
  8. }
Thank you! We've received your feedback.