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
Copy
DOMAIN=http://localhost:3000 {
"success": true,
"value": "http://schema.org/Person"
}
Failure: HTTP404
Copy
DOMAIN=http://localhost:3000 {
"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:
Copy
DOMAIN=http://localhost:3000
curl --silent \
"${DOMAIN}/api/v1/shrink?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23dateTime" \
| jq .
Examples
Success: HTTP200
Copy
DOMAIN=http://localhost:3000 {
"success": true,
"value": "schema:Person"
}
Failure: HTTP404
Copy
DOMAIN=http://localhost:3000 {
"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:
Copy
DOMAIN=http://localhost:3000 [
"rdf:",
"rdau:",
"rdfa:",
"rdfs:",
"rr:",
"rss:"
]
Autocomplete a prefix or find matching namespaces:
Copy
DOMAIN=http://localhost:3000 [
"rdf:",
"rdfa:",
"rdfs:"
]
Autocomplete the content of a namespace:
Copy
DOMAIN=http://localhost:3000 [
"rdfs:",
"rdfs:Class",
"rdfs:Container",
"rdfs:ContainerMembershipProperty",
…
]
Autocomplete a partial term:
Copy
DOMAIN=http://localhost:3000 [
"rdfs:Container",
"rdfs:ContainerMembershipProperty",
"rdfs:comment"
]
Autocomplete a partial term, case-sensitive:
Copy
DOMAIN=http://localhost:3000 [
"rdfs:comment"
]
Autocomplete a partial term, case-sensitive and expanded:
Copy
DOMAIN=http://localhost:3000 [
"http://www.w3.org/2000/01/rdf-schema#comment"
]
Autocomplete a partial term or the content of a namespace, for a given RDF type:
Copy
DOMAIN=http://localhost:3000 [
"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:
Copy
DOMAIN=http://localhost:3000 {
"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/",
…: "…"
}