Skip to content

OswaldLabsOpenSource/platform

Repository files navigation

Oswald Labs Platform

Uptime Robot ratio (30 days) Number of events

Oswald Labs Platform is a set of open, extensible APIs and SDKs to build apps. This repository contains (some) code that runs on our servers, primarily serving as a wrapper around various APIs and to prevent API key exposion. Most APIs available here are free for public use with rate limits.

Endpoints

Platform APIs

Endpoint Details Params
GET /screenshot Screenshot image url (webpage URL)
GET /read-aloud Text-to-speech text (URL-encoded text)
GET /reader JSON with website content url (webpage URL)
POST /reader JSON with website content url (webpage URL)
POST /describe JSON with AutoALT dataUri (base 64-encoded image)

GDPR

πŸ‡ͺπŸ‡Ί Note: The GDPR export/delete APIs are served through a brute force prevention middleware, so more than a few requests in a short time will slow down the response (resets in 15 minutes).

Endpoint Details
GET /agastya/gdpr/export.csv Data export CSV file
GET /agastya/gdpr/export/:format Data export in JSON/CSV
GET /agastya/gdpr/delete JSON number of deleted items
GET /agastya/secure-collect Anonymously track an event

Agastya Loaders

Endpoint Details
GET /_/API_KEY.js Load Agastya to your site
GET /_/dev/API_KEY.js Load Agastya development
GET /_/beta/API_KEY.js Load Agastya beta

Agastya API keys

Note: APIs with the πŸ”’ (lock) emoji require Bearer token-based authentication. You can generate a token by using Oswald Labs Account APIs. APIs with the πŸ”‘ (key) emoji require captcha validation.

Endpoint Details
GET /agastya/api-keys πŸ”’ List of your API keys
GET /agastya/api-keys/:apiKey πŸ”’ Configuration of an API key
PATCH /agastya/api-keys/:apiKey πŸ”’ Update configuration of API key
DELETE /agastya/api-keys/:apiKey πŸ”’ Delete an API key
PUT /agastya/api-keys πŸ”’ Create a new API key

Oswald Labs Account

Endpoint Details
GET /auth/details πŸ”’ Returns account details
PATCH /auth/details πŸ”’ Updates account details
POST /auth/login Generates a login token
POST /auth/register πŸ”‘ Create a new account
POST /auth/forgot Emails a forgot password link
POST /auth/reset πŸ”’ Requests a password reset

Subscription management

Endpoint Details
GET /billing/customer πŸ”’ Returns customer details
GET /billing/plans πŸ”’ Returns list of plans
GET /billing/cards πŸ”’ Returns credit card(s)
PATCH /billing/cards/:cardId πŸ”’ Updates card details
DELETE /billing/cards/:cardId πŸ”’ Deletes credit catd
GET /billing/invoices πŸ”’ Returns customer invoices
GET /billing/subscriptions πŸ”’ Returns customer subscriptions
PUT /billing/subscriptions πŸ”’ Creates new subscription

Agastya Analytics

Endpoint Details
POST /agastya/analytics/recents πŸ”’ Returns recent tracked events
POST /agastya/analytics/graphs πŸ”’ Aggregated values for graphing
POST /agastya/analytics/sorted πŸ”’ Single key-value sorted events
POST /agastya/analytics/explore πŸ”’ User journey timeline

API limits

These APIs are free for public usage with the following rate limits (requests slow down after 500 requests/15 minutes):

Usage type Rate limit Total limit
Without API key 200 requests/minute No daily/monthly limits
GDPR export/delete Increasing delay Renews in 15 minutes

When you're using authenticated endpoints, use /secure/* instead of /v1/* to avoid all rate limits and send your API key as x-api-key in the header. API keys are available for free to Oswald Labs Accelerator startups and our partners. Custom-priced API keys are available for everyone else; get in touch to request one.

Development

Clone this repo and install dependencies. To install Puppeteer on Ubuntu, first install its dependencies. There may be issues.

yarn

Start a local server for development:

yarn start:local

Run the update shell script on production server:

./update.sh

About

πŸš‰ Extensible, open platform to build accessible products

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published