Complete REST Example Wanted

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:

PUT https://example.met/organizations/{org_id}/users/{user_id}

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!

here are some notes I wrote for myself 9and others)
http://webonix.net/page/tutorials/rest-tutorialOn 14 September 2015 at 13:46, Dejan Nenov <@Dejan_Nenov> wrote:

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:

PUT https://example.met/organizations/{org_id}/users/{user_id}

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!


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/613bc8ed-990c-40dc-8ab9-1a2c93ffc2ef%40googlegroups.com
https://groups.google.com/d/msgid/lucee/613bc8ed-990c-40dc-8ab9-1a2c93ffc2ef%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

AJ Mercer
<webonix:net strength=“Industrial” /> http://webonix.net | <webonix:org
community=“Open” /> http://webonix.org
http://twitter.com/webonix

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:
https://github.com/atuttle/Taffy

– geoff
http://www.daemon.com.au/
twitter. @modiusOn Monday, 14 September 2015 15:46:28 UTC+10, Dejan Nenov wrote: