{"html_url": "https://github.com/simonw/datasette/issues/1953#issuecomment-1352459146", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1953", "id": 1352459146, "node_id": "IC_kwDOBm6k_c5QnOOK", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-15T02:02:15Z", "updated_at": "2022-12-15T02:02:15Z", "author_association": "OWNER", "body": "```\r\nThe third Datasette 1.0 alpha release adds upsert support to the JSON API, plus the ability to specify finely grained permissions when creating an API token.\r\n\r\n- New `/db/table/-/upsert` API, [documented here](https://docs.datasette.io/en/latest/json_api.html#tableupsertview). upsert is an update-or-replace: existing rows will have specified keys updated, but if no row matches the incoming primary key a brand new row will be inserted instead. ([#1878](https://github.com/simonw/datasette/issues/1878))\r\n- New [register_permissions(datasette)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-register-permissions) plugin hook. Plugins can now register named permissions, which will then be listed in various interfaces that show available permissions. ([#1940](https://github.com/simonw/datasette/issues/1940))\r\n- The `/db/-/create` API for [creating a table](https://docs.datasette.io/en/latest/json_api.html#tablecreateview) now accepts `\"ignore\": true` and `\"replace\": true` options when called with the `\"rows\"` property that creates a new table based on an example set of rows. This means the API can be called multiple times with different rows, setting rules for what should happen if a primary key collides with an existing row. ([#1927](https://github.com/simonw/datasette/issues/1927))\r\n- Arbitrary permissions can now be configured at the instance, database and resource (table, SQL view or canned query) level in Datasette's [Metadata](https://docs.datasette.io/en/latest/metadata.html#metadata) JSON and YAML files. The new `\"permissions\"` key can be used to specify which actors should have which permissions. See [Other permissions in metadata](https://docs.datasette.io/en/latest/authentication.html#authentication-permissions-other) for details. ([#1636](https://github.com/simonw/datasette/issues/1636))\r\n- The `/-/create-token` page can now be used to create API tokens which are restricted to just a subset of actions, including against specific databases or resources. See [API Tokens](https://docs.datasette.io/en/latest/authentication.html#createtokenview) for details. ([#1947](https://github.com/simonw/datasette/issues/1947))\r\n- Likewise, the `datasette create-token` CLI command can now create tokens with [a subset of permissions](https://docs.datasette.io/en/latest/authentication.html#authentication-cli-create-token-restrict). ([#1855](https://github.com/simonw/datasette/issues/1855))\r\n- New datasette.create_token() API method ` for programmatically creating signed API tokens. ([#1951](https://github.com/simonw/datasette/issues/1951))\r\n- `/db/-/create` API now requires actor to have `insert-row` permission in order to use the `\"row\"` or `\"rows\"` properties. ([#1937](https://github.com/simonw/datasette/issues/1937))\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1495821607, "label": "Release notes for Datasette 1.0a2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1953#issuecomment-1352410078", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1953", "id": 1352410078, "node_id": "IC_kwDOBm6k_c5QnCPe", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-15T00:44:56Z", "updated_at": "2022-12-15T00:44:56Z", "author_association": "OWNER", "body": "Highlights:\r\n\r\n- `/db/table/-/upsert`\r\n- ignore and replace for `/db/-/create`\r\n- `register_permissions()` plugin hook\r\n- `datasette create-token` can create restricted tokens\r\n- `/-/create-token` can too\r\n- `datasette --get --token` option\r\n- `datasette.create_token()` API method\r\n\r\nPlus some smaller things.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1495821607, "label": "Release notes for Datasette 1.0a2"}, "performed_via_github_app": null}