-
-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Link: rel="alternate"
header pointing to JSON for a table/query
#1533
Labels
Milestone
Comments
This was referenced Nov 28, 2021
I'm going to apply the hack, then fix it again in: |
Documentation: https://docs.datasette.io/en/latest/json_api.html#discovering-the-json-for-a-page https://docs.datasette.io/en/latest/json_api.html top |
Demos - these pages both have And you can hit them with
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally explored in simonw/datasette-notebook#2 (comment) - I wanted an efficient way to scan a list of URLs and figure out which if any of those corresponded to Datasette tables, canned queries or SQL output that could be represented as a table on a page.
It looks like a neat way to do that is with
Link:
header like this:Link: http://127.0.0.1:8058/fixtures/compound_three_primary_keys.json; rel="alternate"; type="application/datasette+json"
I can put a
<link href=...
in the page header too.The text was updated successfully, but these errors were encountered: