[Archivesspace_Users_Group] Advanced search using API?
Brian Hoffman
brianjhoffman at gmail.com
Wed Feb 18 12:17:52 EST 2015
Hi Noah,
I just took a quick look at this and I don’t think you can currently do
exactly what you are asking because it looks like filter_term queries don’t
support wildcards. (Perhaps a valid feature request?). However, this
example may work for you depending on your data:
'/repositories/2/search?page=1&type%5B%5D=accession&q=UA*’
This (what you’d probably prefer) doesn’t appear to work:
'/repositories/2/search?page=1&type%5B%5D=accession&filter_term%5B%5D=%7B%22four_part_id%22%3A%22UA*%22%7D'
Brian
On Wed, Feb 18, 2015 at 11:09 AM, Noah Huffman <noah.huffman at duke.edu>
wrote:
> Hi all,
>
>
>
> Can anyone provide guidance or an example of how to construct an advanced
> query through the API? I’m having a bit of trouble interpreting this
> documentation:
> http://archivesspace.github.io/archivesspace/doc/file.API.html#get-search
>
>
>
> What I’d like to do is:
>
> 1) search for all accession records that contain a certain string
> (“UA”) in the “id_0” field.
>
> 2) Use the resulting list of accession record IDs to transfer all of
> those accession records to another repository
>
>
>
> I’ve had success with #2, but am having trouble figuring out step #1 using
> curl.
>
>
>
> Thanks for any advice.
>
>
>
> -Noah
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
--
Brian Hoffman
brianjhoffman at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150218/4c968132/attachment.html>
More information about the Archivesspace_Users_Group
mailing list