Complete REST Example Wanted

117 views
Skip to first unread message

Dejan Nenov

unread,
Sep 14, 2015, 1:46:28 AM9/14/15
to Lucee
Hello All,

Can someone please point me to a complete REST example with Lucee - including filenames and full paths, configurations, etc.?

It would be useful if the example is semi-realistic, let's say:


to set a user role for user with {user_id} in the context of organization with {org_id}

Request Body In the request body set json:
{
"role": "User"
}

Response
Success
HTTP 200 : OK
{
"user": {
"id": 1,
"role": "User"
}
}

and failures (no need to provide examples for all, but at least one, setting the response headers):

HTTP 400 : Bad Request
{
"code": "50008",
"message": "User does not belong to this organization!"
}

HTTP 400 : Bad Request
{
"code": "50009",
"message": "User not found!"
}

HTTP 400 : Bad Request
{
"code": "51000",
"message": "Method argument not valid",
"fieldErrors": [ {
"resource": "Organizations/users",
"field": "role",
"code": "51002",
"message": "Missing required field"
}]
}


Thank you in advance for your help!

AJ Mercer

unread,
Sep 14, 2015, 1:52:05 AM9/14/15
to lu...@googlegroups.com
here are some notes I wrote for myself 9and others)


--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/613bc8ed-990c-40dc-8ab9-1a2c93ffc2ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Geoff Bowers

unread,
Sep 21, 2015, 10:20:51 PM9/21/15
to Lucee


On Monday, 14 September 2015 15:46:28 UTC+10, Dejan Nenov wrote:
Can someone please point me to a complete REST example with Lucee - including filenames and full paths, configurations, etc.?

You might start with Mr Tuttle's excellent Taffy project:

-- geoff
twitter. @modius
Reply all
Reply to author
Forward
0 new messages