diff --git a/browsers/extensions.mdx b/browsers/extensions.mdx index 1c9da35..f57af2b 100644 --- a/browsers/extensions.mdx +++ b/browsers/extensions.mdx @@ -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. diff --git a/info/projects.mdx b/info/projects.mdx index 79ff2f4..b7ff205 100644 --- a/info/projects.mdx +++ b/info/projects.mdx @@ -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) | @@ -244,6 +244,30 @@ if err := pager.Err(); err != nil { ``` +### Get a project + +Project names are unique within an organization. You can retrieve a project by its ID or by its name. + + +```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 +``` + + ### Update a project