--
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...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscribe@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
{
"responseHeader":{
"status":0,
"QTime":2,
"params":{
"q":"type:2 AND (id:68056753-e460-4f80-a08a-f8febfbd07f7)",
"indent":"true",
"fq":"statistics_type:[* TO *] AND statistics_type:view",
"wt":"json"}},
"response":{"numFound":4,"start":0,"docs":[
{
"ip":"127.0.0.1",
"referrer":"http://localhost:8080/xmlui/",
"dns":"localhost.",
"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0",
"isBot":false,
"id":"68056753-e460-4f80-a08a-f8febfbd07f7",
"type":2,
"owningColl":["88c16bca-e689-4a71-b8f3-112191758c9a"],
"owningComm":["bc362b91-eb6d-4c95-bf2c-77dc2aeb20d4"],
"time":"2016-09-18T13:16:47.936Z",
"epersonid":"041c27dd-7c00-49c4-9192-55a3aed42994",
"statistics_type":"view",
"uid":"6d845ff5-2a9d-441f-a081-8190485f231c",
"_version_":1545826895597142016},
{.......}
}
In the beggining of the response there are the params that were used. Then it comes the important part, that is the response itself. As any other query, it says how many results were found and then the results itself. So, if you are looking for some kind of statistic, the result will be how many statistics were found.
How you will do it depends on the language you are using, but almost definitely will be something like this (written on Ruby):
parsedResponse = JSON.parse(response) # Parse the result
numFounds = parsedResponse["response"]["numFound"] # Access the response field and then the attribute numFound.
And then you can iterate through the results if you want:
parsed_response["response"]["docs"].each do |r|
puts r["ip"]
end
If the number of found results isn't the same as it appears on the xmlui interface you have to revise the query, because it should be.To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
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 dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/1d119257-8787-44b2-b67a-a587df0122fan%40googlegroups.com.