My use case is almost identical to the one mentioned in this support issue.

The only differences being that the content type is a basic page and the term reference field is called field_share_to which in turn references a taxonomy vocab called Sites. I have only two sites; 1 server and 1 client.

I am struggling to configure the correct path for term reference field, using a value for the term ID(64).

This is the first time I have needed to understand anything about json:api and I ask this question as a site builder rather than someone who spends a lot of time working with code.

Comments

MrPaulDriver created an issue. See original summary.

MrPaulDriver’s picture

Issue summary: View changes
Grimreaper’s picture

Status: Active » Fixed

Please see the following JSON:API documentation page https://www.drupal.org/docs/8/modules/jsonapi/filtering

And maybe test this module https://www.drupal.org/project/jsonapi_explorer

I would say something like: field_share_to.entity.tid or field_share_to.entity.id

I agree that setting filters on channel is something that needs improvements, there are one or more issues about that in the Entity Share issue queue.

MrPaulDriver’s picture

Super helpful. Thank you

field_share_to.entity.tid = 64

MrPaulDriver’s picture

One more question if I may.

Rather than a taxonomy term, let's assume I had a boolean field called field_share_to_all

What would the be path for the field and what would be it's value when checked?

And yes I will take a look at jsonapi_explorer, thanks for the tip.

Grimreaper’s picture

Hello,

A boolean value when checked is 1.

There are examples on https://www.drupal.org/docs/8/modules/jsonapi/filtering#s-1-only-get-pub..., already mentioned in my previous comment.

Please read the doc and try on your website.

If you want dedicated support hours, you can contact me and I will relay to my company to have a contract for that.

Grimreaper’s picture

MrPaulDriver’s picture

Thanks again.

Status: Fixed » Closed (fixed)

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