api.md: document preauthorized and tags fields

Updates https://github.com/tailscale/tailscale/issues/2120
Updates https://github.com/tailscale/tailscale/issues/4571
Updates https://github.com/tailscale/tailscale/issues/1369

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
pull/4698/head
Denton Gentry 2 years ago committed by Denton Gentry
parent 48d43134d7
commit 53f6c3f9f2

@ -815,11 +815,15 @@ Supply the tailnet in the path.
`capabilities` - A mapping of resources to permissible actions. `capabilities` - A mapping of resources to permissible actions.
``` ```
{ {
"capabilities": { "capabilities": {
"devices": { "devices": {
"create": { "create": {
"reusable": false, "reusable": false,
"ephemeral": false "ephemeral": false,
"preauthorized": false,
"tags": [
"tag:example"
]
} }
} }
} }
@ -839,11 +843,13 @@ The full key can no longer be retrieved by the server.
``` ```
echo '{ echo '{
"capabilities": { "capabilities": {
"devices": { "devices": {
"create": { "create": {
"reusable": false, "reusable": false,
"ephemeral": false "ephemeral": false,
"preauthorized": false,
"tags": [ "tag:example" ]
} }
} }
} }
@ -859,7 +865,7 @@ Response:
"key": "tskey-k123456CNTRL-abcdefghijklmnopqrstuvwxyz", "key": "tskey-k123456CNTRL-abcdefghijklmnopqrstuvwxyz",
"created": "2021-12-09T23:22:39Z", "created": "2021-12-09T23:22:39Z",
"expires": "2022-03-09T23:22:39Z", "expires": "2022-03-09T23:22:39Z",
"capabilities": {"devices": {"create": {"reusable": false, "ephemeral": false}}} "capabilities": {"devices": {"create": {"reusable": false, "ephemeral": false, "preauthorized": false, "tags": [ "tag:example" ]}}}
} }
``` ```

Loading…
Cancel
Save