Projects
Projects are a container for deployments, and can be associated with domains and KV databases in an organization.
Get project details
/v1/projects/{projectId}
Parameters
Name | Type | Description |
---|---|---|
projectId (required) | string (uuid) | Project ID |
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
id | string (uuid) | |
name | string | |
createdAt | string (date-time) | |
updatedAt | string (date-time) |
Example
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"name": "my-project",
"createdAt": "2021-08-01T00:00:00Z",
"updatedAt": "2021-08-01T00:00:00Z"
}
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Update project details
/v1/projects/{projectId}
Parameters
Name | Type | Description |
---|---|---|
projectId (required) | string (uuid) | Project ID |
Request Body (JSON)
Name | Type | Description |
---|---|---|
name | string |
Example Body
{
"name": "my-project"
}
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
id | string (uuid) | |
name | string | |
createdAt | string (date-time) | |
updatedAt | string (date-time) |
Example
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"name": "my-project",
"createdAt": "2021-08-01T00:00:00Z",
"updatedAt": "2021-08-01T00:00:00Z"
}
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Delete a project
/v1/projects/{projectId}
Parameters
Name | Type | Description |
---|---|---|
projectId (required) | string (uuid) | Project ID |
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Get project analytics
/v1/projects/{projectId}/analytics
time
field representing the start of the interval.Parameters
Name | Type | Description |
---|---|---|
projectId (required) | string (uuid) | Project ID |
since (required) | string (date-time) | Start of the time range in RFC3339 format. Defaults to 24 hours ago. |
until (required) | string (date-time) | End of the time range in RFC3339 format. Defaults to the current time. |
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
fields | array | |
values | array |
Example
{
"fields": [
{
"name": "time",
"type": "time"
},
{
"name": "requestCount",
"type": "number"
},
{
"name": "cpuSeconds",
"type": "number"
},
{
"name": "uptimeSeconds",
"type": "number"
},
{
"name": "maxRssMemoryBytes",
"type": "number"
},
{
"name": "networkIngressBytes",
"type": "number"
},
{
"name": "networkEgressBytes",
"type": "number"
},
{
"name": "kvReadCount",
"type": "number"
},
{
"name": "kvWriteCount",
"type": "number"
},
{
"name": "kvReadUnits",
"type": "number"
},
{
"name": "kvWriteUnits",
"type": "number"
}
],
"values": [
[
"2023-08-01T00:00:00Z",
111,
111,
111,
111,
111,
111,
111,
111,
111,
111
],
[
"2023-08-01T00:15:00Z",
222,
222,
222,
222,
222,
222,
222,
222,
222,
222
],
[
"2023-08-01T00:30:00Z",
333,
333,
333,
333,
333,
333,
333,
333,
333,
333
],
[
"2023-08-01T00:45:00Z",
444,
444,
444,
444,
444,
444,
444,
444,
444,
444
],
[
"2023-08-01T01:00:00Z",
555,
555,
555,
555,
555,
555,
555,
555,
555,
555
]
]
}
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Get project deployments
/v1/projects/{projectId}/deployments
Link
header of the response if needed.Parameters
Name | Type | Description |
---|---|---|
page | integer | |
limit | integer | |
projectId (required) | string (uuid) | Project ID |
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
id | undefined | |
projectId | string (uuid) | |
status | undefined | |
domains | array | |
databases | object | The KV databases that this deployment has access to.
Currently, only |
createdAt | string (date-time) | |
updatedAt | string (date-time) |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Create a project deployment
/v1/projects/{projectId}/deployments
Initiate a build process for a new deployment. Note that this process is asynchronous - a successful request to this endpoint API doesn't mean the deployment is ready.
For now, you can track the progress of a build by polling either the build logs for a deployment or the deployment details API endpoints.
Parameters
Name | Type | Description |
---|---|---|
projectId (required) | string (uuid) | Project ID |
Request Body (JSON)
Name | Type | Description |
---|---|---|
entryPointUrl | string | An URL of the entry point of the application. This is the file that will be executed when the deployment is invoked. |
importMapUrl (nullable) | string | An URL of the import map file. If If an empty string is given, no import map will be used. |
lockFileUrl (nullable) | string | An URL of the lock file. If If an empty string is given, no lock file will be used. |
compilerOptions (nullable) | object | |
assets | object | |
envVars | object | A dictionary of environment variables to be set in the runtime environment of the deployment. |
databases (nullable) | object | KV database ID mappings to associate with the deployment. A key represents a KV database name (e.g. Currently, only If not provided, the deployment will be created with no KV database attached. |
Example Body
{
"entryPointUrl": "main.ts",
"importMapUrl": null,
"lockFileUrl": null,
"compilerOptions": null,
"assets": {
"main.ts": {
"kind": "file",
"content": "Deno.serve((req: Request) => new Response(\"Hello World\"));\n",
"encoding": "utf-8"
},
"images/cat1.png": {
"kind": "file",
"content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk",
"encoding": "base64"
},
"images/cat2.png": {
"kind": "file",
"gitSha1": "5c4f8729e5c30a91a890e24d7285e89f418c637b"
},
"symlink.png": {
"kind": "symlink",
"target": "images/cat1.png"
}
},
"envVars": {
"MY_ENV": "hey"
},
"databases": {
"default": "5b484959-cba2-482d-95ab-ba592784af80"
}
}
Responses
- Success (200)
- Invalid Request (400)
- Unauthorized (401)
- Not Found (404)
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
id | undefined | |
projectId | string (uuid) | |
status | undefined | |
domains | array | |
databases | object | The KV databases that this deployment has access to.
Currently, only |
createdAt | string (date-time) | |
updatedAt | string (date-time) |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |
Response Type
application/json
Response Properties
Name | Type | Description |
---|---|---|
code | string | The error code |
message | string | The error message |