> For the complete documentation index, see [llms.txt](https://docs.precisiontestautomation.in/scriptlessautomation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.precisiontestautomation.in/scriptlessautomation/automation-platforms/scriptlessapi-automation/example-of-api-requests.md).

# Example of API Requests

This section provides you with examples of how to send requests to the API. The examples cover a range of common use cases, demonstrating the required format and parameters for each request. In this section we will be seeing GET,POST,PUT, DELETE

### API Automation Execution

To automate API execution, follow these steps for the [initial](/scriptlessautomation/get-started/start-with-automation.md) setup. After completing the initial setup, you can trigger automation either through IntelliJ/IDE or via Maven commands. Before executing the automation, it's crucial to update two parameters from the configuration files: '`Platform`' from '`testNgConfiguration.properties`' and '`TEST_TRAIL_IDS`' from '`testManagementConfiguration.properties`'. These changes are necessary to enable the automation to identify that it is meant to automate API testing and to specify which specific test cases to pick.

***Note*****: If TestRail is not available in your project, it is advisable to disable it.**

#### Automation Configuration

<figure><img src="https://1894392350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaaGnfeM1ej74weWKLs%2Fuploads%2FMYyeMeHvYyi8rHY71F53%2FScreenshot%202023-11-19%20at%204.22.11%20AM.png?alt=media&amp;token=4e848d59-bb90-4561-af61-9964286b0a15" alt=""><figcaption></figcaption></figure>

After setting up the above configuration trigger automation through maven or intellij

#### Running through intellij

To run automation through maven one should need to create a configuration in intellij

<figure><img src="https://1894392350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiGaaGnfeM1ej74weWKLs%2Fuploads%2F50GrPX50X6fNniIzyk4z%2FScreenshot%202023-11-19%20at%204.31.17%20AM.png?alt=media&amp;token=88cf9b4d-f82d-4e80-9b01-55a121e7d616" alt=""><figcaption></figcaption></figure>

* **Main Class**: `runner.ScriptLessApplication`
  * The entry point of the automation process.
* **CLI Arguments**: `true`, `[registered email]`, `[token]`
  * `true` specifies execution through Maven and `false`  specifies not executing through maven.
  * `[registered email]` should be the user's registered email address.
  * `[token]` is a secret key distributed via email.

While setting up configuration keep `false`, `[registered email]`, `[token]`for more details read [here](/scriptlessautomation/automation-import-notes/points-to-remember.md#ide-run-configuration)
