๐Ÿ“™Reading & writing data via the API

These endpoints are highly beta and subject to change

For fetching info about a specific glif, user, or a specific glifRun.

Paginate using ?page= when applicable. You can also increase the # of results per page using e.g. ?limit=50, currently defaulting to 20 and capped at 100

Individual glif

Fetch a specific glif: GET https://glif.app/api/glifs?id=clgh1vxtu0011mo081dplq3xs

Includes full glif-graph JSON in the data field

Lists of glifs

Fetch all public glifs: GET https://glif.app/api/glifs

Fetch featured glifs on homepage: GET https://glif.app/api/glifs?featured=1

Fetch user's glifs by username: GET https://glif.app/api/glifs?username=jamiedubs

Fetch user's glifs by user ID: GET https://glif.app/api/glifs?userId=clcu26uxx0000lc08mqnjf5mq

To get the full glif-graph JSON in the data field, append ?includes=spells.data

Runs for a given glif

Fetch a specific run: GET https://glif.app/api/runs?id=i3kqrilvp6rmsszwnw44ycyl

Fetch all public runs for a specific glif: GET https://glif.app/api/runs?glifId=clgh1vxtu0011mo081dplq3xs (?spellId= also works)

Fetch all public runs by a specific user:

Spheres

To get glifs from a specific sphere (AKA folder or collection): GET https://glif.app/api/spheres?slug=memes

You can also use ?id=

Like the 'list of glifs' above, you can fetch the full glif-graph JSON in these list queries by appending ?includes=spells.data

Public spheres are listed on https://glif.app/spheres

Create a glif

Currently in private testing; contact us if you're messing with this!

Rough example, using httpie:

http POST https://glif.app/api/glifs name="test API glif" description="just testing" graph:='{"nodes": []}' Authorization:"Bearer $GLIF_API_TOKEN"

User info

Fetch info about the logged-in user (and thus test that your API token is working and you are logged-in): GET https://glif.app/api/me

Fetch info about a user, via either ID or username:

Please join our Discord if you have any questions or need help with the API.

Last updated