Schema of Dataverse API

142 views
Skip to first unread message

黃晴

unread,
Jul 13, 2022, 2:52:26 AM7/13/22
to Dataverse Users Community
Dear all,
If there is a schema for Dataverse API, either in json or yaml format, that i can use to create the api in my Postman! Any feedback would be appreciated!

Vyacheslav Tikhonov

unread,
Jul 13, 2022, 3:40:37 AM7/13/22
to Dataverse Users Community
Hi,

There is Dataverse schema in .nt format, you can easily get it in the knowledge graph with rdflib and serialise as json-ld:

Best,
Slava

D. M. Wen

unread,
Jul 13, 2022, 4:15:05 AM7/13/22
to Dataverse Users Community
I think there is some misunderstanding here. What we were trying to do is to get a schema, in JSON or YAML file format, that we can create a Dataverse API environment on the API Platform --  Postman! Hope this would clarify our needs.

Best,

Joseph Wen 

Vyacheslav Tikhonov

unread,
Jul 13, 2022, 4:24:02 AM7/13/22
to Dataverse Users Community
Got it, it looks like you want OpenAPI specs for Dataverse API. Phil?

D. M. Wen

unread,
Jul 13, 2022, 4:38:43 AM7/13/22
to Dataverse Users Community
Indeed, in a more specifically manner, both schema type -- OpenAPI is one of the options, and also schema format -- which is either JSON or YAML file format!

o.be...@fz-juelich.de

unread,
Jul 13, 2022, 5:41:14 AM7/13/22
to Dataverse Users Community
Depending on what you are trying to do:


Philip Durbin

unread,
Jul 13, 2022, 3:53:36 PM7/13/22
to dataverse...@googlegroups.com
Just a +1 for Oliver's post.

It sounds like OpenAPI/Swagger for Dataverse APIs is what's wanted. You can get this in YAML at https://demo.dataverse.org/openapi (or from your own server).

Thanks,

Phil

p.s. Very cool that Slava figured out the JSON Schema for the JSON we use to create datasets. People have been asking for this for years (such as Oliver in #7173, like he mentioned)!

--
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/20cbe0d9-0881-4326-a911-2146c3c30558n%40googlegroups.com.


--

D. M. Wen

unread,
Jul 13, 2022, 8:35:31 PM7/13/22
to Dataverse Users Community
Folks,

Got it! Right to the point, this is exactly what I need. 
Philip, your reference on YAML point is extremely valuable! Thanks again

Joseph Wen
 

R F

unread,
Oct 17, 2022, 6:14:43 AM10/17/22
to Dataverse Users Community
Hi,

It seems like the OpenApi specs are not up to date or am I missing something

E.g. the endpoint for getting dataset information according to the OpenApi specs is:

/api/v1/access/dataset/{id}

while the documentation rightly writes:

api/datasets/:persistentId/?persistentId={PERSISTENT_ID}.

Sherry Lake

unread,
Oct 17, 2022, 8:36:34 AM10/17/22
to dataverse...@googlegroups.com
Hello,

Both are correct ways to use API endpoints, either with a dataset  (or file) "ID" or with the Persistent ID. Here is where that is documented in the documents & applies to dataset ids as well. I think that this information does need to go in other parts of the API documentation. I'll add that to my hacktoberfest list (after I create a ticket).


Basic File Access

Basic access URI:

/api/access/datafile/$id

Note

Files can be accessed using persistent identifiers. This is done by passing the constant :persistentId where the numeric id of the file is expected, and then passing the actual persistent id as a query parameter with the name persistentId.

Example: Getting the file whose DOI is 10.5072/FK2/J8SJZB

GET http://$SERVER/api/access/datafile/:persistentId?persistentId=doi:10.5072/FK2/J8SJZB

--
Sherry Lake


Reply all
Reply to author
Forward
0 new messages