New KOBI documentation is available: https://adeo-ccdp.gitbook.io/kobi/

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}
    		
{
    status: [int],
    path: [String],
    ttl: [int]
}
			
		
GET Resolve URL for the given type and ID.
/sites/${siteId}/locales/${locale}/tenants/${tenantId}/paths/${path}
${path} should be url encoded
    			
{ 
	status: [int],
 	resourceType: [String],
  	resourceId: [String],
   	path: [String],
    passthrough: [boolean],
    ttl: [int] 
}
			
		
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
    		
{
    status: 200,
    path: "resolved_path",
    ttl: $time_to_live
}
			
		
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
    		
{
    status: 404,
    ttl: $time_to_live
}
			
		
Only Resource will be persisted in resolver database with status 404.
Subsystem returns a permanent gone resource. 200
    		
{
    status: 410,
    ttl: $time_to_live
}
			
		
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:
  • Empty
  • Not in known values
400
Invalid ${id} value:
  • Empty
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
    		
{
    status: 200,
    resourceType: "$type",
    resourceId: "$id",
    ttl: $time_to_live
}
			
		
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
    		
{
    status: 301,
    resourceType: "$type",
    resourceId: "$id",
    path: "$redirection_path",
    passthrough: true/false,
    ttl: $time_to_live
}
			
		
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
    			
{
    status: 302,
    resourceType: "$type",
    resourceId: "$id",
    path: "$redirection_path",
    passthrough: true/false,
    ttl: $time_to_live
}
			
		
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
    		
{
    status: 404,
    resourceType: "$type",
    resourceId: "$id",
    ttl: $time_to_live
}
			
		
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
    		
{
    status: 410,
    resourceType: "$type",
    resourceId: "$id",
    ttl: $time_to_live
}
			
		
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:
  • Empty
  • Invalid
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.