Skip to main content

Endpoints and Context-Keys

Zapp apps render content on components by using the Feed API. Each feed is represented by an https GET/POST URL.

For security reasons feeds should be explicitly declared on Zapp to be able to be rendered on the device. To do so, you don't need to specify each feed separately, but instead you should create an Endpoint that consolidates multiple feeds together.

To create an Endpoint, click on the New Endpoint button. Give it a name and specify its URL. Each feed that starts with the endpoint's URL will be considered a valid URL and will be accepted by the app.

In addition to the Endpoint's title and URL, you can also specify a list of context keys That will be added by the app to each feed that belongs to that Endpoint as a part of the request. You can define how those context keys are added to the URL. It can be a custom header, an abbreviated custom query param, a Authentication bearer header or a special ctx query param that uses Base64 to encode a JSON of the list of all context keys and their values. A common use case of adding a context key is when a specific feed needs the current user's token, language, or device time. You can see the list of all out of the box context keys here. You can also add a custom context key if you added a custom plugin that supports it.

new endpoint

note

There may be cases when a feed can "belong" to more than one Endpoint e.g. given the following to endpoints: https://example.com/api and https://example.com/api/shows and the feed URL https://example.com/api/shows/123 - on those case only the longest Endpoint (https://example.com/api/shows) will be considered as the feed's Endpoint and only its context keys will be included when requesting the feed.