Api Dispay Specific Metadata Elements

43 views
Skip to first unread message

Thanasis Tsaouselis

unread,
Dec 9, 2014, 8:58:02 AM12/9/14
to omek...@googlegroups.com
Dear all
I would like to find a way to display via api request /items , only some of the metadata elements. I would like to mirror the /items request API but only for displaying some of the metadata fields, because in some cases i don't want to give the full metadata. 

Please could you give me a tip of how to achieve that.

Regards
Athanasios

Patrick Murray-John

unread,
Dec 11, 2014, 11:32:13 AM12/11/14
to omek...@googlegroups.com
If you use the Hide Element plugin, you can select which elements to hide. Make sure that you also go to the API settings set it to apply filters.

Patrick
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at http://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

Thanasis Tsaouselis

unread,
Dec 12, 2014, 2:45:02 AM12/12/14
to omek...@googlegroups.com
The solution you suggest is a bit different for my case.
I want to mirror the API Request items to display some of the metadata elements.For example, to create a new API Request similar to /items but with the difference to hide some metadata elements. Moreover I want to display the full metadata elements when there is an API Request items/id.

If i use this plugin its not possible to achieve that.

Thank you for your help.

Patrick Murray-John

unread,
Dec 12, 2014, 5:54:35 PM12/12/14
to omek...@googlegroups.com
So, what it sounds like is:

* keep the existing data at items/{id} as it is
* have an alternate resource like limited-items/{id} that removes some
of the metadata

If that's accurate, this makes me curious about the use case you are
trying to tackle.

Since really the goal isn't to limit data exposure completely, but only
to limit it from a new path, it sounds like it might more appropriately
be the job of the data consumer to filter what elements they want or
don't want.

Either way, if the Hide Elements option doesn't work, then there's not
really a good way at that, with the possible exception of building a
plugin that would create routes and the changes to the data being
exposed. It seems like, since privacy isn't the issue, a solution on the
consumer end might make more sense. (At least if the above understands
the problem accurately).

Patrick
Reply all
Reply to author
Forward
0 new messages