--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/a7bdece9-0201-fc60-2e7a-d0157b3d5b81%40gmail.com.
Hi Philip
Thanks for this straightaway answer, much appreciated.
I checked the documented API commands earlier, however if I'm not mistaken they only deal with the "OAI server" side, not the clients.
Are there any API commands that can interact with clients, and where do I find them?
Best
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8GMhSWpRWjtDSGkgZGbPpUAvmjL%2BXDi%2BKEwVtueOcTf-Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d30214c7-4912-33ce-3231-e8c286816cf9%40gmail.com.
Thanks! Coincidentally, I did check this just before your mail ;)
My use case would be to create a client manually with a JSON file.
I was thinking of something around these lines :
curl -H X-Dataverse-key:$API_TOKEN -X POST -H "Content-Type: application/json" $SERVER_URL/api/harvest/clients --upload-file client.json
and client.json structured like this (for ex. for the "univ-lorraine" set) :
{
"nickName": "zenodo_univ-lorraine",
"dataverseAlias": "zenodo_univ-lorraine",
"type": "oai",
"harvestUrl": "https://zenodo.org/oai2d",
"archiveUrl": "https://zenodo.org",
"archiveDescription": "xxxxx",
"metadataFormat": "oai_dc",
"set": "user-univ-lorraine",
"schedule": "none",
"status": "inActive"
}
Would something like this be likely to work?
Best
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8HmBcqmcZZQ%3Dfn9tMNVTWMx%3D%2BBEjhOTVnjPEab%3DFjuOaw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/1866f1ac-6c89-a390-8b08-1ffeaeff0d76%40gmail.com.
It does not work, and replies with :
{"status":"ERROR","code":405,"message":"API endpoint does not support this method. Consult our API guide at http://guides.dataverse.org.","requestUrl":"https://bac-dataverse.univ-lorraine.fr/api/v1/harvest/clients","requestMethod":"POST"}%
The POST method seems supported in the source code you just linked to.
So, not sure what went wrong...
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8FuUnR5%2BRYrA6EMVYTOEkaMjCbFxVLNUjg%3DcDUR1bJC9w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d65b1c2e-c19b-1d73-ef10-49b801171918%40gmail.com.
You can't create a client with PUT. So I tried a slightly different approach, first creating zenodo_lmops (I changed the set) through the GUI and trying to complete the "set" field with PUT.
Sending this :
curl -H X-Dataverse-key:$API_TOKEN -X PUT -H "Content-Type: application/json" $SERVER_URL/api/harvest/clients/zenodo_lmops --upload-file client_modify.json
with my json file as this :
{
"nickName": "zenodo_lmops",
"set": "user-lmops"
}
My Dataverse instance was not happy and went down (it's only a test instance, no harm done) :
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8EYLYCJS59FG2CaOHjE8fAab_0-PxMqY89mOKOiGE79%2Bw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/444d189d-a4dc-8aae-8721-b2430219b106%40gmail.com.
Hi Philip
Thanks a lot for this, the issue, the commit and your help.
I'm sorry to say that it still doesn't work (FWIW I'm running Dataverse 5.2).
I sent this :
curl -H X-Dataverse-key:$API_TOKEN -X PUT -H "Content-Type: application/json" $SERVER_URL/api/harvest/clients/zenodo_lmops --upload-file client.json
where client.json is like this (I removed only the informations about the last harvests) :
{
"nickName": "zenodo_lmops",
"dataverseAlias": "lmops",
"type": "oai",
"harvestUrl": "https://zenodo.org/oai2d",
"archiveUrl": "https://zenodo.org",
"archiveDescription": "Moissonné depuis la collection LMOPS de l'entrepôt Zenodo. En cliquant sur ce jeu de données, vous serez redirigé vers Zenodo.",
"metadataFormat": "oai_dc",
"set": "user-lmops",
"schedule": "none",
"status": "inActive",
}
I got the same message (500) as before, however I'm happy to
report that the application did not go down this time.
[2021-12-02T09:00:30.635+0100] [Payara 5.2020] [INFO] [] [edu.harvard.iq.dataverse.api.HarvestingClients] [tid: _ThreadID=89 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1638432030635] [levelValue: 800] [[ retrieved Harvesting Client zenodo_lmops with the GetHarvestingClient command.]]
Sincerely
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8F_U0b%2BxUvVgE%2BhDM3tj8M7hGG_0oPG%2BN-6RqdGU7Gefg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/5ff73656-983e-cd6d-fa74-3f637a295e07%40gmail.com.
Hi Philip,
Yes, this does look like a last resort. We might have a try on a separate instance, but first, i'd like to take the problem back at its beginning (trying to use the API was a workaround).
I tried to examine closer why the GUI doesn't get the list of sets from Zenodo and I'm puzzled.
The function works great with Pangeae, Ortolang, so there doesn't seem to be any problem apart from Zenodo. And again, the function USED to work with Zenodo. So it's new.
When looking at the log I find a 500, which doesn't tell anything :
[2021-12-03T10:34:15.339+0100] [Payara
5.2020] [WARNING] [] [edu.harvard.iq.dataverse.HarvestingClientsPage]
[tid: _ThreadID=92 _ThreadName=http-thread-pool::jk-connector(3)]
[timeMillis: 1638524055339] [levelValue: 900] [[
Failed to execute ListSets;
com.lyncode.xoai.serviceprovider.exceptions.HttpException: Error
querying service. Returned HTTP Status Code: 500]]
When I simply make a
https://zenodo.org/oai2d?verb=ListSets
from the console on the same VM, the list of sets is perfectly retrieved in XML.
(I asked the people here administrating the VM to look at the
port etc. configuration, just in case, but this would not explain
that only Zenodo doesn't work).
What would be your take on this?
Have a nice day
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8EUm0XwubTmBH4qvXoWY1_A%3DpckuuppQKpxQZmvdQ1wDw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/bb4149c7-dc5a-7b9a-0a78-f5b8eb260fda%40gmail.com.
Dear Valentina, all,
Thanks for this. I completely share what you relate : we went
from a harvesting that worked randomly, to nothing at all.
The link you posted doesn't work : does it point to a Zenodo Google group?
Do you think it would be useful to draft a request to the Zenodo
teams? Could we maybe gather the elements we have and start this?
The fact ist that, as I posted earlier, the ListSets request sent manually to Zenodo (https://zenodo.org/oai2d/?verb=ListSets) works perfectly. So it would also help to know exactly the form of the request sent by Dataverse.
Best
Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CANiF6ZV2%2B0uUrgjQwVhxiRVij5AoNDF3TgXLJMau4cZ%2BkG6xwA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/3bb6c448-6bb8-ccb0-1c55-19fb4e24f17c%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CANiF6ZUKYCU6FjG9ywNorbnsNYb8SmFSH-kmoAO%3D%2BPoG77yEHg%40mail.gmail.com.
Hi Philip
I agree that "Failed to execute ListSets" and "too many sets" are two separate problems.
I just created two issues :
I'm not sure I can create an issue for the "too many sets" problem as it is obscured by the two others for now (in fact, being able to reproduce it again would be an improvement ;) ).
@Valentina, please feel free to comment on any of these issues if needed.
Best,
Thomas JOUNEAU Université de Lorraine Soutien aux données de la recherche Direction de la Documentation - Mission appui recherche B.U. Ile du Saulcy BP 20728 57045 Metz Cedex 01 Tél. : 03 72 74 10 27
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/CABbxx8GgeohdVL0Ho63pHFbJ-wTLWyHCrX-H%3DirAyNJfzjzP%3DQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/6d941f4e-ee3c-d76f-db79-4d00021aac28%40gmail.com.