UrlContext
Introduction
The UrlContext API allows the user to get context information about any given URL.
This can be useful to determine whether a URL is related to a linkable entity or whether the user is allowed to access it.
Depending on the resolved type, context information are provided in a consistent structure.
Structure
The structure of each URL Context is exactly the same. Whether all information is present depends on the type.
key *
string
The provided URL.
static_url *
string
The resolved static (never changing) URL.
url *
string
The resolved URL.
provide_information*
boolean
Whether additional information is provided.
title
string
The resolved title.
description
string
The resolved description (HTML).
image_url
string
The resolved preview image URL.
Keys with * are always present in the URL Context.
Types
generic
genericThe context for a external URL.
We currently don't provide information for this context type but plan to get title, description and image_url from the Open Graph data of the website.
internal
internalThe context for a internal URL (e.g. /infoboard) always provides the relative URL and allows to differentiate internal from external (generic) URLs. It also includes title and icon_name information for the URL when the user is allowed to view it.
linkableEntity
linkableEntityThe context for a linkable entity (e.g. Form) provides the "readable" URL for the entity. It also includes title, description, icon_name and image_url information for the entity when the user is allowed to view it.
fileContentEntity
fileContentEntityThe context for a file content entity (e.g. FilemanagerFile) provides the URL to show the file content of the entity. It also includes title, description, icon_name and image_url information for the entity when the user is allowed to view it. The data key also includes information about the filename, extension, mime_type, size and the download_url of the file.
sharedItem
sharedItemThe context for a SharedItem provides the "readable" URL based on the type of the SharedItem. Whether title, description, icon_name and image_url information are provided depends on the user being authorized to view the shared item.
List
List the URL Context for the desired urls.
Definition
POST /api/url-context
Request Keys
urls *
array
-
The URLs to get the context for.
Example Request
Example Response
Last updated