[Archivesspace_Users_Group] Integration question

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Wed Jan 13 12:21:46 EST 2016


Hi,

Yeah, the API documentation is not great for search...I need to make some more examples, since search  can be really complicated. 

Sorry to say this, but the best bet is to fire up Aspace ( ideally in dev mode, so you can isolate the backend log ), interact with teh frontend for the searches your wanting to do, and watch the backend log for what's coming into the backend.

But, for what you're wanting to do, try : 

  curl -H "X-ArchivesSpace-Session $SESSION" "http://localhost:8089/repositories/2/search?q=Test&page=1&simple_filter%5B%5D=resource_type_enum_s%3Apublications&facet%5B%5D=primary_type&facet%5B%5D=creators&facet%5B%5D=subjects"

Or something like that... it needs to have "simple_filter[]=publish:true AND suppressed:false" but urlencoded...

Does that help? 

b,chris. 

Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/

________________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Doiel, Robert <rsdoiel at caltech.edu>
Sent: Wednesday, January 13, 2016 12:07 AM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] Integration question

Hello,


I am working on integrating a website with ArchivesSpace 1.4.2 content.  The REST API docs are helpful but they are light on details if you want to do search with filters and facets. Does anyone have a good set of examples they can point me to?

For the public search and browse in the website I want to make sure that I only serve contents that have publish equal to true and suppressed equal to false.

I had assumed I should be able to do something like

     curl -H "X-ArchivesSpace-Session $SESSION" http://localhost:8089/repositories/2/search?q=Test&page=1&simple_filter=publish:true,suppress:false

But that yields an error message of

     {"error":{"simple_filter":["Wanted type [String] but got 'publish:true,suppress:false'"]}}

The docs I am currently look at are

+ http://archivesspace.github.io/archivesspace/api/
+ https://archivesspace.github.io/archivesspace/doc/file.API.html



Thank you very much,

Robert Doiel
--
R. S. Doiel, <rsdoiel at caltech.edu>

Digital Library Development
Caltech Library


_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group



More information about the Archivesspace_Users_Group mailing list