home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 1421529723 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • simonw 13

issue 1

  • Write API in Datasette core · 13 ✖

author_association 1

  • OWNER 13
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1331238841 https://github.com/simonw/datasette/issues/1850#issuecomment-1331238841 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5PWRe5 simonw 9599 2022-11-29T20:11:20Z 2022-11-29T20:11:20Z OWNER

Released this in Datasette 1.0a0: - #1913

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1313156167 https://github.com/simonw/datasette/issues/1850#issuecomment-1313156167 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5ORSxH simonw 9599 2022-11-14T06:23:39Z 2022-11-14T06:23:39Z OWNER

The API explorer is now live here: https://latest-1-0-dev.datasette.io/-/api

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1313155712 https://github.com/simonw/datasette/issues/1850#issuecomment-1313155712 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5ORSqA simonw 9599 2022-11-14T06:22:57Z 2022-11-14T06:22:57Z OWNER

I think the ability to create tokens should be protected by a create-tokens permission, not just a global setting.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1313115059 https://github.com/simonw/datasette/issues/1850#issuecomment-1313115059 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5ORIuz simonw 9599 2022-11-14T05:21:30Z 2022-11-14T05:21:30Z OWNER

New documentation for these features currently lives here: https://docs.datasette.io/en/1.0-dev/json_api.html#the-json-write-api

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1292940011 https://github.com/simonw/datasette/issues/1850#issuecomment-1292940011 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5NELLr simonw 9599 2022-10-27T04:01:59Z 2022-10-27T04:01:59Z OWNER

Working on that first "insert row" implementation:

  • https://github.com/simonw/datasette/issues/1851

Has made it very clear to me that I should go the whole hog and build the basic form-based interface for this as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1291430992 https://github.com/simonw/datasette/issues/1850#issuecomment-1291430992 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M-axQ simonw 9599 2022-10-26T02:59:33Z 2022-10-26T02:59:33Z OWNER

I started the documentation for the API tokens mechanism here: https://docs.datasette.io/en/1.0-dev/authentication.html#api-tokens

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1291417755 https://github.com/simonw/datasette/issues/1850#issuecomment-1291417755 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M-Xib simonw 9599 2022-10-26T02:36:52Z 2022-10-26T02:36:58Z OWNER

I'm going to set a convention that "token": "something" in an actor means that they were authenticated by a token.

"token": "dstok" for example.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1291417100 https://github.com/simonw/datasette/issues/1850#issuecomment-1291417100 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M-XYM simonw 9599 2022-10-26T02:35:32Z 2022-10-26T02:35:32Z OWNER

It strikes me that users should NOT be able to use a token to create additional tokens.

The current design actually does allow that, since the dstok_ Bearer token can be used to authenticate calls to the /-/create-token page.

So I think I need a mechanism whereby that page can only allow access to users authenticated by cookie.

Not obvious how to do that though, since Datasette's authentication actor system is designed to abstract that detail away!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1289707357 https://github.com/simonw/datasette/issues/1850#issuecomment-1289707357 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M319d simonw 9599 2022-10-24T22:23:12Z 2022-10-24T22:23:12Z OWNER

Here's the implementation of datasette-auth-tokens: https://github.com/simonw/datasette-auth-tokens/blob/main/datasette_auth_tokens/init.py

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1289706439 https://github.com/simonw/datasette/issues/1850#issuecomment-1289706439 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M31vH simonw 9599 2022-10-24T22:22:17Z 2022-10-24T22:22:17Z OWNER

API authentication will be via Authorization: Bearer XXX request headers.

I'm inclined to add a default token mechanism to Datasette based on tokens that are signed with the DATASETTE_SECRET. Maybe the root user can access /-/create-token which provides a UI for generating a time-limited signed token? Could also have a datasette create-token command for creating such tokens at the command-line.

Plugins can then define alternative ways of creating tokens, such as the existing https://datasette.io/plugins/datasette-auth-tokens plugin.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1289703432 https://github.com/simonw/datasette/issues/1850#issuecomment-1289703432 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M31AI simonw 9599 2022-10-24T22:19:48Z 2022-10-24T22:19:48Z OWNER

It may turn out that it makes sense to also add a UI for these actions as part of this project. That's still to be determined.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1289702146 https://github.com/simonw/datasette/issues/1850#issuecomment-1289702146 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M30sC simonw 9599 2022-10-24T22:19:04Z 2022-10-24T22:19:04Z OWNER

This is going to need a whole bunch of new permissions.

To review: the existing set of permissions are listed here: https://docs.datasette.io/en/0.62/authentication.html#built-in-permissions

  • view-instance
  • view-database
  • view-database-download
  • view-table
  • view-query
  • execute-sql
  • permissions-debug
  • debug-menu

I'm going to reuse database terminology for the new permissions. So first draft of those is:

  • insert-row
  • update-row
  • delete-row
  • create-table
  • drop-table
  • alter-table
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  
1289696171 https://github.com/simonw/datasette/issues/1850#issuecomment-1289696171 https://api.github.com/repos/simonw/datasette/issues/1850 IC_kwDOBm6k_c5M3zOr simonw 9599 2022-10-24T22:15:57Z 2022-10-24T22:15:57Z OWNER

I'm going to treat this as a bit of a research spike, at least until I like the direction it is going enough to commit to it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Write API in Datasette core 1421529723  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 25.046ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows