I've setup a views in REST Export Views with this config:

Format = Serializer => json
Show = Fields
Fields = field label from taxonomy term (select list)
Access = Unrestricted

in Preview or accessing it via browser i can see the taxonomy term label (its looks like setup correctly)

[{
   "name":"196803212007011004",
   "field_nama":"ASANI",
   "field_eselon":"Non Eselon",
   "field_jabatan":"Guru Muda",
   "field_jenis_jabatan":"jft",
   "field_pangkat":"III/b",
   "field_perangkat_daerah":"Dinas Pendidikan",
   "field_unit_kerja":"SMK Negeri 5 Sungai Penuh"
}]

but when test in postman or reqbin the data label not showing, this is the results:

[{
    "name": "196803212007011004",
    "field_nama": "ASANI",
    "field_eselon": "",
    "field_jabatan": "",
    "field_jenis_jabatan": "",
    "field_pangkat": "",
    "field_perangkat_daerah": "",
    "field_unit_kerja": ""
}]

as you can see the value from label formatter of the field with taxonomy term (select list) is empty.

I've examined the configuration but i do not understand what going wrong, i hope anyone else experienced this and show how to solved it.

Would anyone know and help how I can retrieve the value in label formatter of taxonomy term, not the raw output.

Thanks in advance.

Comments

tinohuda created an issue. See original summary.

longwave’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -REST, -taxonomy term, -json, -views

To be able to view a term label, you still need the "access content" permission - is that the case for the user that is accessing via Postman (presumably, the anonymous user)? Do you have any other access control modules installed, as this may also affect it?

tinohuda’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thank you @longwave you saved my day.

I allow anonymous to access unpublished nodes, now the label showing up in postman and reqbin.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.