Skip to content

Clear table

Sending a POST request to DataTablesClearTable collection allows clearing data table contents. This is an equivalent of SQL TRUNCATE query. Please note that it is impossible to clear tables that are a destination part of relationship.

Request data format

Element/attributeTypeNotes
ApiKeystringYour API key, required for authentication. Required.
TableNamestringTable name. Required.

Response

Successfully clearing the table will result in HTTP 204 No Content response.

Examples

Request:

POST https://api.esv2.com/v2/Api/DataTablesClearTable/ HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 269

<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
   <ApiKey>test_api_key1</ApiKey>
   <TableName>Table1</TableName>
</ApiRequest>

OK response:

HTTP/1.1 204 No Content 
Cache-Control: private 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 1.0 
X-AspNet-Version: 2.0.50727 
X-Powered-By: ASP.NET 
Date: Wed, 28 Oct 2009 15:35:17 GMT 
Content-Length: 0

Error response:

HTTP/1.1 400 Bad Request 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 1.0 
X-AspNet-Version: 2.0.50727 
X-Powered-By: ASP.NET 
Date: Wed, 28 Oct 2009 11:32:07 GMT 
Content-Length: 273 

<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ErrorMessage>
    <Code>400</Code>
    <Message>Data tables that are destination of any relationship cannot be cleared.</Message>
  </ErrorMessage>
</ApiResponse>
On this page
To top