In Episode 11 of the UiPath HTTP Request Masterclass, learn how to import an API request into UiPath HTTP Request using a cURL command.
Instead of manually configuring the HTTP method, URL, headers, and request body, you can import the cURL command and let UiPath populate the request configuration.
### API Details
- **Method:** POST
- **Endpoint:** [https://dummyjson.com/products/add](https://dummyjson.com/products/add)
- **Request Body Type:** JSON
- **Content-Type:** application/json
- **Authentication:** Not required
### Sample Request Body
```json
{
"title": "UiPath Automation Course",
"price": 499,
"category": "education",
"description": "Learn API automation using UiPath HTTP Request"
}
```
### cURL Command
Copy and use this command in UiPath's **Import from cURL** option:
```bash
curl --location 'https://dummyjson.com/products/add' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"title": "UiPath Automation Course",
"price": 499,
"category": "education",
"description": "Learn API automation using UiPath HTTP Request"
}'
```
### What You'll Learn
- Understand what cURL is and why it is used.
- Find API request examples in API documentation.
- Generate a cURL command using Postman's Code feature.
- Import a cURL command into UiPath HTTP Request.
- Review imported URL, method, headers, and request body.
- Execute the imported API request and inspect the response.
### Expected Result
The DummyJSON API returns a simulated product creation response with product details and an assigned ID.
**Note:** DummyJSON is a public testing API. The product is simulated and is not permanently stored.
\#UiPath #APIAutomation #automatewithrakesh