Deleting the dataset

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-10

You can delete the data of a specific dataset. You can also delete the schema from the dataset by setting the request parameter to true: clearSchema=true.

Request line

GET baseURL/dbapi.do?action=clearDataset&dataset=<Datasetname>&clearSchema=<true | false>

Request body

Not applicable.

Request parameters

Parameter Type Description
action String {clearDataset}

Specify the API function to be invoked.

dataset String Dataset name. From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed.
clearSchema Boolean (Optional) Indicates if the schema must be deleted.

true or false

Default : false

Request example

GET /dbapi.do?action=clearDataset&dataset=defaultDs HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk

Response body

{
  "cleared":""
}
{
  "code":"",
  "error":""
}

Response example

{
  "cleared":"defaultDs"
}

Response parameters

Parameter

Type

Description

cleared String Cleared dataset name.
code String Eight-digit hexadecimal error code.
error String Error message.

Status codes

Status code

Message

Description

200 OK Request was successful, and the response body contains the requested log details.
206 PARTIAL CONTENT Request is in progress, and the incremental content is available in the response body.
400 BAD REQUEST Request URL or request body validation failed. Check the response body for details.
401 UNAUTHORIZED Supplied authentication token is invalid or does not have the appropriate credentials to access the resource.
404 NOT FOUND API server could not find a resource matching the request.
405 METHOD NOT ALLOWED Request HTTP method is not allowed for the operation.
500 SERVER ERROR API operation request failed. Check the response body for details.

Response codes

The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.

Response code Message Condition
150000E4 Mandatory parameter {dataset} is not specified. The dataset parameter is not specified.
1502000F Invalid value specified for parameter {clearSchema}. Invalid value is specified for the clearSchema parameter.
150000E9 License is not valid. License is not uploaded, or the uploaded license is invalid or expired.
150000E9 Authorization needed. Request is sent with an invalid authentication token.
150000E4 Dataset with {name}:[ds1] does not exist. Request is sent for a dataset that does not exist.
150000E0 HTTP method [POST] is not supported for action [clearDataset.] Request is sent with an HTTP method other than GET.
150200E2 Application encountered an internal error. API server encountered an unknown error.