# Non Restful request

**URL:** <https://discuss.jsonapi.org/t/non-restful-request/807>\
**Category:** Uncategorized\
**Created:** [October 18, 2016, 1:57pm UTC](https://discuss.jsonapi.org/t/non-restful-request/807 "2016-10-18T13:57:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudedolf](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dudedolf](https://discuss.jsonapi.org/u/dudedolf)\
**Post date:** [October 18, 2016, 1:57pm UTC](https://discuss.jsonapi.org/t/non-restful-request/807/1 "2016-10-18T13:57:29Z")

</div>

Hi,

Firstly thank you for the hard work that has gone into providing this standard, long may it continue 🙂.

I am new to this, about 1 week of usage and trying to understand and I would like to know the best practice for managing non rest actions. As an example, I have a system that can CRUD rooms, however, there is a need to batch create rooms. Naturally (i think) I would use GET/POST/PATCH/DELETE on the /rooms route and provide the relevant json (where applicable) what strategy should I use to do a batch action. The action would create Rooms with a parameter Quantity used to loop and create that many rooms. I assume i would return the rooms created in the response but do not know the best structure for the request.

Many thanks

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/steveklabnik/32/2_2.png) [@steveklabnik](https://discuss.jsonapi.org/u/steveklabnik)\
**Post date:** [October 18, 2016, 3:42pm UTC](https://discuss.jsonapi.org/t/non-restful-request/807/2 "2016-10-18T15:42:20Z")

</div>

There’s a long-standing joke in the REST world:

> What’s the answer to every question about REST?
> 
> Make another resource.

Resources do not have to map to a database table. Need to batch create  
rooms? Then create a resource that lets you batch create rooms. That’s  
totally fine.

---

<div class="post-metadata">

**Author:** ![dudedolf](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@dudedolf](https://discuss.jsonapi.org/u/dudedolf)\
**Post date:** [October 18, 2016, 7:16pm UTC](https://discuss.jsonapi.org/t/non-restful-request/807/3 "2016-10-18T19:16:08Z")

</div>

Ha ha…i’ll try that one at work tomorrow. 🙂

I assume I would not pass an id and send the request via post. Would it also be correct to return the new resources (rooms) created? does that break any conventions?

Cheers
