api.md: direct TOC links to new publicapi docs location

This change updates the existing api.md TOC links to point at the new
publicapi folder/files. It also removes the body of the docs from the
file, to avoid the docs becoming out of sync.

This change also renames overview.md to readme.md.

Updates tailscale/corp#19526

Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
This commit is contained in:
Charlotte Brandhorst-Satzkorn 2024-05-17 16:47:47 -07:00 committed by Sonia Appasamy
parent 964282d34f
commit 4f4f317174
4 changed files with 67 additions and 2730 deletions

2749
api.md

File diff suppressed because it is too large Load Diff

View File

@ -236,8 +236,6 @@ The API exposes two methods for dealing with subnet routes:
- Get routes: [`GET /api/v2/device/{deviceID}/routes`](#get-device-routes) to fetch lists of advertised and enabled routes for a device
- Set routes: [`POST /api/v2/device/{deviceID}/routes`](#set-device-routes) to set enabled routes for a device
<a name="device-get"></a>
## Get device
```http
@ -295,8 +293,6 @@ curl "https://api.tailscale.com/api/v2/device/12345?fields=all" \
}
```
<a href="device-delete"></a>
## Delete device
```http
@ -336,8 +332,6 @@ HTTP/1.1 501 Not Implemented
{"message":"cannot delete devices outside of your tailnet"}
```
<a href="expire-device-key"></a>
## Expire a device's key
```http
@ -372,8 +366,6 @@ HTTP/1.1 200 OK
## Routes
<a href="device-routes-get">
## Get device routes
```http
@ -409,8 +401,6 @@ Returns the enabled and advertised subnet routes for a device.
}
```
<a href="device-routes-post"></a>
## Set device routes
```http
@ -458,8 +448,6 @@ Returns the enabled and advertised subnet routes for a device.
## Authorize
<a href="#device-authorized-post"></a>
## Authorize device
```http
@ -502,8 +490,6 @@ The response is 2xx on success. The response body is currently an empty JSON obj
## Tags
<a href="device-tags-post"></a>
## Update device tags
```http
@ -562,8 +548,6 @@ If the tags supplied in the `POST` call do not exist in the tailnet policy file,
## Keys
<a href="device-key-post"></a>
## Update device key
```http

View File

@ -64,8 +64,6 @@ The policy file is expressed using "[HuJSON](https://github.com/tailscale/hujson
Most policy file API methods can also return regular JSON for compatibility with other tools.
Learn more about [network access controls](https://tailscale.com/kb/1018/).
<a href="tailnet-acl-get"></a>
## Get Policy File
```http
@ -203,8 +201,6 @@ In addition, errors and warnings are returned.
}
```
<a href="tailnet-acl-post"></a>
## Update policy file
```http
@ -325,8 +321,6 @@ A successful response returns an HTTP status of '200' and the modified tailnet p
}
```
<a href="tailnet-acl-preview-post"></a>
## Preview policy file rule matches
```http
@ -418,8 +412,6 @@ The response also echoes the `type` and `previewFor` values supplied in the requ
}
```
<a href="tailnet-acl-validate-post"></a>
## Validate and test policy file
```http
@ -526,8 +518,6 @@ any groups that are used in the policy file that are not being synced from SCIM.
## Devices
<a href="tailnet-devices"></a>
## List tailnet devices
```http
@ -643,8 +633,6 @@ The remaining three methods operate on auth keys and API access tokens.
}
```
<a href="tailnet-keys-get"></a>
## List tailnet keys
```http
@ -684,8 +672,6 @@ Returns a JSON object with the IDs of all active keys.
}
```
<a href="tailnet-keys-post"></a>
## Create auth key
```http
@ -783,8 +769,6 @@ It holds the capabilities specified in the request and can no longer be retrieve
}
```
<a href="tailnet-keys-key-get"></a>
## Get key
```http
@ -845,8 +829,6 @@ Response for a revoked (deleted) or expired key will have an `invalid` field set
}
```
<a href="tailnet-keys-key-delete"></a>
## Delete key
```http
@ -876,8 +858,6 @@ curl -X DELETE 'https://api.tailscale.com/api/v2/tailnet/example.com/keys/k12345
This returns status 200 upon success.
<a href="tailnet-dns"></a>
## DNS
The tailnet DNS methods are provided for fetching and modifying various DNS settings for a tailnet.
@ -886,8 +866,6 @@ Learn more about [DNS in Tailscale](https://tailscale.com/kb/1054/).
## Nameservers
<a href="tailnet-dns-nameservers-get"></a>
## Get nameservers
```http
@ -917,8 +895,6 @@ curl "https://api.tailscale.com/api/v2/tailnet/example.com/dns/nameservers" \
}
```
<a href="tailnet-dns-nameservers-post"></a>
## Set nameservers
```http
@ -989,8 +965,6 @@ The response is a JSON object containing the new list of nameservers and the sta
## Preferences
<a href="tailnet-dns-preferences-get"></a>
## Get DNS preferences
```http
@ -1020,8 +994,6 @@ curl "https://api.tailscale.com/api/v2/tailnet/example.com/dns/preferences" \
}
```
<a href="tailnet-dns-preferences-post"></a>
## Set DNS preferences
```http
@ -1085,8 +1057,6 @@ If there are DNS servers, this returns the MagicDNS status:
## Search Paths
<a href="tailnet-dns-searchpaths-get"></a>
## Get search paths
```http
@ -1116,8 +1086,6 @@ curl "https://api.tailscale.com/api/v2/tailnet/example.com/dns/searchpaths" \
}
```
<a href="tailnet-dns-searchpaths-post"></a>
## Set search paths
```http