# Example of sample API request using just sense-talk script (not with UI)

**URL:** <https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264>\
**Category:** Eggplant Functional\
**Tags:** api, script, sensetalk\
**Created:** [January 7, 2025, 7:34pm UTC](https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264 "2025-01-07T19:34:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [January 7, 2025, 7:34pm UTC](https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264/1 "2025-01-07T19:34:46Z")

</div>

Looking for any example of REST API calls and handling responses via sense-talk. Is there any help doc or sample that I can check? Appreciate it.

---

<div class="post-metadata">

**Author:** ![Karsten](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@Karsten](https://forums.eggplantsoftware.com/u/Karsten)\
**Post date:** [January 9, 2025, 1:30pm UTC](https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264/2 "2025-01-09T13:30:53Z")

</div>

Hey @scsvel,

here are the docs references for Sensetalk API commands.

You might be surprised how simple some of them are.

- [Post data to URL](https://docs.eggplantsoftware.com/studio/stk-url-transactions-formatting/#post-command) `post queryData to url "http://someservice.net" with headers {"Content-Type": "text/xml"}` or put

- [Post Multipart | files](https://docs.eggplantsoftware.com/studio/stk-url-transactions-formatting/#post-multipart) `post multipart {filename:"/tmp/xyz", body:file "/tmp/xyz" as data} to URL serverURL`

- [POST MIME](https://docs.eggplantsoftware.com/studio/stk-url-transactions-formatting/#multipartmime-function) `put (multipartMIME("Secret Message" as data) adding {request:"/"}) as http`

- [URL Encode](https://docs.eggplantsoftware.com/studio/stk-url-transactions-formatting/#url-encode)

- Results are stored in the variable `it` means `put it -- will print the result of the request before`

```auto
get url "https://api.postcodes.io/random/postcodes"
put it
put url "https://api.postcodes.io/random/postcodes"

```

Hope this is what you aimed for.

Cheers,  
Karsten

---

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [January 9, 2025, 3:30pm UTC](https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264/3 "2025-01-09T15:30:00Z")

</div>

Thanks @Karsten . Exactly I am looking for.

---

<div class="post-metadata">

**Author:** ![chucky723](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@chucky723](https://forums.eggplantsoftware.com/u/chucky723)\
**Post date:** [February 5, 2025, 12:02pm UTC](https://forums.eggplantsoftware.com/t/example-of-sample-api-request-using-just-sense-talk-script-not-with-ui/14264/5 "2025-02-05T12:02:41Z")

</div>

@scsvel @Karsten

Thanks for making this post it’s helpful to me.

Best Regard,  
Chucky
