Ari and Terry,

thanks for help! At least with brief testing, it seems the new api does what I 
need. One question - if I leave the parameters 'limit' and 'offset' from the 
query, will I get all the items, or is there some upper limit for results 
returned in one query?

Ilja

________________________________________
From: Ari <[email protected]>
Sent: Monday, September 5, 2016 8:34:50 AM
To: DSpace Technical Support
Cc: [email protected]; Ilja Sidoroff
Subject: Re: [dspace-tech] Querying items by metadata item via SOLR and REST

Hi Ilja,

we aiming fullly REST-based solution (dumping both workflow and XMLUI admin UI) 
so we do lot of REST tests.

This should work for filtered-items (items who's author name contains "Matti"):

 curl  -H "Accept: application/json"  
"http:your.dspace.com:8080/rest/filtered-items?&query_field[]=dc.contributor.author&query_op[]=contains&query_val[]=Matti&collSel[]=&limit=100&offset=0&expand=parentCollection,metadata&filters=none"
 -g | python -m json.tool


If you need to be logged in, then:


1. First, authenticate your self:
curl --data "email=your.email&password=your_pass" 
http://your_dspace.com:8080/rest/login<http://your_dspace.com:8080/rest/login> 
-c cookies.txt


2. Test that authentication was successful:
curl  -H "Accept: application/json"  
http://your_dspace.com:8080/rest/status<http://your_dspace.com:8080/rest/status>
 -b cookies.txt


- this should return something like this:
{"okay":true,"authenticated":true,"email":"your.email","fullname":"ari 
","sourceVersion":null,"apiVersion":null}



Hope this helps,
Ari


On Saturday, 3 September 2016 10:38:07 UTC+3, Ilja Sidoroff wrote:
Terry,

I looked very briefly into this on Friday, but I didn't quite get how to create 
and execute queries without using the interactive webpages. The endpoint GET 
/rest/filtered-items seemed promising, but at the limited time I looked at it, 
I didn't see how to use it, but I'll try to look bit more into that.

Ilja

________________________________________
From: [email protected]<javascript:> 
<[email protected]<javascript:>> on behalf of Terry Brady 
<[email protected]<javascript:>>
Sent: Friday, September 2, 2016 8:55:13 PM
To: Ilja Sidoroff
Cc: DSpace Technical Support
Subject: Re: [dspace-tech] Querying items by metadata item via SOLR and REST

Ilja,

In DSpace 6, the REST API will provide additional query capabilities.

https://wiki.duraspace.org/display/DSDOC6x/REST+Based+Quality+Control+Reports

While this may not solve your immediate issues, it might provide a good future 
solution.

Terry

On Thu, Sep 1, 2016 at 3:43 AM, Ilja Sidoroff 
<[email protected]<javascript:><mailto:[email protected]<javascript:>>> wrote:
Hello,

I am using DSpace 5.5.

Am I correct, that SOLR queries return only items that are in
*collections* and not in the *workflow*? At least my search attemps
indicate that?

In the REST API, however, it seems that GET /items returns only
results that are in the collections. However, with POST
/items/find-by-metadata-field I can get all items in the DSpace, both
those in the collections and those in the workflow?

What I need, is a list of *all items* (both in the workflow and the
collections) that have certain metadata field set and *the value of
that field*. I don't see other way of doing that, except by direct SQL
query to the database. I have one for 5.x, but I'm not happy with it
since, I need to update it for 6.x etc. Is there any other way of
doing this?

Also, it seems that

dspace import -d -m mapfile ...

does not delete items currently in the workflow? Is this intentional or a bug?

regards,

Ilja Sidoroff
University of Eastern Finland

--
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 
[email protected]<javascript:><mailto:dspace-tech%[email protected]<javascript:>>.
To post to this group, send email to 
[email protected]<javascript:><mailto:[email protected]<javascript:>>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.



--
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
http://georgetown-university-libraries.github.io/<https://www.library.georgetown.edu/lit/code>
425-298-5498 (Seattle, WA)

--
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 
[email protected]<javascript:><mailto:[email protected]<javascript:>>.
To post to this group, send email to 
[email protected]<javascript:><mailto:[email protected]<javascript:>>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to