# Post req

**URL:** <https://community.gatling.io/t/post-req/5050>\
**Category:** Gatling (Open-Source)\
**Created:** [May 30, 2019, 9:35am UTC](https://community.gatling.io/t/post-req/5050 "2019-05-30T09:35:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Balacek](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@David\_Balacek](https://community.gatling.io/u/David_Balacek)\
**Post date:** [May 30, 2019, 9:35am UTC](https://community.gatling.io/t/post-req/5050/1 "2019-05-30T09:35:25Z")

</div>

Hi guys i’ve POST req. to API, which returns me a json. And I need to obtain one single atrubute from it, But i am getting error over and over.

val scn = scenario(“Acces token simulation”)  
.exec(http(“request\_0”)  
.post("…")  
.headers(headers\_0)  
.formParam(…)  
.formParam(…)  
.formParam(…))  
.check(jsonPath("$.tokenId").saveAs(“tokenId”))

Only thing i need to save tokenId from returned json to tokenId prom, How can i do that pls?

---

<div class="post-metadata">

**Author:** ![James\_Warr](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@James\_Warr](https://community.gatling.io/u/James_Warr)\
**Post date:** [May 31, 2019, 2:59am UTC](https://community.gatling.io/t/post-req/5050/2 "2019-05-31T02:59:22Z")

</div>

can you post the actual response you get from your api?
