UrlContext
Introduction
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 type, context information are provided in a consistent structure.
Structure
The structure of each URL Context is exactly the same. Wether all information are present depends on the type.
Key | Type | Description |
---|---|---|
| string | The provided URL. |
| string | The type of the URL Context. |
| string | The resolved static (never changing) URL. |
| string | The resolved URL. |
| boolean | Wether additional information are provided. |
| string | The resolved title. |
| string | The resolved description (HTML). |
| string | The resolved Icon name. |
| string | The resolved preview image URL. |
| array | Additional context data based on type. |
Keys with *
are always present in the URL Context.
Types
generic
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.
linkableEntity
linkableEntity
The 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.
sharedItem
sharedItem
The context for a SharedItem 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.
List
List the URL Context for the desired urls
.
Definition
POST
/api/url-context
Request Keys
Key | Type | Default | Description |
---|---|---|---|
| array | - | The URLs to get the context for. |
Example Request
Example Response
Last updated