How to resolve Entity URIs
WissKI stores Entities under stable URIs in the Triplestore.
The /wisski/get route resolves such a URI to the Drupal entity and redirects to its canonical view page.
This is the local URI resolver used by default for permalinks.
Route¶
Request:
/wisski/get?uri=ENTITY_URI
The URI may be passed with any of these query parameters (first match wins):
uriresourceinstanceq
Angle brackets around the URI (for example <http://example.org/id/1>) are stripped before resolving.
On success the response is an HTTP redirect to the entity's canonical view route (/wisski/navigate/{id}/view or equivalent).
Permissions¶
Access to the route itself requires the access wisski get permission.
That permission alone does not grant view access to every entity.
The Authenticated role receives access wisski get by default on new installs and via database update for existing sites.
The Anonymous role does not; grant it manually for public URI resolving.
After a URI is resolved to an entity ID, WissKI checks whether the current user may view that entity (for example via view published wisski content, view any wisski content, or bundle-specific view permissions).
Typical public setup¶
To let anonymous visitors resolve public entities without opening the entire dataset:
- Grant
access wisski getto the Anonymous role. - Grant
view published wisski content(or other narrow view permissions) to the same role. - Do not grant
view any wisski contentunless you intend that broader access.
You can set these under People → Permissions, filtering for wisski.
Response behaviour¶
| Situation | HTTP status | Notes |
|---|---|---|
| URI resolves and the user may view the entity | Redirect (3xx) | Target is the canonical entity page |
| URI unknown, or user may not view the resolved entity | 404 | Same message in both cases (see below) |
| No preferred local store configured | 500 | Site misconfiguration |
| Missing URI query parameter | 404 | Distinct client-error message asking for a query parameter |
Unified not-found message¶
When the URI cannot be resolved or the current user must not see the entity, the HTTP status is 404 and the exception carries:
The specified URI does not exist or the current user does not have access to the specified entity.
Unknown URIs and access denials are intentionally indistinguishable so that the resolver does not reveal whether a URI exists in the system. Drupal's themed HTML 404 page may show a generic "Page not found" heading; the detailed message is on the exception (and in logs).
Related¶
- Module overview:
wisski_core - Permalinks that prefix URIs with
/wisski/get?uri=:wisski_permalink