Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating subhosting documentation (#436)
- Loading branch information
1 parent
9e0ba32
commit d889c64
Showing
10 changed files
with
367 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Authentication | ||
|
||
Developers can provision projects, domains, KV databases, and other resources | ||
using the Subhosting REST API. | ||
|
||
## Endpoint and authentication | ||
|
||
The base URL for the Subhosting REST API v1 is below. | ||
|
||
```console | ||
https://api.deno.com/v1/ | ||
``` | ||
|
||
The v1 API uses | ||
[HTTP bearer token](https://swagger.io/docs/specification/authentication/bearer-authentication/) | ||
authentication. You can create an access token to use the API in the dashboard | ||
[here](https://dash.deno.com/account#access-tokens). Most API requests will also | ||
require your organization ID. You can retrieve yours from the Deno Deploy | ||
dashboard for your organization. | ||
|
||
![Find your org ID here](./images/org-id.png) | ||
|
||
Using both your organization ID and your access token, you can test your API | ||
access by listing all the projects associated with your organization. Here is an | ||
example Deno script you can use to access the API. | ||
|
||
```typescript | ||
// Replace these with your own! | ||
const organizationId = "a75a9caa-b8ac-47b3-a423-3f2077c58731"; | ||
const token = "ddo_u7mo08lBNHm8GMGLhtrEVfcgBsCuSp36dumX"; | ||
|
||
const res = await fetch( | ||
`https://api.deno.com/v1/organizations/${organizationId}/projects`, | ||
{ | ||
method: "GET", | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
}, | ||
); | ||
|
||
const response = await res.json(); | ||
console.log(response); | ||
``` |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Acceptable use policy | ||
|
||
The Deno Subhosting service includes resources (CPU time, request counts) that | ||
are subject to this Acceptable Use policy. This document can give a rough | ||
estimate to what we consider as "Acceptable Use", and what we do not. | ||
|
||
### Examples of Acceptable Use | ||
|
||
- ✅ Server-side rendered websites | ||
- ✅ Jamstack sites and apps | ||
- ✅ Single page applications | ||
- ✅ APIs that query a DB or external API | ||
- ✅ A personal blog | ||
- ✅ A company website | ||
- ✅ An e-commerce site | ||
|
||
### Not Acceptable Use | ||
|
||
- ❌ Crypto mining | ||
- ❌ Highly CPU-intensive load (e.g. machine learning) | ||
- ❌ Media hosting for external sites | ||
- ❌ Scrapers | ||
- ❌ Proxy or VPN | ||
|
||
## Guidelines | ||
|
||
We expect most projects to fall well within the usage limits. We will notify you | ||
if your projects usage significantly deviates from the norm. We will reach out | ||
to you where possible before taking any action to address unreasonable burdens | ||
on our infrastructure. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.