---
updatedAt: 2026-09-28T14:14:21.000Z
agentTools:
  projectIndex: https://developer.searchblox.com/llms.txt
---

# Clear Collection - /rest/v2/api/clear

JSON  Payload

[block:parameters]
{
  "data": {
    "h-0": "XML Tag",
    "h-1": "Attribute",
    "h-2": "Value",
    "0-0": "searchblox",
    "0-1": "licenseid/apikey",
    "0-2": "License value from license.xml file",
    "1-0": "apikey",
    "1-2": "API key from https://localhost:8443/console?page=admin&tab=license.",
    "2-0": "document",
    "2-1": "colname",
    "2-2": "Name of the custom collection"
  },
  "cols": 3,
  "rows": 3
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "12.2"
  },
  "servers": [
    {
      "url": "https://127.0.0.1:8443/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/rest/v2/api/clear": {
      "post": {
        "summary": "Clear Collection - /rest/v2/api/clear",
        "description": "JSON  Payload",
        "operationId": "json-restv1apiclear",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SB-PKEY",
            "in": "header",
            "description": "Security Key by SBAdmin or Admin",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "status code : 400"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {},
              "examples": {
                "Request Example": {
                  "value": {
                    "apikey": "5BD07C1F3E8555C66E1E5B10FCAB315F",
                    "document": {
                      "colname": "Custom_Collection"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```