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>
This commit is contained in:
Denton Gentry 2022-05-17 05:25:24 -07:00 committed by Denton Gentry
parent 48d43134d7
commit 53f6c3f9f2
1 changed files with 11 additions and 5 deletions

16
api.md
View File

@ -815,11 +815,15 @@ Supply the tailnet in the path.
`capabilities` - A mapping of resources to permissible actions.
```
{
"capabilities": {
"capabilities": {
"devices": {
"create": {
"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 '{
"capabilities": {
"capabilities": {
"devices": {
"create": {
"reusable": false,
"ephemeral": false
"ephemeral": false,
"preauthorized": false,
"tags": [ "tag:example" ]
}
}
}
@ -859,7 +865,7 @@ Response:
"key": "tskey-k123456CNTRL-abcdefghijklmnopqrstuvwxyz",
"created": "2021-12-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" ]}}}
}
```