RDF Prefix Resolve API
We provide the following API endpoints:
Expanding an IRI
expanding means the following operation:'xsd:dateTime' → 'http://www.w3.org/2001/XMLSchema#dateTime'.
It is the opposite of /shrinking.
Examples
Success: HTTP200
CopyDOMAIN=https://prefix.zazuko.com{
"success": true,
"value": "http://schema.org/Person"
} Failure: HTTP404
CopyDOMAIN=https://prefix.zazuko.com{
"success": false
}Shrinking an IRI
shrinking means the following operation:'http://www.w3.org/2001/XMLSchema#dateTime' → 'xsd:dateTime'.
It is the opposite of /expanding.
IRI containing a #fragment such as http://www.w3.org/2001/XMLSchema#dateTime will have to be URI encoded:
CopyDOMAIN=https://prefix.zazuko.com curl --silent \
"${DOMAIN}/api/v1/shrink?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23dateTime" \
| jq . Examples
Success: HTTP200
CopyDOMAIN=https://prefix.zazuko.com{
"success": true,
"value": "schema:Person"
} Failure: HTTP404
CopyDOMAIN=https://prefix.zazuko.com{
"success": false
}Autocomplete a prefixed term
This endpoint lets you implement RDF terms autocompletion.
By default, this endpoint is case-insensitive and responds with a list of prefixed terms. Use &case=true to make it case-sensitive.
Use &expand=true to make it return full IRIs instead of prefixed terms.
Examples
Autocomplete a prefix or find matching namespaces:
CopyDOMAIN=https://prefix.zazuko.com[
"rdf:",
"rdau:",
"rdfa:",
"rdfs:",
"rr:",
"rss:"
]Autocomplete a prefix or find matching namespaces:
CopyDOMAIN=https://prefix.zazuko.com[
"rdf:",
"rdfa:",
"rdfs:"
]Autocomplete the content of a namespace:
CopyDOMAIN=https://prefix.zazuko.com[
"rdfs:",
"rdfs:Class",
"rdfs:Container",
"rdfs:ContainerMembershipProperty",
…
]Autocomplete a partial term:
CopyDOMAIN=https://prefix.zazuko.com[
"rdfs:Container",
"rdfs:ContainerMembershipProperty",
"rdfs:comment"
]Autocomplete a partial term, case-sensitive:
CopyDOMAIN=https://prefix.zazuko.com[
"rdfs:comment"
]Autocomplete a partial term, case-sensitive and expanded:
CopyDOMAIN=https://prefix.zazuko.com[
"http://www.w3.org/2000/01/rdf-schema#comment"
]Autocomplete a partial term or the content of a namespace, for a given RDF type:
CopyDOMAIN=https://prefix.zazuko.com[
"rdfs:comment",
"rdfs:domain",
"rdfs:isDefinedBy",
"rdfs:label",
…
]Prefixes
This endpoint returns the list of all known prefixes. This can be used to implement a prefix selector.
Examples
How to get the list of all known prefixes:
CopyDOMAIN=https://prefix.zazuko.com{
"acl": "http://www.w3.org/ns/auth/acl#",
"as": "https://www.w3.org/ns/activitystreams#",
"bibo": "http://purl.org/ontology/bibo/",
"cc": "http://creativecommons.org/ns#",
"cert": "http://www.w3.org/ns/auth/cert#",
"cnt": "http://www.w3.org/2011/content#",
"constant": "http://qudt.org/vocab/constant/",
…: "…"
}