UrlContext
Last updated
Last updated
The UrlContext
API allows the user to get context information about any given URL.
This can be useful to determine wether a URL is related to an linkable entity or the user is allowed to access it.
Depending on the resolved , context information are provided in a consistent .
The structure of each URL Context is exactly the same. Wether all information are present depends on the .
key
*
string
The provided URL.
type
*
string
static_url
*
string
The resolved static (never changing) URL.
url
*
string
The resolved URL.
provide_information
*
boolean
Wether additional information are provided.
title
string
The resolved title.
description
string
The resolved description (HTML).
icon_name
string
image_url
string
The resolved preview image URL.
data
array
Keys with *
are always present in the URL Context.
generic
The 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
The 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
fileContentEntity
sharedItem
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
The of the URL Context.
The resolved name.
Additional context data based on .
The context for a linkable entity (e.g. ) 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.
The context for a file content entity (e.g. ) 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.
The context for a provides the "readable" URL based on the type
of the SharedItem
. Wether title
, description
, icon_name
and image_url
information are provided depends on the user being authorized to view the shared item.