Proposed PUT/POST guidelines for REST APIs

10 views
Skip to first unread message

Chongsun Ahn

unread,
Sep 15, 2016, 2:59:41 AM9/15/16
to OpenLMIS Dev
Hey everyone,

As we continue to work on designing and implementing REST APIs for the different services, Josh and I would like to propose guidelines for PUT and POST endpoints. I quickly wrote up a document outlining the proposal. It is on the wiki at:


Feedback is appreciated.

Shalom,
Chongsun

-- ​
There are 10 kinds of people in this world; those who understand binary, and those who don’t.

Software Development Engineer
 
VillageReach Starting at the Last Mile
2900 Eastlake Ave. E, Suite 230,  Seattle, WA 98102, USA
DIRECT: 1.206.512.1536   CELL: 1.206.910.0973   FAX: 1.206.860.6972
SKYPE: chongsun.ahn.vr
Connect on Facebook, Twitter and our Blog

Paweł Gesek

unread,
Sep 15, 2016, 5:33:51 AM9/15/16
to openlm...@googlegroups.com

That sounds about right to me. One question, for what resources do we want to allow PUT, which is basically putting ? For example don't think we would want to make it possible to put whole requisition objects.

Also important to note about PUT is that it should be idempotent, so sending the same request multiple times should have the same result.

Regards,

Paweł

--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev...@googlegroups.com.
To post to this group, send email to openlm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlmis-dev/E169907E-8C9D-4644-9804-10292DE0DC7F%40villagereach.org.
For more options, visit https://groups.google.com/d/optout.

Chongsun Ahn

unread,
Sep 15, 2016, 12:04:29 PM9/15/16
to OpenLMIS Dev
Hey Pawel,

I think we would mainly allow PUT for resources that are simple for CRUD, like reference data.


Shalom,
Chongsun

-- ​
There are 10 kinds of people in this world; those who understand binary, and those who don’t.

Software Development Engineer
 
VillageReach Starting at the Last Mile
2900 Eastlake Ave. E, Suite 230,  Seattle, WA 98102, USA
DIRECT: 1.206.512.1536   CELL: 1.206.910.0973   FAX: 1.206.860.6972
SKYPE: chongsun.ahn.vr
Connect on Facebook, Twitter and our Blog

Darius Jazayeri

unread,
Sep 15, 2016, 5:37:45 PM9/15/16
to Chongsun Ahn, OpenLMIS Dev
This doesn't sound quite right to me.

In the "resources that have a natural key" scenario, what if you want to edit some of the fields that make up a natural key? E.g. I want to rename a right in the system from "Get Xyz" to "Fetch Xyz". As you've drawn things out, this can't be done.

-Darius

On Thu, Sep 15, 2016 at 9:04 AM, Chongsun Ahn <chongs...@villagereach.org> wrote:
Hey Pawel,

I think we would mainly allow PUT for resources that are simple for CRUD, like reference data.

Shalom,
Chongsun

-- ​
There are 10 kinds of people in this world; those who understand binary, and those who don’t.

Software Development Engineer
 
VillageReach Starting at the Last Mile
2900 Eastlake Ave. E, Suite 230,  Seattle, WA 98102, USA
DIRECT: 1.206.512.1536   CELL: 1.206.910.0973   FAX: 1.206.860.6972
SKYPE: chongsun.ahn.vr
Connect on Facebook, Twitter and our Blog
On Sep 15, 2016, at 2:33 AM, Paweł Gesek <pge...@soldevelo.com> wrote:

That sounds about right to me. One question, for what resources do we want to allow PUT, which is basically putting ? For example don't think we would want to make it possible to put whole requisition objects.

Also important to note about PUT is that it should be idempotent, so sending the same request multiple times should have the same result.

Regards,

Paweł


On 15.09.2016 08:59, Chongsun Ahn wrote:
Hey everyone,

As we continue to work on designing and implementing REST APIs for the different services, Josh and I would like to propose guidelines for PUT and POST endpoints. I quickly wrote up a document outlining the proposal. It is on the wiki at:


Feedback is appreciated.

Shalom,
Chongsun

-- ​
There are 10 kinds of people in this world; those who understand binary, and those who don’t.

Software Development Engineer
 
VillageReach Starting at the Last Mile
2900 Eastlake Ave. E, Suite 230,  Seattle, WA 98102, USA
DIRECT: 1.206.512.1536   CELL: 1.206.910.0973   FAX: 1.206.860.6972
SKYPE: chongsun.ahn.vr
Connect on Facebook, Twitter and our Blog
--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

To post to this group, send email to openlm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Darius JazayeriPrincipal Architect - Global Health
ThoughtWorks
Reply all
Reply to author
Forward
0 new messages