Skip to content

Taxonomy Term in Restful module #1066

Description

@fatimahitawala

Hello

I have a content type application which have few fields and one of the field is term reference(field_waso ).
I made a resource in my custom restful module which have all the public fields.
Below is my code:

'field_waso', ); $public_fields['virtualhost'] = array( 'property' => 'field_virtualhosts', 'resource' => array( 'name' => 'virtualhost', 'majorVersion' => '1', 'minorVersion' => '0' ), ); $public_fields['field_global_local'] = array( 'property' => 'field_global_local', ); $public_fields['field_availability'] = array( 'property' => 'field_availability', ); $public_fields['field_criticality'] = array( 'property' => 'field_criticality', ); $public_fields['field_integrity'] = array( 'property' => 'field_integrity', ); $public_fields['field_traceability'] = array( 'property' => 'field_traceability', ); return $public_fields; } } when I run my code to this site: mysite/api/custom I get the id of my term reference field not its name. can anybody help me how to get the name of the term which is in vocabulary of waso filed? ![field_waso](https://user-images.githubusercontent.com/66878672/84573288-3eaa6500-adbd-11ea-9309-a7af41dab88c.PNG) ![Name in waso](https://user-images.githubusercontent.com/66878672/84573355-99dc5780-adbd-11ea-956a-553c173c491b.PNG)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions