Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions browsers/extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ kernel extensions upload ./my-extension --name my-extension
Extensions uploaded to Kernel are assigned a random ID, but you can also give them a name for easier reference.
This name must be unique within your [project](/info/projects).

To retrieve an extension's metadata without downloading the archive, call `GET /extensions/{id_or_name}/metadata`.
The response includes the extension's ID, name, size, and timestamps.

## Using extensions in a browser

Passing the extension name or ID to the `create` method will load it into the browser.
Expand Down
26 changes: 25 additions & 1 deletion info/projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Use the `/org/projects` REST endpoints (or the SDKs' `projects` resource) to man
| --- | --- | --- |
| `GET` | `/org/projects` | List projects in the organization |
| `POST` | `/org/projects` | Create a project |
| `GET` | `/org/projects/{id}` | Get a project by ID |
| `GET` | `/org/projects/{id}` | Get a project by ID or name |
| `PATCH` | `/org/projects/{id}` | Update a project's name or status (`active` / `archived`) |
| `DELETE` | `/org/projects/{id}` | Delete a project (must be empty and not the last active project) |

Expand Down Expand Up @@ -244,6 +244,30 @@ if err := pager.Err(); err != nil {
```
</CodeGroup>

### Get a project

Project names are unique within an organization. You can retrieve a project by its ID or by its name.

<CodeGroup>
```typescript TypeScript
const project = await kernel.projects.get('staging');
console.log(project.id); // proj_abc123
```

```python Python
project = kernel.projects.get("staging")
print(project.id) # proj_abc123
```

```go Go
project, err := client.Projects.Get(ctx, "staging")
if err != nil {
panic(err)
}
fmt.Println(project.ID) // proj_abc123
```
</CodeGroup>

### Update a project

<CodeGroup>
Expand Down
Loading