Hi Anatoly,
Yes, good points. You can create your own APIs with nanopublications
containing SPARQL templates, as I mentioned in my last email, but this
is currently not well documented. We are working on this.
For now, I made this API method that returns all newer versions,
including retracted and superseded ones, together with the
nanopublication IDs that retract/supersede them.
You can find the defining nanopub including the SPARQL template here:
https://w3id.org/np/RA9OeciFLech0WuB4asnAnRylExdNGlryV07EhR4ZnnCw
You can try it out here:
https://tapas.knowledgepixels.com/tapas.html?api=RA9OeciFLech0WuB4asnAnRylExdNGlryV07EhR4ZnnCw&op=/get-newer-versions-of-np
And you can call it in your code with this URL:
https://query.knowledgepixels.com/api/RA9OeciFLech0WuB4asnAnRylExdNGlryV07EhR4ZnnCw/get-newer-versions-of-np?np=http://purl.org/np/RASVryv0gZQcauqi68N4cxu7kLVDxIBobPbDd2Ar2FvOA
btw, this is all decentralized, so instead of
"
query.knowledgepixels.com" you can also use one of the other Nanopub
Query URLs that you can find here:
https://monitor.knowledgepixels.com/
We can do a similar query/API for a relation like "contests". Will that
be a relation like "THIS-NANOPUB contests OTHER-NANOPUB" in the
assertion graph, or something more general like "THING/PERSON contests
OTHER-NANOPUB"? In the first case there is an easier/faster way to query
it, but both are possible.
Regards,
Tobias
> np?np=. <
https://query.knowledgepixels.com/api/
> RAiRsB2YywxjsBMkVRTREJBooXhf2ZOHoUs5lxciEl37I/get-latest-version-of-
> np?np=.>..
> RAG6IQLcgknIZQSAjAx4srvRE3AR5_AuGwLYUYxtCajDY <https://
>
query.knowledgepixels.com/api/
> RAiRsB2YywxjsBMkVRTREJBooXhf2ZOHoUs5lxciEl37I/get-latest-version-of-
> np?np=
https://w3id.org/np/
> RAG6IQLcgknIZQSAjAx4srvRE3AR5_AuGwLYUYxtCajDY>
> nanopub-query-api&op=/get-latest-version <https://
>
tapas.knowledgepixels.com/tapas.html?api=knowledgepixels/nanopub-
> query-api&op=/get-latest-version>
>
> If you get the same nanopub URI back, that means that it is the latest
> version. If you get an empty set of URIs back, that means the nanopub
> has been retracted (or has never been properly published in the first
> place; for this distinction I still need to work on better queries).
>
> You can in theory also get several URIs back, if several latest
> versions
> exist (i.e. versions branching out).
>
> Or you can write your own SPARQL queries through one of the endpoints
> you can find here:
https://query.knowledgepixels.com/ <https://
>
query.knowledgepixels.com/>
>
> We will have some more documentation on this soon. In the meantime,
> feel
> free to ask for help here.
>
> Regards,
> Tobias
>
>
> On 25.01.25 16:38, Anatoly Scherbakov wrote:
> >
> > Thanks for the link Piotr!
> >
> > I was able to successfully get he response from http://
> >
grlc.nanopubs.lod.labs.vu.nl/api/local/local/ <http://
>
grlc.nanopubs.lod.labs.vu.nl/api/local/local/> server, which I found on
> > that page, via nanopub. A bit slow but it works!
> >
> > Anatoly
> > On Saturday, January 25, 2025 at 7:14:57 PM UTC+4
>
psowi...@gmail.com wrote:
> >
> > __
> >
> > Hi Anatoly,
> >
> > This page lists some publicly available endpoints: https://
> >
nanopub.net/docs/network <
http://nanopub.net/docs/network>
> <
https://nanopub.net/docs/network <
https://nanopub.net/docs/network>>
> > <
https://virtuoso.nps.petapico.org/sparql <https://
> >
https://github.com/RiverBench/ci-worker/blob/ <https://
>
github.com/RiverBench/ci-worker/blob/>
> > a3fcd6378e8339f3ef170182fac537e1970c5fc4/src/main/resources/sparql/
> > getNanopubsForCategory.rq#L42 <
https://github.com/RiverBench/ci-
> <
https://github.com/RiverBench/ci->
> > worker/blob/a3fcd6378e8339f3ef170182fac537e1970c5fc4/src/main/
> > resources/sparql/getNanopubsForCategory.rq#L42>
> >
> > Maybe there is an easier way to do this... Quite possibly you could
> > do the same by querying a Linked Data Fragments endpoint, like this
> > one, with simple GET requests: http://
>
ldf.nanopubs.lod.labs.vu.nl/ <
http://ldf.nanopubs.lod.labs.vu.nl/>
> > np?graph=http%3A%2F%
2Fwww.openlinksw.com
> <
http://2Fwww.openlinksw.com>%2Fschemas%2Fvirtrdf%23
> > <
http://ldf.nanopubs.lod.labs.vu.nl/np <http://
>
ldf.nanopubs.lod.labs.vu.nl/np>?
> > graph=http%3A%2F%
2Fwww.openlinksw.com
> <
http://2Fwww.openlinksw.com>%2Fschemas%2Fvirtrdf%23>
> >
> > (this endpoint is listed on the aforementioned page)
> >
> > Piotr Sowiński
> > On 1/25/25 15:39, Anatoly Scherbakov wrote:
> >> Hi,
> >>
> >> I am still playing with the same example nanopublication: https://
> >>
nanodash.knowledgepixels.com/explore?3&id=RARv1- <http://
>
nanodash.knowledgepixels.com/explore?3&id=RARv1->
> >> bZWsdvQs88TDH2trcwNoGF1g5AawE2sPKeh5K_0 <https://
> >>
nanodash.knowledgepixels.com/explore?3&id=RARv1- <http://
> <
https://github.com/knowledgepixels/nanopub-query> <https://
> >>
github.com/knowledgepixels/nanopub-query <
http://github.com/
> knowledgepixels/nanopub-query>> is the project to look
> >> at — but what is its API like? I would like to access a publicly
> >> available endpoint if possible instead of downloading the whole
> >> nanopublications index into the local machine.
> >>
> >> I am sure there should be an obvious solution I am missing, would
> >> appreciate pointers to it. Thank you!
> >>
> >> Anatoly
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Nanopublications" group.
> >> To unsubscribe from this group and stop receiving emails from it,
> >> send an email to
nanopub-user...@googlegroups.com.
> >> To view this discussion visit
https://groups.google.com/d/msgid/
> <
https://groups.google.com/d/msgid/>
> >> nanopub-users/
> >> fde22518-12f7-4c97-9036-0127f11a916cn%
40googlegroups.com
> <
http://40googlegroups.com> <https://
> >>
groups.google.com/d/msgid/nanopub-users/ <http://
>
groups.google.com/d/msgid/nanopub-users/>
> >> fde22518-12f7-4c97-9036-0127f11a916cn%
40googlegroups.com
> <
http://40googlegroups.com>?
> nanopub- <
https://groups.google.com/d/msgid/nanopub->
> > users/41052333-c120-46bb-8af0-d8613c74103an%
40googlegroups.com
> <
http://40googlegroups.com> <https://
> >
groups.google.com/d/msgid/nanopub-users/41052333-c120-46bb-8af0-
> <
http://groups.google.com/d/msgid/nanopub-users/41052333-
> c120-46bb-8af0->
> > d8613c74103an%
40googlegroups.com?
> utm_medium=email&utm_source=footer <
http://40googlegroups.com?
> <
https://groups.google.com/d/optout> <https://
> >
groups.google.com/d/optout <
http://groups.google.com/d/optout>>.
> users/b26612bd-408d-42af-895d-71117342cad6n%
40googlegroups.com <https://
>
groups.google.com/d/msgid/nanopub-users/
> b26612bd-408d-42af-895d-71117342cad6n%
40googlegroups.com?