Guide #
14
Microservices
Explore Redshred's microservices, including the tolo-text token lookup endpoint for querying custom page regions using GeoJSON polygons.
Platform Foundations
What's Inside
Example H2
This is a div block with a Webflow interaction that will be triggered when the heading is in the view.
Microservices
In addition to the data stored in the RedShred database, we publish several microservices as part of the platform. The low level documentation for these is available through the OpenAPI documentation, but we provide a few specific examples here.
Token Lookups
Sometimes you’ll create a new segment in your very own perspective and may want to query for a region of the page that isn’t represented by a single segment. In these cases, you can pass a GeoJSON polygon to the tolo-text (token-lookup text) endpoint.
bash:
curl -H "Authorization: Token $REDSHRED_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-X GET "https://api.redshred.com/v2/collections/$COLLECTION/services/tolo-text?regions=$GEOJSON_REGIONS"
python:
from redshred import RedShredClient
rs = RedShredClient()
segment = next(rs.collection(collection).segments())
text = segment.get_text()
Get Started Today