Even when I manually try to convert the post data I get the error:
def POST(table_name,**vars):
restdata=request.vars
return
dict(db[table_name].validate_and_insert(restdata.decode("utf-8")))
On Tuesday, 18 February 2020 10:01:14 UTC-8, Kevin Keller wrote:
>
> When creating a simple rest api with web2py:
>
> @request.restful()
> def api():
>
> def GET(*args, **vars):
> parser=db.parse_as_rest('auto',args,vars)
> return dict(content=parser.response)
>
> def POST(table_name,**vars):
> return dict(db[table_name].validate_and_insert(**vars))
>
> return locals()
>
> I can get access via rest api to any table but auth_users.
>
> Is there a way I can enable this?
>
> I would like to provision new users via rest api to my web2py app.
>
> Authentication is done via external IDP via OIDC.
>
> So I basically just need the firstname, lastname and email to be
> provisioned via rest.
>
> Authentication to provision is at the moment an after thought.
>
> I just need to get this working asap.
>
> Thank you!
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/11f22b98-0fc9-4eab-9f43-7b149d640963%40googlegroups.com.