adobe / helix-data-embed

Turn data into embed-friendly JSON arrays
Apache License 2.0
4 stars 2 forks source link
data embed helix helix2 service

Helix Data Embed

Turns structured data from data sources around the web into nice JSON arrays that can be embedded using Helix-Pipeline

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

Usage

curl https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v3/https://blogs.adobe.com/psirt/?feed=atom

While the above is simple to type, it is more safe to escape the url and optionally pass it as src query parameter:

curl https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v3/https%3A%2F%2Fblogs.adobe.com%2Fpsirt%2F%3Ffeed%3Datom

or

curl https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v3?src=https%3A%2F%2Fblogs.adobe.com%2Fpsirt%2F%3Ffeed%3Datom

Data Sources

Supported data sources include:

Filtering Results

helix-data-embed supports the AEM Query Builder syntax for reducing the result set.

In order to avoid collisions with existing URL parameters, each QueryBuilder parameter must start with hlx_. For example to filter entries that have a property bar with the value foo, append the following to the URL:

hlx_property=foo&hlx_value=bar

If you want to restrict by range, use:

hlx_rangeproperty.property=age&hlx_rangeproperty.lowerBound=18&hlx_rangeproperty.upperBound=99

The predicates supported so far include:

(Just remember to add hlx_ before each URL parameter name)

Furthermore, it is possible to limit the result set using hlx_p.limit and page through the result set using hlx_p.offset.

For more, see the API documentation.

Working with Excel and Google Sheets

Development

Deploying Helix Data Embed

Deploying Helix Data Embed requires the wsk command line client, authenticated to a namespace of your choice. For Project Helix, we use the helix namespace.

All commits to main that pass the testing will be deployed automatically. All commits to branches that will pass the testing will get commited as /helix-services/data-embed@ci<num> and tagged with the CI build number.