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!