What’s that ?
The resolution API is not a micro-frontend for KOBI but an option for you to customize the way URLs are generated.
By default a Page in KOBI will have a URL using the tree if no Resolution API is set up.
See URLs for more informations
API Contract
The implementation is up to you, two endpoints might be called :
- Resolution by Resource type and ID : mandatory
- Resolution by path : optional
Request | Response | Verb | Details |
---|---|---|---|
/sites/${siteId}/locales/${locale}/resources/${type}/${id} |
|
GET | Resolve URL for the given type and ID. |
/sites/${siteId}/locales/${locale}/tenants/${tenantId}/paths/${path} ${path} should be url encoded |
|
GET | Resolve TYPE and ID for the given url |
Routes specifications
Resource resolution
/sites/${siteId}/locales/${locale}/resources/${type}/${id}
When | Expected code | Expected response | comment |
---|---|---|---|
Sub-system identify a path matching with the resource ${type} and the resource ${id} | 200 |
|
Resource will be persisted in resolver database with status 200. Url will be persisted in resolver database with status 200. |
Unknown identifier for the the given type, as returned by the sub-system. For example: unknown identifier in the editorial repository for the EDITO type. | 200 |
|
Only Resource will be persisted in resolver database with status 404. |
Subsystem returns a permanent gone resource. | 200 |
|
Only Resource will be persisted in resolver database with status 410. |
Subsystem could not resolve resource because it don't know resource type. | 204 | Nothing will be persisted in resolver database Resolver will try to use local resolver instead of remote resolver | |
Invalid ${type} value:
|
400 | ||
Invalid ${id} value:
|
400 | ||
API Key not provided when calling editorial sub-system (must be rejected by API Management). | 500 | ||
When sub-system fails and responds with an HTTP code 500. | 502 | ||
When sub-system does not respond within expected delay, i.e timeout. | 502 | ||
When Resolver fails internally. | 500 |
Path resolution
/sites/${siteId}/locales/${locale}/tenants/${tenantId}/paths/${path}
When | Expected code | Expected response | comment |
---|---|---|---|
Sub-system identify a resource matching with ${path} | 200 |
|
Resource will be persisted in resolver database with status 200. Url will be persisted in resolver database with status 200. |
Sub-system identify a resource matching with ${path} but specifies a permanent redirection to an other url. | 200 |
|
Only Resource will be persisted in resolver database with status 200. Url will be cached in memory with status 301. |
Sub-system identify a resource matching with ${path} but specifies a temporary redirection to an other url. | 200 |
|
Only Resource will be persisted in resolver database with status 200. Url will be cached in memory with status 302. |
Subsystem identify a resource matching with ${path} but returns a not found resource. (ie : a path matching with a product url and ending with the product reference, but the product does not exist) | 200 |
|
Only Resource will be persisted in resolver database with status 404. Url will be cached in memory with status 404. |
Subsystem identify a resource matching with ${path} but returns a permanent gone resource. (ie : a path matching with a product url and ending with the product reference, but the product does not exist anymore) | 200 |
|
Only Resource will be persisted in resolver database with status 410. Url will be cached in memory with status 410. |
Subsystem could not identify the matching resource type and id from the path even if it is able to compute this path from the resource type and id (not able do to it backward) | 204 | Nothing will be persisted in resolver database Resolver will try to use local resolver instead of remote resolver | |
Invalid ${path} value:
|
400 | ||
API Key not provided when calling editorial sub-system (must be rejected by API Management). | 500 | ||
When sub-system fails and responds with an HTTP code 500. | 502 | ||
When sub-system does not respond within expected delay, i.e timeout. | 502 | ||
When Resolver fails internally. | 500 |
Setup
Once deployed, you can register your application URL in your Designer Site’s Administration under the Resolver
tab.