Sign Up

Projects

GET
/orgs/{org_id}/projects

Non-administrator members see the default project and projects where they have explicit membership.

Authorization

user_jwt read:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:projects

Path Parameters

org_id*string

The organization ID

Formatuuid

Query Parameters

limit?integer

Maximum number of items to return, 1–200 (default 100)

Formatint64
Range1 <= value <= 200
Default100
cursor?string

Opaque continuation token returned as next_cursor by a previous request

Response Body

The page of projects

application/json
  1. response

A page of projects.

next_cursor?|

The cursor for the next page, or null when this is the last page.

projects*array<>

The projects in this page.

curl -X GET 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects'
{  "next_cursor": "string",  "projects": [    {      "created_at": "2019-08-24T14:15:22Z",      "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",      "default": true,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}

Create a project

POST
/orgs/{org_id}/projects

Authorization

user_jwt write:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:projects

Path Parameters

org_id*string

The organization ID

Formatuuid

Request Body

application/json
  1. body
name*string

The project name.

Response Body

The created project

application/json
  1. response
created_at*string

When the project was created.

Formatdate-time
created_by?|

The user who created the project, when visible.

Formatuuid
default*boolean

Whether this is the organization's default project.

id*string

The project ID.

Formatuuid
name*string

The project name.

org_id*string

The organization ID.

Formatuuid
updated_at*string

When the project was last updated.

Formatdate-time
curl -X POST 'https://example.com/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "default": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "updated_at": "2019-08-24T14:15:22Z"}

Get a project

GET
/projects/{project_id}

Authorization

user_jwt read:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:projects

Path Parameters

project_id*string

The project ID

Response Body

The project

application/json
  1. response
created_at*string

When the project was created.

Formatdate-time
created_by?|

The user who created the project, when visible.

Formatuuid
default*boolean

Whether this is the organization's default project.

id*string

The project ID.

Formatuuid
name*string

The project name.

org_id*string

The organization ID.

Formatuuid
updated_at*string

When the project was last updated.

Formatdate-time
curl -X GET 'https://example.com/projects/string'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "default": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "updated_at": "2019-08-24T14:15:22Z"}

Update a project

PATCH
/projects/{project_id}

Updates the fields present in the request body. The default project cannot be updated.

Authorization

user_jwt write:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:projects

Path Parameters

project_id*string

The project ID

Request Body

application/json
  1. body
name*string

The new project name.

Response Body

The project

application/json
  1. response
created_at*string

When the project was created.

Formatdate-time
created_by?|

The user who created the project, when visible.

Formatuuid
default*boolean

Whether this is the organization's default project.

id*string

The project ID.

Formatuuid
name*string

The project name.

org_id*string

The organization ID.

Formatuuid
updated_at*string

When the project was last updated.

Formatdate-time
curl -X PATCH 'https://example.com/projects/string' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "default": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "updated_at": "2019-08-24T14:15:22Z"}

Delete a project

DELETE
/projects/{project_id}

Authorization

user_jwt delete:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: delete:projects

Path Parameters

project_id*string

The project ID

Response Body

Project deleted

curl -X DELETE 'https://example.com/projects/string'
Empty

Get the project budget

GET
/projects/{project_id}/budget

Authorization

user_jwt read:budgets
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:budgets

Path Parameters

project_id*string

The project ID

Response Body

The project budget

application/json
  1. response

A project's monthly spend budget and its current state.

created_at*|

When the budget was first set, or null when no budget is set.

Formatdate-time
evaluated_at?|

When spend was last evaluated in the current period. null until the first evaluation in the period.

Formatdate-time
exceeded_at?|

When the project reached its budget this period. null while the project is under its budget.

Formatdate-time
monthly_limit_cents*|

The monthly budget, in US cents, or null when no budget is set.

Formatint64
period_start_date*|

The first day of the current budget period (the calendar month in UTC), as YYYY-MM-DD.

Formatdate
spent_cents?|

Month-to-date spend at list price, in US cents, from the last evaluation in the current period. null until the first evaluation in the period.

Formatint64
stop_at?|

When running sandboxes are ended: exceeded_at plus the grace period. On the first sweep after this time, running persistent sandboxes are stopped and running ephemeral sandboxes are deleted; macOS sandboxes, which run on a prepaid Mac reservation, keep running. null when exceeded_at is null, and null when this time falls on or after the start of the next UTC month: the hold expires at the month boundary, so no sandbox is ended this period.

Formatdate-time
updated_at*|

When a member last set the budget, or null when no budget is set. Spend evaluations do not change it.

