# DELETE

#### Overview

This document serves as a guide for automating a simple DELETE request API without authentication. The API endpoint used in this tutorial is`https://api-generator.retool.com/7kbSLy/data/53`, which is designed to return data for a specified ID.

#### Automating DELETE Request

**Step 1: Importing the cURL command into Postman**

The cURL command for the DELETE request is as follows:

```
curl --location --request DELETE 'https://api-generator.retool.com/7kbSLy/data/53'
```

Upon importing this cURL into Postman, it translates into an interface with the request and response sections, as seen in the screenshot.

<figure><img src="/files/MpTp61a3kqkWw2aAzXkp" alt=""><figcaption></figcaption></figure>

**Step 2: Template for Scriptless Automation**

To automate the example without writing scripts, the following template can be used:

```
DEPENDANT_TEST_CASE,NONE,
END_POINT,https://api-generator.retool.com/7kbSLy/data/53,
METHOD,DELETE,
PARAMS:KEY,NONE,
PARAMS:VALUE,NONE,
AUTH:KEY,NONE,
AUTH:VALUE,NONE,
HEADERS:KEY,NONE,
HEADERS:VALUE,NONE,
BODY:KEY,NONE,
BODY:VALUE,NONE,
RESPONSE:CODE,200,
RESPONSE:JSON_PATH,NONE,
RESPONSE:EXPECTED_VALUE,NONE,
RESPONSE:STORE_VALUE,NONE,
```

This template sets up a test for the DELETE request by specifying the endpoint, method, parameters, and the expected response.

<figure><img src="/files/nBfqWyWQUZ3ZIbXRAXzx" alt=""><figcaption></figcaption></figure>

**Step 3: Execution and Report Generation**

When the test case is executed using the template, the automation tool generates a report that records each step performed during the test. The report includes:

* The type of request and the endpoint used.
* The type of request and the response received.
* Validation of the response code.

<figure><img src="/files/FCv1yTI4PiPJNhJ8jreV" alt=""><figcaption></figcaption></figure>

**Relaxed HTTPS Validation**

For environments where HTTPS certificate validation is not required, or in cases where self-signed certificates are in use, the automation tool supports relaxed HTTPS validation. This means the tool will not enforce strict validation of the SSL certificate, allowing the DELETE request to proceed even if the SSL certificate cannot be validated. To use the Relaxed HTTPS for DELETE request change DELETE -> RELAX\_DELETE.

#### Validating the Response

The automation checks for:

* The HTTP status code, which is expected to be `200`.

In this example DELETE request doesn't have the body


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.precisiontestautomation.in/scriptlessautomation/automation-platforms/scriptlessapi-automation/example-of-api-requests/delete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
