Frappe Rest API

hi
i’m trying to access to a specific field “name” of an employee using this :
http://localhost:8000/api/resource/Employee/EMP-00001/name
but it didn’t work, it displays the same resultat as this:
http://localhost:8000/api/resource/Employee/EMP-00001
i mean also all the fields not only the name field.

thanks for help

Hi @Achref1, the API doesn’t work this way. When you get a specific object you always get the whole object. When you ask for a list of objects you can specify the fields you’re interested in:


GET /api/resource/Employee?fields=['name']

=> {"data":[{"name":"EMP/0001"},{"name":"EMP/0002"}]}
2 Likes

thanks