Formatdate-time
curl -X GET 'https://example.com/projects/string/budget'
{  "created_at": "2019-08-24T14:15:22Z",  "evaluated_at": "2019-08-24T14:15:22Z",  "exceeded_at": "2019-08-24T14:15:22Z",  "monthly_limit_cents": 0,  "period_start_date": "2019-08-24",  "spent_cents": 0,  "stop_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

Reset a project budget

DELETE
/projects/{project_id}/budget

Removes the monthly spend limit and releases its budget hold. Sandboxes already stopped remain stopped.

Authorization

user_jwt write:budgets
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:budgets

Path Parameters

project_id*string

The project ID

Response Body

Project budget reset

curl -X DELETE 'https://example.com/projects/string/budget'
Empty

Set a project budget

PUT
/projects/{project_id}/budget

Sets the monthly spend limit in cents. Reaching the limit blocks new sandboxes and, after the organization's grace period, stops running ones. macOS sandboxes, which run on a prepaid Mac reservation, are exempt from both: reaching the limit instead blocks buying or renewing a reservation for the project.

Authorization

user_jwt write:budgets
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:budgets

Path Parameters

project_id*string

The project ID

Request Body

application/json
  1. body

PUT /projects/{id}/budget body.

monthly_limit_cents*integer

The monthly budget, in US cents: an integer from 100 ($1.00) to 100000000000 ($1 billion).

Formatint64
Range100 <= value <= 100000000000

Response Body

The project budget, updated

application/json
  1. response

A project's monthly spend budget and its current state.

created_at*|

When the budget was first set, or null when no budget is set.

Formatdate-time
evaluated_at?|

When spend was last evaluated in the current period. null until the first evaluation in the period.

Formatdate-time
exceeded_at?|

When the project reached its budget this period. null while the project is under its budget.

Formatdate-time
monthly_limit_cents*|

The monthly budget, in US cents, or null when no budget is set.

Formatint64
period_start_date*|

The first day of the current budget period (the calendar month in UTC), as YYYY-MM-DD.

Formatdate
spent_cents?|

Month-to-date spend at list price, in US cents, from the last evaluation in the current period. null until the first evaluation in the period.

Formatint64
stop_at?|

When running sandboxes are ended: exceeded_at plus the grace period. On the first sweep after this time, running persistent sandboxes are stopped and running ephemeral sandboxes are deleted; macOS sandboxes, which run on a prepaid Mac reservation, keep running. null when exceeded_at is null, and null when this time falls on or after the start of the next UTC month: the hold expires at the month boundary, so no sandbox is ended this period.

Formatdate-time
updated_at*|

When a member last set the budget, or null when no budget is set. Spend evaluations do not change it.

Formatdate-time
curl -X PUT 'https://example.com/projects/string/budget' \  -H 'Content-Type: application/json' \  -d '{  "monthly_limit_cents": 100}'
{  "created_at": "2019-08-24T14:15:22Z",  "evaluated_at": "2019-08-24T14:15:22Z",  "exceeded_at": "2019-08-24T14:15:22Z",  "monthly_limit_cents": 0,  "period_start_date": "2019-08-24",  "spent_cents": 0,  "stop_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/projects/{project_id}/lifecycle-policy

Authorization

user_jwt read:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:projects

Path Parameters

project_id*string

The project ID

Response Body

The project lifecycle policy

application/json
  1. response
effective*

The effective policies by sandbox class and persistence mode.

policy*

The project-level lifecycle defaults.

curl -X GET 'https://example.com/projects/string/lifecycle-policy'
{  "effective": {    "gpu": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "linux": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "macos": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "windows": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    }  },  "policy": {    "ephemeral": {      "idle_timeout_seconds": 0,      "timeout_seconds": 0    },    "persistent": {      "idle_timeout_seconds": 0,      "on_idle_timeout": null,      "on_timeout": null,      "timeout_seconds": 0,      "wake_on_request": true    }  }}
PATCH
/projects/{project_id}/lifecycle-policy

A missing block is kept, null clears it, and an object replaces the whole block. Fields missing inside a replacement object are unset.

Authorization

user_jwt write:projects
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:projects

Path Parameters

project_id*string

The project ID

Request Body

application/json
  1. body

A PATCH at block granularity: an absent block is kept, null clears it, and an object replaces the whole block (a field missing inside it is unset). Blocks never merge field by field, so each block is validated on its own.

ephemeral?|

Replacement defaults for ephemeral sandboxes; null clears the block.

persistent?|

Replacement defaults for persistent sandboxes; null clears the block.

Response Body

The project lifecycle policy

application/json
  1. response
effective*

The effective policies by sandbox class and persistence mode.

policy*

The project-level lifecycle defaults.

curl -X PATCH 'https://example.com/projects/string/lifecycle-policy' \  -H 'Content-Type: application/json' \  -d '{}'
{  "effective": {    "gpu": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "linux": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "macos": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    },    "windows": {      "ephemeral": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      },      "persistent": {        "idle_timeout_seconds": 0,        "on_idle_timeout": null,        "on_timeout": null,        "timeout_capped": true,        "timeout_seconds": 0,        "timeout_source": "project",        "wake_on_request": true      }    }  },  "policy": {    "ephemeral": {      "idle_timeout_seconds": 0,      "timeout_seconds": 0    },    "persistent": {      "idle_timeout_seconds": 0,      "on_idle_timeout": null,      "on_timeout": null,      "timeout_seconds": 0,      "wake_on_request": true    }  }}

List project members

GET
/projects/{project_id}/members

Authorization

user_jwt read:members
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:members

Path Parameters

project_id*string

The project ID

Query Parameters

limit?integer

Maximum number of items to return, 1–200 (default 100)

Formatint64
Range1 <= value <= 200
Default100
cursor?string

Opaque continuation token returned as next_cursor by a previous request

Response Body

The page of project members

application/json
  1. response
members*array<>

The project members in this page.

next_cursor?|

The next page cursor, or null at the end.

curl -X GET 'https://example.com/projects/string/members'
{  "members": [    {      "added_at": "2019-08-24T14:15:22Z",      "email": "string",      "implicit": true,      "name": "string",      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"    }  ],  "next_cursor": "string"}

Add project members

POST
/projects/{project_id}/members

Authorization

user_jwt write:members
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:members

Path Parameters

project_id*string

The project ID

Request Body

application/json
  1. body
user_ids*array<>

The user IDs.

Response Body

The project members, unchanged

application/json
  1. response
added_user_ids*array<>

The user IDs added by the request.

curl -X POST 'https://example.com/projects/string/members' \  -H 'Content-Type: application/json' \  -d '{  "user_ids": [    "2d98503d-4ab4-41bd-8fc6-78cc006fd2db"  ]}'
{  "added_user_ids": [    "2064c91e-4c85-4fe7-a4ac-b3933e175b00"  ]}

Remove a project member

DELETE
/projects/{project_id}/members/{user_id}

Removes the project membership and revokes the API keys that depended on it.

Authorization

user_jwt write:members
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:members

Path Parameters

project_id*string

The project ID

user_id*string

The user ID

Formatuuid

Response Body

Project member removed

curl -X DELETE 'https://example.com/projects/string/members/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Empty
GET
/projects/{project_id}/service-accounts

Authorization

user_jwt read:service_accounts
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: read:service_accounts

Path Parameters

project_id*string

The project ID

Query Parameters

limit?integer

Maximum number of items to return, 1–200 (default 100)

Formatint64
Range1 <= value <= 200
Default100
cursor?string

Opaque continuation token returned as next_cursor by a previous request

Response Body

The page of project service accounts

application/json
  1. response
next_cursor?|

The next page cursor, or null at the end.

service_accounts*array<>

The service accounts in this page.

curl -X GET 'https://example.com/projects/string/service-accounts'
{  "next_cursor": "string",  "service_accounts": [    {      "added_at": "2019-08-24T14:15:22Z",      "archived_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "implicit": true,      "name": "string"    }  ]}
POST
/projects/{project_id}/service-accounts

Authorization

user_jwt write:service_accounts
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:service_accounts

Path Parameters

project_id*string

The project ID

Request Body

application/json
  1. body
service_account_id*string

The service account ID.

Formatuuid

Response Body

The project service accounts, unchanged

application/json
  1. response
added_service_account_ids*array<>

The service account IDs added by the request.

curl -X POST 'https://example.com/projects/string/service-accounts' \  -H 'Content-Type: application/json' \  -d '{  "service_account_id": "81f92c7b-60ae-411e-bc6f-e2dc93db8886"}'
{  "added_service_account_ids": [    "56524c40-654d-4733-bea1-cef54bcb25e1"  ]}
DELETE
/projects/{project_id}/service-accounts/{service_account_id}

Removes the project membership and revokes the API keys that depended on it.

Authorization

user_jwt write:service_accounts
headerAuthorizationBearer <token>

Bearer access token for a signed-in user.

Scope: write:service_accounts

Path Parameters

project_id*string

The project ID

service_account_id*string

The service account ID

Formatuuid

Response Body

Project service account removed

curl -X DELETE 'https://example.com/projects/string/service-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Empty