pub struct ApiClient {
pub client: Client,
pub server: Url,
}Fields§
§client: Client§server: UrlImplementations§
Source§impl ApiClient
impl ApiClient
pub fn request( &self, method: Method, endpoint: &str, ) -> Result<RequestBuilder, ParseError>
pub fn builder(base_url: Url) -> ApiClientBuilder
pub async fn do_req_paged<T, E>(
&self,
req: RequestBuilder,
) -> Result<PagedVec<T>, ApiClientError<E>>where
T: DeserializeOwned,
E: DeserializeOwned,
pub async fn do_req<T, E>(
&self,
req: RequestBuilder,
) -> Result<T, ApiClientError<E>>where
T: DeserializeOwned,
E: DeserializeOwned,
Source§impl ApiClient
impl ApiClient
Sourcepub async fn comment_get(&self, comment_id: Base64Uuid) -> Result<Comment>
pub async fn comment_get(&self, comment_id: Base64Uuid) -> Result<Comment>
Retrieves a comment from a discussion thread by comment ID
Sourcepub async fn comment_delete(&self, comment_id: Base64Uuid) -> Result<()>
pub async fn comment_delete(&self, comment_id: Base64Uuid) -> Result<()>
Deletes a comment in a discussion thread by comment ID
Sourcepub async fn comment_update(
&self,
comment_id: Base64Uuid,
payload: UpdateComment,
) -> Result<Comment>
pub async fn comment_update( &self, comment_id: Base64Uuid, payload: UpdateComment, ) -> Result<Comment>
Updates a comment in a discussion thread by comment ID
Sourcepub async fn event_delete(&self, event_id: Base64Uuid) -> Result<()>
pub async fn event_delete(&self, event_id: Base64Uuid) -> Result<()>
Deletes a event
Sourcepub async fn workspace_invite_delete(
&self,
invitation_id: Base64Uuid,
) -> Result<()>
pub async fn workspace_invite_delete( &self, invitation_id: Base64Uuid, ) -> Result<()>
Deletes a pending workspace invitation
Sourcepub async fn workspace_invite_accept(
&self,
invitation_id: Base64Uuid,
invitation_secret: &str,
) -> Result<Workspace>
pub async fn workspace_invite_accept( &self, invitation_id: Base64Uuid, invitation_secret: &str, ) -> Result<Workspace>
Accepts the workspace invitation
Sourcepub async fn workspace_invite_decline(
&self,
invitation_id: Base64Uuid,
invitation_secret: &str,
) -> Result<()>
pub async fn workspace_invite_decline( &self, invitation_id: Base64Uuid, invitation_secret: &str, ) -> Result<()>
Declines the workspace invitation
Sourcepub async fn notebook_get(&self, notebook_id: Base64Uuid) -> Result<Notebook>
pub async fn notebook_get(&self, notebook_id: Base64Uuid) -> Result<Notebook>
Retrieves a single notebook (both its metadata and content)
Sourcepub async fn notebook_delete(&self, notebook_id: Base64Uuid) -> Result<()>
pub async fn notebook_delete(&self, notebook_id: Base64Uuid) -> Result<()>
Deletes a notebook
Sourcepub async fn notebook_update(
&self,
notebook_id: Base64Uuid,
payload: UpdateNotebook,
) -> Result<()>
pub async fn notebook_update( &self, notebook_id: Base64Uuid, payload: UpdateNotebook, ) -> Result<()>
Modifies individual properties of a single notebook
Sourcepub async fn notebook_cells_append(
&self,
notebook_id: Base64Uuid,
after: Option<&str>,
before: Option<&str>,
payload: Vec<Cell>,
) -> Result<Vec<Cell>>
pub async fn notebook_cells_append( &self, notebook_id: Base64Uuid, after: Option<&str>, before: Option<&str>, payload: Vec<Cell>, ) -> Result<Vec<Cell>>
Append the given cells to the notebook. Any cells that have their ID missing will be set on the server.
Sourcepub async fn notebook_cell_append_text(
&self,
notebook_id: Base64Uuid,
cell_id: &str,
payload: CellAppendText,
) -> Result<Cell>
pub async fn notebook_cell_append_text( &self, notebook_id: Base64Uuid, cell_id: &str, payload: CellAppendText, ) -> Result<Cell>
Append the given text and optional formatting to the specified cell
Sourcepub async fn notebook_cell_replace_text(
&self,
notebook_id: Base64Uuid,
cell_id: &str,
payload: CellReplaceText,
) -> Result<Cell>
pub async fn notebook_cell_replace_text( &self, notebook_id: Base64Uuid, cell_id: &str, payload: CellReplaceText, ) -> Result<Cell>
Replace some text and formatting in the specified cell
Sourcepub async fn notebook_duplicate(
&self,
notebook_id: Base64Uuid,
payload: NotebookCopyDestination,
) -> Result<Notebook>
pub async fn notebook_duplicate( &self, notebook_id: Base64Uuid, payload: NotebookCopyDestination, ) -> Result<Notebook>
Creates a copy of the specified notebook
Sourcepub async fn notebook_upload_file(
&self,
notebook_id: Base64Uuid,
payload: UploadData,
) -> Result<FileSummary>
pub async fn notebook_upload_file( &self, notebook_id: Base64Uuid, payload: UploadData, ) -> Result<FileSummary>
upload a file
Sourcepub async fn notebook_get_file(
&self,
notebook_id: Base64Uuid,
file_id: &str,
) -> Result<Bytes>
pub async fn notebook_get_file( &self, notebook_id: Base64Uuid, file_id: &str, ) -> Result<Bytes>
Get a file from a notebook
Sourcepub async fn notebook_delete_file(
&self,
notebook_id: Base64Uuid,
file_id: &str,
) -> Result<()>
pub async fn notebook_delete_file( &self, notebook_id: Base64Uuid, file_id: &str, ) -> Result<()>
Delete a file from a notebook
Sourcepub async fn front_matter_add_keys(
&self,
notebook_id: Base64Uuid,
payload: FrontMatterAddRows,
) -> Result<()>
pub async fn front_matter_add_keys( &self, notebook_id: Base64Uuid, payload: FrontMatterAddRows, ) -> Result<()>
Adds rows to the front matter of a notebook. If the requested position is out of bounds or is not specified, will append the rows to the existing front matter.
Sourcepub async fn front_matter_delete(&self, notebook_id: Base64Uuid) -> Result<()>
pub async fn front_matter_delete(&self, notebook_id: Base64Uuid) -> Result<()>
Deletes all front matter data for notebook.
If you wish to delete a single key instead of the whole object, use the patch endpoint with value: null
Sourcepub async fn front_matter_update(
&self,
notebook_id: Base64Uuid,
payload: FrontMatter,
) -> Result<()>
pub async fn front_matter_update( &self, notebook_id: Base64Uuid, payload: FrontMatter, ) -> Result<()>
Updates front matter for a given notebook
Sourcepub async fn front_matter_delete_key(
&self,
notebook_id: Base64Uuid,
front_matter_key: &str,
) -> Result<()>
pub async fn front_matter_delete_key( &self, notebook_id: Base64Uuid, front_matter_key: &str, ) -> Result<()>
Deletes a row of the front matter for a notebook.
Sourcepub async fn front_matter_update_key(
&self,
notebook_id: Base64Uuid,
front_matter_key: &str,
payload: FrontMatterUpdateRow,
) -> Result<()>
pub async fn front_matter_update_key( &self, notebook_id: Base64Uuid, front_matter_key: &str, payload: FrontMatterUpdateRow, ) -> Result<()>
Updates a front matter row of a given notebook
Sourcepub async fn notebook_snippet_insert(
&self,
notebook_id: Base64Uuid,
snippet_name: &Name,
cell_id: Option<&str>,
) -> Result<Vec<Cell>>
pub async fn notebook_snippet_insert( &self, notebook_id: Base64Uuid, snippet_name: &Name, cell_id: Option<&str>, ) -> Result<Vec<Cell>>
Expand the snippet and insert the cells into the notebook
Sourcepub async fn notebook_convert_to_snippet(
&self,
notebook_id: Base64Uuid,
start_cell_id: Option<&str>,
end_cell_id: Option<&str>,
) -> Result<String>
pub async fn notebook_convert_to_snippet( &self, notebook_id: Base64Uuid, start_cell_id: Option<&str>, end_cell_id: Option<&str>, ) -> Result<String>
Convert the notebook cells to a snippet
Sourcepub async fn notebook_convert_to_template(
&self,
notebook_id: Base64Uuid,
) -> Result<String>
pub async fn notebook_convert_to_template( &self, notebook_id: Base64Uuid, ) -> Result<String>
Downloads the specified notebooks as a Jsonnet template.
Sourcepub async fn threads_list(
&self,
notebook_id: Base64Uuid,
status: Option<ThreadStatus>,
) -> Result<Vec<ThreadSummary>>
pub async fn threads_list( &self, notebook_id: Base64Uuid, status: Option<ThreadStatus>, ) -> Result<Vec<ThreadSummary>>
List the threads in the given notebook
Sourcepub async fn thread_create(
&self,
notebook_id: Base64Uuid,
payload: NewThread,
) -> Result<Thread>
pub async fn thread_create( &self, notebook_id: Base64Uuid, payload: NewThread, ) -> Result<Thread>
Creates a new comment thread in a notebook
Start the auth flow to authenticate a user (used only with the Studio). For authenticating with the API see the Authentication section in the docs
Sourcepub async fn oid_linkup(
&self,
provider: &str,
cli_redirect_port: Option<i32>,
redirect: Option<&str>,
) -> Result<OidLinkupLocation>
pub async fn oid_linkup( &self, provider: &str, cli_redirect_port: Option<i32>, redirect: Option<&str>, ) -> Result<OidLinkupLocation>
Start the auth flow for linking an existing Fiberplane account with a new OID identity (used only with the Studio). For authenticating with the API see the Authentication section in the docs
Sourcepub async fn pinned_notebook_create(
&self,
payload: NewPinnedNotebook,
) -> Result<()>
pub async fn pinned_notebook_create( &self, payload: NewPinnedNotebook, ) -> Result<()>
Pins a notebook
Sourcepub async fn pinned_notebook_delete(
&self,
notebook_id: Base64Uuid,
) -> Result<()>
pub async fn pinned_notebook_delete( &self, notebook_id: Base64Uuid, ) -> Result<()>
Unpins a notebook
Sourcepub async fn profile_get(&self) -> Result<Profile>
pub async fn profile_get(&self) -> Result<Profile>
Fetch the profile of the authenticated user
Sourcepub async fn oid_connections_list(&self) -> Result<Vec<OidConnection>>
pub async fn oid_connections_list(&self) -> Result<Vec<OidConnection>>
List of all available providers and if they’re linked to the current user
Sourcepub async fn integrations_get_by_user(
&self,
) -> Result<Vec<PersonalIntegrationSummary>>
pub async fn integrations_get_by_user( &self, ) -> Result<Vec<PersonalIntegrationSummary>>
Get a list of all integrations and their status for the current user
Sourcepub async fn profile_picture_get(&self) -> Result<Bytes>
pub async fn profile_picture_get(&self) -> Result<Bytes>
Retrieve profile image
Sourcepub async fn profile_picture_update(
&self,
payload: ProfileUploadData,
) -> Result<()>
pub async fn profile_picture_update( &self, payload: ProfileUploadData, ) -> Result<()>
Upload profile image
Sourcepub async fn thread_get(&self, thread_id: Base64Uuid) -> Result<Thread>
pub async fn thread_get(&self, thread_id: Base64Uuid) -> Result<Thread>
Retrieves a discussion thread by ID
Sourcepub async fn thread_delete(&self, thread_id: Base64Uuid) -> Result<()>
pub async fn thread_delete(&self, thread_id: Base64Uuid) -> Result<()>
Deletes a discussion thread by ID
Sourcepub async fn comment_create(
&self,
thread_id: Base64Uuid,
payload: NewComment,
) -> Result<Comment>
pub async fn comment_create( &self, thread_id: Base64Uuid, payload: NewComment, ) -> Result<Comment>
Creates a comment in a discussion thread by ID
Sourcepub async fn thread_reopen(&self, thread_id: Base64Uuid) -> Result<Thread>
pub async fn thread_reopen(&self, thread_id: Base64Uuid) -> Result<Thread>
Reopens a discussion thread by ID
Sourcepub async fn thread_resolve(&self, thread_id: Base64Uuid) -> Result<Thread>
pub async fn thread_resolve(&self, thread_id: Base64Uuid) -> Result<Thread>
Resolves a discussion thread by ID
Sourcepub async fn token_list(
&self,
sort_by: Option<&str>,
sort_direction: Option<&str>,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<TokenSummary>>
pub async fn token_list( &self, sort_by: Option<&str>, sort_direction: Option<&str>, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<TokenSummary>>
Retrieves a list of all API tokens
Sourcepub async fn token_create(&self, payload: NewToken) -> Result<Token>
pub async fn token_create(&self, payload: NewToken) -> Result<Token>
Creates a new token
Sourcepub async fn token_delete(&self, id: Base64Uuid) -> Result<()>
pub async fn token_delete(&self, id: Base64Uuid) -> Result<()>
Deletes a token
Sourcepub async fn trigger_get(&self, trigger_id: Base64Uuid) -> Result<Trigger>
pub async fn trigger_get(&self, trigger_id: Base64Uuid) -> Result<Trigger>
Retrieves a trigger from a workspace by its ID
Sourcepub async fn trigger_delete(&self, trigger_id: Base64Uuid) -> Result<()>
pub async fn trigger_delete(&self, trigger_id: Base64Uuid) -> Result<()>
Deletes a trigger from a workspace by its ID
Sourcepub async fn trigger_invoke(
&self,
trigger_id: Base64Uuid,
secret_key: &str,
payload: TemplateExpandPayload,
) -> Result<TriggerInvokeResponse>
pub async fn trigger_invoke( &self, trigger_id: Base64Uuid, secret_key: &str, payload: TemplateExpandPayload, ) -> Result<TriggerInvokeResponse>
Invoke a trigger to create a notebook from the associated template
Sourcepub async fn workspace_list(
&self,
sort_by: Option<&str>,
sort_direction: Option<&str>,
) -> Result<Vec<Workspace>>
pub async fn workspace_list( &self, sort_by: Option<&str>, sort_direction: Option<&str>, ) -> Result<Vec<Workspace>>
List all workspaces authenticated user has access to
Sourcepub async fn workspace_create(&self, payload: NewWorkspace) -> Result<Workspace>
pub async fn workspace_create(&self, payload: NewWorkspace) -> Result<Workspace>
Creates a new workspace
Sourcepub async fn workspace_get(&self, workspace_id: Base64Uuid) -> Result<Workspace>
pub async fn workspace_get(&self, workspace_id: Base64Uuid) -> Result<Workspace>
Get the workspace details
Sourcepub async fn workspace_delete(&self, workspace_id: Base64Uuid) -> Result<()>
pub async fn workspace_delete(&self, workspace_id: Base64Uuid) -> Result<()>
Permanently deletes a specified workspace
Sourcepub async fn workspace_update(
&self,
workspace_id: Base64Uuid,
payload: UpdateWorkspace,
) -> Result<Workspace>
pub async fn workspace_update( &self, workspace_id: Base64Uuid, payload: UpdateWorkspace, ) -> Result<Workspace>
Update workspace settings
Sourcepub async fn data_source_list(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<DataSource>>
pub async fn data_source_list( &self, workspace_id: Base64Uuid, ) -> Result<Vec<DataSource>>
Get all workspace data sources
Sourcepub async fn data_source_create(
&self,
workspace_id: Base64Uuid,
payload: NewDataSource,
) -> Result<DataSource>
pub async fn data_source_create( &self, workspace_id: Base64Uuid, payload: NewDataSource, ) -> Result<DataSource>
Creates a workspace data source
Sourcepub async fn data_source_get(
&self,
workspace_id: Base64Uuid,
data_source_name: &Name,
) -> Result<DataSource>
pub async fn data_source_get( &self, workspace_id: Base64Uuid, data_source_name: &Name, ) -> Result<DataSource>
Get the data source’s details
Sourcepub async fn data_source_delete(
&self,
workspace_id: Base64Uuid,
data_source_name: &Name,
) -> Result<()>
pub async fn data_source_delete( &self, workspace_id: Base64Uuid, data_source_name: &Name, ) -> Result<()>
Delete a data source
Sourcepub async fn data_source_update(
&self,
workspace_id: Base64Uuid,
data_source_name: &Name,
payload: UpdateDataSource,
) -> Result<DataSource>
pub async fn data_source_update( &self, workspace_id: Base64Uuid, data_source_name: &Name, payload: UpdateDataSource, ) -> Result<DataSource>
Update a data source
Sourcepub async fn event_list(
&self,
workspace_id: Base64Uuid,
occurrence_time_start: Timestamp,
occurrence_time_end: Timestamp,
labels: Option<HashMap<String, String>>,
sort_by: Option<&str>,
sort_direction: Option<&str>,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<Event>>
pub async fn event_list( &self, workspace_id: Base64Uuid, occurrence_time_start: Timestamp, occurrence_time_end: Timestamp, labels: Option<HashMap<String, String>>, sort_by: Option<&str>, sort_direction: Option<&str>, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<Event>>
Get a list of all events matching the query
Sourcepub async fn event_create(
&self,
workspace_id: Base64Uuid,
payload: NewEvent,
) -> Result<Event>
pub async fn event_create( &self, workspace_id: Base64Uuid, payload: NewEvent, ) -> Result<Event>
Creates a new event
Sourcepub async fn workspace_front_matter_schema_get(
&self,
workspace_id: Base64Uuid,
) -> Result<WorkspaceFrontMatterSchemas>
pub async fn workspace_front_matter_schema_get( &self, workspace_id: Base64Uuid, ) -> Result<WorkspaceFrontMatterSchemas>
Retrieve all front matter schemas defined in the workspace
Sourcepub async fn workspace_front_matter_schema_create(
&self,
workspace_id: Base64Uuid,
payload: NewWorkspaceFrontMatterSchema,
) -> Result<()>
pub async fn workspace_front_matter_schema_create( &self, workspace_id: Base64Uuid, payload: NewWorkspaceFrontMatterSchema, ) -> Result<()>
Retrieve a front matter schema defined in the workspace
Sourcepub async fn workspace_front_matter_schema_get_by_name(
&self,
workspace_id: Base64Uuid,
front_matter_schema_name: &str,
) -> Result<FrontMatterSchema>
pub async fn workspace_front_matter_schema_get_by_name( &self, workspace_id: Base64Uuid, front_matter_schema_name: &str, ) -> Result<FrontMatterSchema>
Retrieve a front matter schema defined in the workspace
Sourcepub async fn workspace_front_matter_schema_delete(
&self,
workspace_id: Base64Uuid,
front_matter_schema_name: &str,
) -> Result<()>
pub async fn workspace_front_matter_schema_delete( &self, workspace_id: Base64Uuid, front_matter_schema_name: &str, ) -> Result<()>
Delete a front matter schema defined in the workspace
Sourcepub async fn integrations_get_by_workspace(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<WorkspaceIntegrationSummary>>
pub async fn integrations_get_by_workspace( &self, workspace_id: Base64Uuid, ) -> Result<Vec<WorkspaceIntegrationSummary>>
Get a list of al integrations and their status for the specified workspace
Sourcepub async fn workspace_invite_get(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<WorkspaceInvite>>
pub async fn workspace_invite_get( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<WorkspaceInvite>>
Retrieves a list of pending workspace invitations
Sourcepub async fn workspace_invite_create(
&self,
workspace_id: Base64Uuid,
payload: NewWorkspaceInvite,
) -> Result<WorkspaceInviteResponse>
pub async fn workspace_invite_create( &self, workspace_id: Base64Uuid, payload: NewWorkspaceInvite, ) -> Result<WorkspaceInviteResponse>
Invites a user to a workspace
Sourcepub async fn label_keys_list(
&self,
workspace_id: Base64Uuid,
prefix: Option<&str>,
) -> Result<Vec<String>>
pub async fn label_keys_list( &self, workspace_id: Base64Uuid, prefix: Option<&str>, ) -> Result<Vec<String>>
Retrieve all label keys
Sourcepub async fn label_values_list(
&self,
workspace_id: Base64Uuid,
label_key: &str,
prefix: Option<&str>,
) -> Result<Vec<String>>
pub async fn label_values_list( &self, workspace_id: Base64Uuid, label_key: &str, prefix: Option<&str>, ) -> Result<Vec<String>>
Retrieve all label values
Sourcepub async fn workspace_leave(&self, workspace_id: Base64Uuid) -> Result<()>
pub async fn workspace_leave(&self, workspace_id: Base64Uuid) -> Result<()>
Leaves a workspace
Sourcepub async fn notebook_list(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<NotebookSummary>>
pub async fn notebook_list( &self, workspace_id: Base64Uuid, ) -> Result<Vec<NotebookSummary>>
Retrieves all Notebooks available to the workspace
Sourcepub async fn notebook_create(
&self,
workspace_id: Base64Uuid,
payload: NewNotebook,
) -> Result<Notebook>
pub async fn notebook_create( &self, workspace_id: Base64Uuid, payload: NewNotebook, ) -> Result<Notebook>
Create a new notebook
Sourcepub async fn pagerduty_receiver_list(
&self,
workspace_id: Base64Uuid,
page: Option<i32>,
limit: Option<i32>,
sort_by: Option<&str>,
sort_direction: Option<&str>,
) -> Result<PagedVec<PagerDutyReceiver>, ApiClientError<PagerDutyReceiverListError>>
pub async fn pagerduty_receiver_list( &self, workspace_id: Base64Uuid, page: Option<i32>, limit: Option<i32>, sort_by: Option<&str>, sort_direction: Option<&str>, ) -> Result<PagedVec<PagerDutyReceiver>, ApiClientError<PagerDutyReceiverListError>>
TODO
Sourcepub async fn pagerduty_receiver_get(
&self,
workspace_id: Base64Uuid,
pager_duty_receiver_name: &Name,
) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverGetError>>
pub async fn pagerduty_receiver_get( &self, workspace_id: Base64Uuid, pager_duty_receiver_name: &Name, ) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverGetError>>
TODO
Sourcepub async fn pagerduty_receiver_create(
&self,
workspace_id: Base64Uuid,
pager_duty_receiver_name: &Name,
payload: NewPagerDutyReceiver,
) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverCreateError>>
pub async fn pagerduty_receiver_create( &self, workspace_id: Base64Uuid, pager_duty_receiver_name: &Name, payload: NewPagerDutyReceiver, ) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverCreateError>>
TODO
Sourcepub async fn pagerduty_receiver_delete(
&self,
workspace_id: Base64Uuid,
pager_duty_receiver_name: &Name,
) -> Result<(), ApiClientError<PagerDutyReceiverDeleteError>>
pub async fn pagerduty_receiver_delete( &self, workspace_id: Base64Uuid, pager_duty_receiver_name: &Name, ) -> Result<(), ApiClientError<PagerDutyReceiverDeleteError>>
TODO
Sourcepub async fn pagerduty_receiver_update(
&self,
workspace_id: Base64Uuid,
pager_duty_receiver_name: &Name,
payload: UpdatePagerDutyReceiver,
) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverUpdateError>>
pub async fn pagerduty_receiver_update( &self, workspace_id: Base64Uuid, pager_duty_receiver_name: &Name, payload: UpdatePagerDutyReceiver, ) -> Result<PagerDutyReceiver, ApiClientError<PagerDutyReceiverUpdateError>>
TODO
Sourcepub async fn workspace_picture_get(
&self,
workspace_id: Base64Uuid,
) -> Result<Bytes>
pub async fn workspace_picture_get( &self, workspace_id: Base64Uuid, ) -> Result<Bytes>
Retrieves a workspace image
Sourcepub async fn workspace_picture_update(
&self,
workspace_id: Base64Uuid,
payload: ProfileUploadData,
) -> Result<()>
pub async fn workspace_picture_update( &self, workspace_id: Base64Uuid, payload: ProfileUploadData, ) -> Result<()>
Uploads a workspace image
Sourcepub async fn pinned_view_get(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<View>>
pub async fn pinned_view_get( &self, workspace_id: Base64Uuid, ) -> Result<Vec<View>>
Get all pinned views for the current user
Sourcepub async fn pinned_view_add(
&self,
workspace_id: Base64Uuid,
payload: PinnedView,
) -> Result<()>
pub async fn pinned_view_add( &self, workspace_id: Base64Uuid, payload: PinnedView, ) -> Result<()>
Add an existing view to the pinned views list
Sourcepub async fn pinned_view_remove(
&self,
workspace_id: Base64Uuid,
view_name: &Name,
) -> Result<()>
pub async fn pinned_view_remove( &self, workspace_id: Base64Uuid, view_name: &Name, ) -> Result<()>
Remove view from the pinned views list
Sourcepub async fn pinned_notebook_list(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<NotebookSummary>>
pub async fn pinned_notebook_list( &self, workspace_id: Base64Uuid, ) -> Result<Vec<NotebookSummary>>
List all pinned notebooks for a specific workspace
Sourcepub async fn proxy_list(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<ProxySummary>>
pub async fn proxy_list( &self, workspace_id: Base64Uuid, ) -> Result<Vec<ProxySummary>>
List all proxies
Sourcepub async fn proxy_create(
&self,
workspace_id: Base64Uuid,
payload: NewProxy,
) -> Result<Proxy>
pub async fn proxy_create( &self, workspace_id: Base64Uuid, payload: NewProxy, ) -> Result<Proxy>
Create a new proxy
Sourcepub async fn proxy_get(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
) -> Result<Proxy>
pub async fn proxy_get( &self, workspace_id: Base64Uuid, proxy_name: &Name, ) -> Result<Proxy>
Retrieve a single proxy
Sourcepub async fn proxy_delete(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
) -> Result<()>
pub async fn proxy_delete( &self, workspace_id: Base64Uuid, proxy_name: &Name, ) -> Result<()>
Deletes a single proxy
Sourcepub async fn proxy_relay(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
provider_protocol_version: &str,
payload: Vec<u8>,
) -> Result<Bytes>
pub async fn proxy_relay( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, provider_protocol_version: &str, payload: Vec<u8>, ) -> Result<Bytes>
Relays a query to invoke a provider on a remote proxy
Sourcepub async fn proxy_config_schema(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
) -> Result<Bytes>
pub async fn proxy_config_schema( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, ) -> Result<Bytes>
Relay a query to call ‘get_config_schema’ from a provider on a remote proxy
Sourcepub async fn proxy_create_cells(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
payload: Vec<u8>,
) -> Result<Bytes>
pub async fn proxy_create_cells( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, payload: Vec<u8>, ) -> Result<Bytes>
Relay a query to call ‘create_cells’ from a provider on a remote proxy
Sourcepub async fn proxy_extract_data(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
payload: Vec<u8>,
) -> Result<Bytes>
pub async fn proxy_extract_data( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, payload: Vec<u8>, ) -> Result<Bytes>
Relay a query to call ‘extract_data’ from a provider on a remote proxy
Sourcepub async fn proxy_invoke(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
payload: Vec<u8>,
) -> Result<Bytes>
pub async fn proxy_invoke( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, payload: Vec<u8>, ) -> Result<Bytes>
Relays a query to invoke a provider on a remote proxy
Sourcepub async fn proxy_supported_query_types(
&self,
workspace_id: Base64Uuid,
proxy_name: &Name,
data_source_name: &Name,
) -> Result<Bytes>
pub async fn proxy_supported_query_types( &self, workspace_id: Base64Uuid, proxy_name: &Name, data_source_name: &Name, ) -> Result<Bytes>
Relay a query to call ‘get_supported_query_types’ from a provider on a remote proxy
Sourcepub async fn notebook_search(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
payload: NotebookSearch,
) -> Result<Vec<NotebookSummary>>
pub async fn notebook_search( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, payload: NotebookSearch, ) -> Result<Vec<NotebookSummary>>
Search for notebooks
Sourcepub async fn snippet_list(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
) -> Result<Vec<SnippetSummary>>
pub async fn snippet_list( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, ) -> Result<Vec<SnippetSummary>>
List the snippets that have been uploaded
Sourcepub async fn snippet_create(
&self,
workspace_id: Base64Uuid,
payload: NewSnippet,
) -> Result<Snippet>
pub async fn snippet_create( &self, workspace_id: Base64Uuid, payload: NewSnippet, ) -> Result<Snippet>
Create a new snippet
Sourcepub async fn snippet_get(
&self,
workspace_id: Base64Uuid,
snippet_name: &Name,
) -> Result<Snippet>
pub async fn snippet_get( &self, workspace_id: Base64Uuid, snippet_name: &Name, ) -> Result<Snippet>
Retrieves a specified snippet from a workspace
Sourcepub async fn snippet_delete(
&self,
workspace_id: Base64Uuid,
snippet_name: &Name,
) -> Result<()>
pub async fn snippet_delete( &self, workspace_id: Base64Uuid, snippet_name: &Name, ) -> Result<()>
Deletes a specified snippet from a workspace
Sourcepub async fn snippet_update(
&self,
workspace_id: Base64Uuid,
snippet_name: &Name,
payload: UpdateSnippet,
) -> Result<Snippet>
pub async fn snippet_update( &self, workspace_id: Base64Uuid, snippet_name: &Name, payload: UpdateSnippet, ) -> Result<Snippet>
Updates a specified snippet from a workspace
Sourcepub async fn snippet_expand(
&self,
workspace_id: Base64Uuid,
snippet_name: &Name,
) -> Result<Vec<Cell>>
pub async fn snippet_expand( &self, workspace_id: Base64Uuid, snippet_name: &Name, ) -> Result<Vec<Cell>>
Expand the snippet and return the array of cells (without inserting them into a specific notebook)
Sourcepub async fn template_list(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
) -> Result<Vec<TemplateSummary>>
pub async fn template_list( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, ) -> Result<Vec<TemplateSummary>>
Retrieve all the templates that have been uploaded
Sourcepub async fn template_create(
&self,
workspace_id: Base64Uuid,
payload: NewTemplate,
) -> Result<Template>
pub async fn template_create( &self, workspace_id: Base64Uuid, payload: NewTemplate, ) -> Result<Template>
Create a new template
Sourcepub async fn template_get(
&self,
workspace_id: Base64Uuid,
template_name: &Name,
) -> Result<Template>
pub async fn template_get( &self, workspace_id: Base64Uuid, template_name: &Name, ) -> Result<Template>
Retrieves a specified template
Sourcepub async fn template_delete(
&self,
workspace_id: Base64Uuid,
template_name: &Name,
) -> Result<()>
pub async fn template_delete( &self, workspace_id: Base64Uuid, template_name: &Name, ) -> Result<()>
Deletes a specified template
Sourcepub async fn template_update(
&self,
workspace_id: Base64Uuid,
template_name: &Name,
payload: UpdateTemplate,
) -> Result<Template>
pub async fn template_update( &self, workspace_id: Base64Uuid, template_name: &Name, payload: UpdateTemplate, ) -> Result<Template>
Updates a specified template
Sourcepub async fn template_expand(
&self,
workspace_id: Base64Uuid,
template_name: &Name,
payload: TemplateExpandPayload,
) -> Result<Notebook>
pub async fn template_expand( &self, workspace_id: Base64Uuid, template_name: &Name, payload: TemplateExpandPayload, ) -> Result<Notebook>
Expand the template into a notebook
Sourcepub async fn trigger_list(
&self,
workspace_id: Base64Uuid,
) -> Result<Vec<Trigger>>
pub async fn trigger_list( &self, workspace_id: Base64Uuid, ) -> Result<Vec<Trigger>>
List all created triggers in the workspace
Sourcepub async fn trigger_create(
&self,
workspace_id: Base64Uuid,
payload: NewTrigger,
) -> Result<Trigger>
pub async fn trigger_create( &self, workspace_id: Base64Uuid, payload: NewTrigger, ) -> Result<Trigger>
Creates a new trigger for a template
Sourcepub async fn workspace_user_list(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
) -> Result<Vec<Membership>>
pub async fn workspace_user_list( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, ) -> Result<Vec<Membership>>
List all users for a workspace
Sourcepub async fn workspace_user_remove(
&self,
workspace_id: Base64Uuid,
user_id: Base64Uuid,
) -> Result<()>
pub async fn workspace_user_remove( &self, workspace_id: Base64Uuid, user_id: Base64Uuid, ) -> Result<()>
Removes a user from the workspace
Sourcepub async fn workspace_user_update(
&self,
workspace_id: Base64Uuid,
user_id: Base64Uuid,
payload: UpdateWorkspaceUser,
) -> Result<User>
pub async fn workspace_user_update( &self, workspace_id: Base64Uuid, user_id: Base64Uuid, payload: UpdateWorkspaceUser, ) -> Result<User>
Updates the user within a workspace
Sourcepub async fn view_list(
&self,
workspace_id: Base64Uuid,
sort_by: Option<&str>,
sort_direction: Option<&str>,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<View>>
pub async fn view_list( &self, workspace_id: Base64Uuid, sort_by: Option<&str>, sort_direction: Option<&str>, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<View>>
Retrieves all views
Sourcepub async fn view_create(
&self,
workspace_id: Base64Uuid,
payload: NewView,
) -> Result<View>
pub async fn view_create( &self, workspace_id: Base64Uuid, payload: NewView, ) -> Result<View>
Creates a new view
Sourcepub async fn view_get(
&self,
workspace_id: Base64Uuid,
view_name: &Name,
) -> Result<View>
pub async fn view_get( &self, workspace_id: Base64Uuid, view_name: &Name, ) -> Result<View>
Retrieves a single view
Sourcepub async fn view_delete(
&self,
workspace_id: Base64Uuid,
view_name: &Name,
) -> Result<()>
pub async fn view_delete( &self, workspace_id: Base64Uuid, view_name: &Name, ) -> Result<()>
Deletes an existing view
Sourcepub async fn view_update(
&self,
workspace_id: Base64Uuid,
view_name: &Name,
payload: UpdateView,
) -> Result<View>
pub async fn view_update( &self, workspace_id: Base64Uuid, view_name: &Name, payload: UpdateView, ) -> Result<View>
Updates an existing view
Sourcepub async fn webhook_list(
&self,
workspace_id: Base64Uuid,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<Webhook>>
pub async fn webhook_list( &self, workspace_id: Base64Uuid, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<Webhook>>
Retrieve all webhooks for a specific workspace
Sourcepub async fn webhook_create(
&self,
workspace_id: Base64Uuid,
payload: NewWebhook,
) -> Result<Webhook>
pub async fn webhook_create( &self, workspace_id: Base64Uuid, payload: NewWebhook, ) -> Result<Webhook>
Create a new webhook. Upon execution of this route, a test event (“ping”) will be sent to the endpoint.
If sending the ping event fails, the webhook will still be created, but it will be disabled.
Please check the response of this endpoint to see whenever enabled = false,
and if that is the case, check the latest delivery to see why. Once the endpoint has been fixed, you
can re-deliver the ping payload and if that works, manually re-enable the webhook again.
Sourcepub async fn webhook_delete(
&self,
workspace_id: Base64Uuid,
webhook_id: Base64Uuid,
) -> Result<()>
pub async fn webhook_delete( &self, workspace_id: Base64Uuid, webhook_id: Base64Uuid, ) -> Result<()>
Deletes an existing webhook
Sourcepub async fn webhook_update(
&self,
workspace_id: Base64Uuid,
webhook_id: Base64Uuid,
payload: UpdateWebhook,
) -> Result<Webhook>
pub async fn webhook_update( &self, workspace_id: Base64Uuid, webhook_id: Base64Uuid, payload: UpdateWebhook, ) -> Result<Webhook>
Updates an existing webhook. Upon execution of this route, a test event (“ping”) will be sent to the endpoint.
If sending the ping event fails, the webhook will still be updated, but will be disabled.
Please check the response of this endpoint to see whenever enabled = false, and if that is the case
(and not manually requested), check the latest delivery to see why. Once the endpoint has been fixed, you
can re-deliver the ping payload and if that works, manually re-enable the webhook again.
Sourcepub async fn webhook_delivery_list(
&self,
workspace_id: Base64Uuid,
webhook_id: Base64Uuid,
page: Option<i32>,
limit: Option<i32>,
) -> Result<Vec<WebhookDeliverySummary>>
pub async fn webhook_delivery_list( &self, workspace_id: Base64Uuid, webhook_id: Base64Uuid, page: Option<i32>, limit: Option<i32>, ) -> Result<Vec<WebhookDeliverySummary>>
Retrieve a list of deliveries for a specific webhook
Sourcepub async fn webhook_delivery_get(
&self,
workspace_id: Base64Uuid,
webhook_id: Base64Uuid,
delivery_id: Base64Uuid,
) -> Result<WebhookDelivery>
pub async fn webhook_delivery_get( &self, workspace_id: Base64Uuid, webhook_id: Base64Uuid, delivery_id: Base64Uuid, ) -> Result<WebhookDelivery>
Retrieve information about a specific delivery for a specific webhook
Sourcepub async fn webhook_delivery_resend(
&self,
workspace_id: Base64Uuid,
webhook_id: Base64Uuid,
delivery_id: Base64Uuid,
) -> Result<()>
pub async fn webhook_delivery_resend( &self, workspace_id: Base64Uuid, webhook_id: Base64Uuid, delivery_id: Base64Uuid, ) -> Result<()>
Resend a specific delivery