How can I Inactive a dataset using dataverse api

59 views
Skip to first unread message

Michel Bamouni

unread,
Mar 20, 2017, 8:12:06 AM3/20/17
to Dataverse Users Community
Hello,

I am using dataverse java api to create my dataset and I want to inactive the dataset or it's metadata but I don't see the method in java api to do this.
Can someone help me please?

Best regards,

Michel

Philip Durbin

unread,
Mar 20, 2017, 9:00:57 AM3/20/17
to dataverse...@googlegroups.com
I assume you are talking about deaccessioning a dataset. Unfortunately, it is not currently possible to deaccession a dataset via API. You can only do it through the GUI. Here's the open issue: https://github.com/IQSS/dataverse/issues/778

Phil

p.s. We don't mention this at http://guides.dataverse.org/en/4.6.1/user/dataset-management.html#deaccession-dataset but it's possible for a superuser to delete a dataset via API (called "destroy" in the code). Usually this is only for test data.

--
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-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/2ceb373a-47f7-432d-a90a-468c3c389a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Michel Bamouni

unread,
Mar 20, 2017, 9:19:05 AM3/20/17
to Dataverse Users Community, philip...@harvard.edu
Hi Philip,

Thanks for answer.
 is it possible to inactive the metatablock of a dataset using the dataverse api?

Michel



Le lundi 20 mars 2017 14:00:57 UTC+1, Philip Durbin a écrit :
I assume you are talking about deaccessioning a dataset. Unfortunately, it is not currently possible to deaccession a dataset via API. You can only do it through the GUI. Here's the open issue: https://github.com/IQSS/dataverse/issues/778

Phil

p.s. We don't mention this at http://guides.dataverse.org/en/4.6.1/user/dataset-management.html#deaccession-dataset but it's possible for a superuser to delete a dataset via API (called "destroy" in the code). Usually this is only for test data.
On Mon, Mar 20, 2017 at 8:12 AM, Michel Bamouni <olimi...@gmail.com> wrote:
Hello,

I am using dataverse java api to create my dataset and I want to inactive the dataset or it's metadata but I don't see the method in java api to do this.
Can someone help me please?

Best regards,

Michel

--
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-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.

Philip Durbin

unread,
Mar 20, 2017, 9:58:04 AM3/20/17
to dataverse...@googlegroups.com
If you search for "metadatablocks" at http://guides.dataverse.org/en/4.6.1/api/native-api.html you'll find this:

Sets the metadata blocks of the dataverse. Makes the dataverse a metadatablock root. The query body is a JSON array with a list of metadatablocks identifiers (either id or name). ::

  POST http://$SERVER/api/dataverses/$id/metadatablocks?key=$apiKey

I've never used this API endpoint myself directly but I see it's used at https://github.com/IQSS/dataverse/blob/v4.6.1/scripts/api/setup-all.sh#L70

echo "Set the metadata block for Root"
curl -s -X POST -H "Content-type:application/json" -d "[\"citation\"]" $SERVER/dataverses/:root/metadatablocks/?key=$adminKey

If you feel like implementing this in the Dataverse client for Java it looks like a pull request would add some code somewhere near here: https://github.com/IQSS/dataverse-client-java/blob/e7b2d793263c20bb58806a421af349c442af78cd/src/main/java/com/researchspace/dataverse/http/DataverseOperationsImplV1.java#L276

I hope this helps,

Phil

On Mon, Mar 20, 2017 at 9:19 AM, Michel Bamouni <olimi...@gmail.com> wrote:
Hi Philip,

Thanks for answer.
 is it possible to inactive the metatablock of a dataset using the dataverse api?

Michel


Le lundi 20 mars 2017 14:00:57 UTC+1, Philip Durbin a écrit :
I assume you are talking about deaccessioning a dataset. Unfortunately, it is not currently possible to deaccession a dataset via API. You can only do it through the GUI. Here's the open issue: https://github.com/IQSS/dataverse/issues/778

Phil

p.s. We don't mention this at http://guides.dataverse.org/en/4.6.1/user/dataset-management.html#deaccession-dataset but it's possible for a superuser to delete a dataset via API (called "destroy" in the code). Usually this is only for test data.
On Mon, Mar 20, 2017 at 8:12 AM, Michel Bamouni <olimi...@gmail.com> wrote:
Hello,

I am using dataverse java api to create my dataset and I want to inactive the dataset or it's metadata but I don't see the method in java api to do this.
Can someone help me please?

Best regards,

Michel

--
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-community+unsubscribe...@googlegroups.com.

--
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-community+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michel Bamouni

unread,
Mar 21, 2017, 10:37:30 AM3/21/17
to Dataverse Users Community, philip...@harvard.edu
Hi,

Ok for answer. I have one last question. Is it possible de deaccessioning a dataset throught SQL request on the dataverse database?

Michel
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.

--
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-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.

Philip Durbin

unread,
Mar 21, 2017, 10:52:59 AM3/21/17
to dataverse...@googlegroups.com
No, you have to use the GUI to deaccession a dataset. Hacking on the database directly is not recommended.

To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsubscribe...@googlegroups.com.

--
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-community+unsubscribe...@googlegroups.com.

To post to this group, send email to dataverse...@googlegroups.com.

--
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-community+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michel Bamouni

unread,
Mar 21, 2017, 10:54:43 AM3/21/17
to Dataverse Users Community, philip...@harvard.edu
Hello,

I get the response to my previous post. It is possible to "DEACCESSIONED" a dataset using a sql update request.

Michel

Philip Durbin

unread,
Mar 21, 2017, 10:58:53 AM3/21/17
to dataverse...@googlegroups.com
I just wrote this: No, you have to use the GUI to deaccession a dataset. Hacking on the database directly is not recommended.

To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsubscribe...@googlegroups.com.

--
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-community+unsubscribe...@googlegroups.com.

To post to this group, send email to dataverse...@googlegroups.com.

--
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-community+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages