Hello, Filippo. You need to POST a MetadataEntry object with the request[0]. For example, in DSpace 5.x this works:
$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X POST "http://server16.iss.it:8080/rest/items/find-by-metadata-field" -d '{"key": "dc.contributor.author","value": "Petrini"}' Note that the API only returns exact text matches (no wildcard), and you will probably need to specify the language to actually match anything as well: $ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X POST "http://server16.iss.it:8080/rest/items/find-by-metadata-field" -d '{"key": "dc.contributor.author","value": "Petrini","language": "en_US"}' The language can also be a literal null (without quotes). It all depends on how your metadata is entered into the database. [0] https://wiki.duraspace.org/display/DSDOC5x/REST+API Cheers, On Tue, Aug 28, 2018 at 4:14 PM Filippo Santoro <santoro.fili...@gmail.com> wrote: > Dear all, > I'm using the DSpace REST APIs for an external application. I have some > difficult to use the end point /items/find-by-metadata-field to search an > item based on a particular metadata. > In fact, using Postman with the following request: > > > http://server16.iss.it:8080/rest/items/find-by-metadata-field?key=dc.contributor.author&value=Petrini > > I get an HTTP500 error (internal server error). What is the right syntax > for using it? > > Thanks in advance > > Filippo > > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dspace-tech+unsubscr...@googlegroups.com. > To post to this group, send email to dspace-tech@googlegroups.com. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > -- Alan Orth alan.o...@gmail.com https://picturingjordan.com https://englishbulgaria.net https://mjanja.ch "In heaven all the interesting people are missing." ―Friedrich Nietzsche -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To post to this group, send email to dspace-tech@googlegroups.com. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.