REST Api create not working

Hello, I am trying to create new Job Applicant via REST Api, I send

with data
{data:{name: “test”, “applicant_name”: “test”, “email_id”: “”}}

And I get error page with no content in it. Can you please check?

Thank you

Hi @vojtas,

can you share the error ?
Also, In order to create new Job Applicant through API you will first need to login.
Please check login api from Frappe Rest API

Thanks, Makarand

Hi, yes, I am logged in… Error description is empty, or if I try the same via curl post I get
Traceback (innermost last):
File “/home/frappe/press/benches/1606030839/apps/frappe/frappe/”, line 60, in application
response = frappe.api.handle()
File “/home/frappe/press/benches/1606030839/apps/frappe/frappe/”, line 111, in handle
data = json.loads(
File “/usr/lib64/python2.7/json/”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python2.7/json/”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Hi @vojtas,

may be json string is invalid, please check your JSON.

name should be in quotes.

Thanks, Makarand

I already got to this error - it should be data= not data:

data={name: “test”, “applicant_name”: “test”, “email_id”: “”}

so it works via curl. But it still does not work via other method - I try to post data from different web site javascript exactly the same and I get empty error

      		<div class="page-header-block" data-html-block="header">

Server Error


Do I need to enable cross side script or something on the Thank you

Check your logs also share your script if you want someone to help you to debug

Can you please help me where I can find the logs on

@vojtas try setting this up on your local machine for testing, so it will be easy to debug