The entity index resources are great, but have some limitations (and hard codings) that could easily be overcome. Example limitations:

Since the latter has received positive impact, and I now see an opportunity to abstract the proposed solution even further to support other query options, I'd like to take this a step further. For example being able to apply an orderBy to an index query would be very handy as well.

Here's a proposed example URL query string demonstrating the combination of efforts into a new query string parameter for entity index resources called options:

# excluding encoded uri components
?q=endpoint/taxonomy_term.json&fields=tid,name&parameters[name]=%foo%&options[parameters_op][name]=like&options[orderby][name]=asc

As you can see this would allow as to apply custom operators on the filter (e.g. like, in, =, >, <, etc), and also specify a custom order by on column names (asc, desc). This would greatly increase the flexibility of the entity index resources.

I'd like to see this applied for all core entity types, and am happy to fully implement this. If endorsed, this would deprecate both of the related issues in favor of this issue.

Patch to come (taxonomy term index only, for starters)...

Comments

tyler.frankenstein’s picture

Status: Active » Needs review
StatusFileSize
new3.61 KB
tyler.frankenstein’s picture

Issue summary: View changes

kylebrowning’s picture

Status: Needs review » Closed (fixed)
tyler.frankenstein’s picture

Status: Closed (fixed) » Needs work

Re-opening as I need to add this across all other core entity types (the current patch is taxonomy terms only).

tyler.frankenstein’s picture

Assigned: Unassigned » tyler.frankenstein

  • kylebrowning committed d143f76 on 7.x-3.x
    Merge pull request #4 from signalpoint/7.x-3.x-issue-2537968
    
    Issue #...
kylebrowning’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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