pub struct ProjectsApi { /* private fields */ }Expand description
Projects — a workspace grouping agents, sessions and files
Implementations§
Source§impl ProjectsApi
impl ProjectsApi
Sourcepub async fn create(&self, body: &CreateProjectRequest) -> Result<Project>
pub async fn create(&self, body: &CreateProjectRequest) -> Result<Project>
Create a project
File ids that do not resolve in this tenant are dropped rather than rejected, so the stored project never claims a file the agent cannot read.
POST /api/v1/projects
Sourcepub async fn delete(&self, project_id: &str) -> Result<DeleteProjectResponse>
pub async fn delete(&self, project_id: &str) -> Result<DeleteProjectResponse>
Delete a project
Unlinks rather than cascades: every chat filed under the project survives and is simply no
longer in it. chats_kept is how many were unfiled. Deleting a folder that takes the work
with it is how people lose things they cannot get back.
DELETE /api/v1/projects/{projectId}
Sourcepub async fn get(&self, project_id: &str) -> Result<ProjectDetail>
pub async fn get(&self, project_id: &str) -> Result<ProjectDetail>
Read a project with its chats
Includes the chats filed under it and the caller’s own access level. A project the caller may not open answers 404, not 403 — the existence of a private project is itself private.
GET /api/v1/projects/{projectId}
Sourcepub async fn list(
&self,
params: &ListProjectsParams,
) -> Result<ListProjectsResponse>
pub async fn list( &self, params: &ListProjectsParams, ) -> Result<ListProjectsResponse>
List projects
Live projects, most recently updated first. Archived ones leave this list — ask for them
with archived=true. archived_count is always the number of archived projects the caller
can see, whichever list was requested, so a client can badge the Archived section without a
second call.
GET /api/v1/projects
Sourcepub async fn update(
&self,
project_id: &str,
body: &UpdateProjectRequest,
) -> Result<Project>
pub async fn update( &self, project_id: &str, body: &UpdateProjectRequest, ) -> Result<Project>
Edit a project
Only fields present in the body are changed. archived_at is the archive switch: an ISO
timestamp archives, and null restores — the field must be sent explicitly, because an
omitted key means “leave as is”.
View access is 403; no access is a project the caller may not open answers 404, not 403 — the existence of a private project is itself private.
Turning on private for a project with no recorded owner and no signed-in caller is refused
with 400: it would leave nobody able to open it. Signing in stamps the caller as owner at
that moment.
PATCH /api/v1/projects/{projectId}
Trait Implementations§
Source§impl Clone for ProjectsApi
impl Clone for ProjectsApi
Source§fn clone(&self) -> ProjectsApi
fn clone(&self) -> ProjectsApi
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more