Embedders
Rust embedders API reference: typed methods, request options, return values, and resource models.
goodmem::api::Embedders
Access this service with client.embedders().
pub struct Embedders<'a> {
/* private fields */
}Methods
| Method | HTTP | Path |
|---|---|---|
create | POST | /v1/embedders |
delete | DELETE | /v1/embedders/{id} |
get | GET | /v1/embedders/{id} |
list | GET | /v1/embedders |
update | PUT | /v1/embedders/{id} |
Errors and cancellation
Calls return Result<T>. See Error for validation, HTTP, transport, decoding, and timeout failures. Stream items can also return errors after the call succeeds.
Pagination helpers fetch pages when polled. Drop a page or event stream to cancel further work.
Implementations
impl Embedders<'_>
create
pub async fn create(&self, body: &EmbedderCreationRequest) ->Result<EmbedderResponse>
Create a new embedder
Creates an embedder configuration for use with memory spaces. If ownerId is omitted, the authenticated principal becomes the owner; CREATE_EMBEDDER is evaluated against that proposed embedder and owner. Returns 409 when an equivalent embedder configuration already exists for the owner. See the embedder provider guide (<https://docs.goodmem.ai/docs/how-to/endpoint-registration>) for provider-specific configuration.
Errors include local validation, HTTP failures, and malformed responses.
HTTP: POST /v1/embedders
delete
pub async fn delete(&self, id: impl std::fmt::Display) ->Result<()>
Delete an embedder
Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials.
IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible.
CONFLICT: Returns HTTP 409 Conflict if the embedder is still referenced by a space. Requires DELETE_EMBEDDER on the requested embedder.
Errors include local validation, HTTP failures, and malformed responses.
HTTP: DELETE /v1/embedders/{id}
get
pub async fn get( &self, id: impl std::fmt::Display, options: &EmbeddersGetOptions, ) ->Result<EmbedderResponse>
Get an embedder by ID
Retrieves the details of a specific embedder configuration by its unique identifier. Requires READ_EMBEDDER on the requested embedder. The service distinguishes a missing embedder from an existing embedder the caller cannot read. This is a read-only operation with no side effects.
Errors include local validation, HTTP failures, and malformed responses.
HTTP: GET /v1/embedders/{id}
list
pub async fn list(&self, options: &EmbeddersListOptions) ->Result<ListEmbeddersResponse>
List embedders
Retrieves a list of embedder configurations accessible to the caller, with optional filtering.
LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).
AUTHORIZATION: Requires LIST_EMBEDDER on the GoodMem instance. Each returned embedder must also be visible through READ_EMBEDDER; unauthorized embedders are filtered in PostgreSQL. The ownerId parameter filters that already-authorized result set and does not grant additional visibility. This is a read-only operation with no side effects.
Errors include local validation, HTTP failures, and malformed responses.
HTTP: GET /v1/embedders
update
pub async fn update( &self, id: impl std::fmt::Display, body: &UpdateEmbedderRequest, ) ->Result<EmbedderResponse>
Update an embedder
Updates explicitly supplied embedder fields; at least one mutable field is required. Field omission and reset semantics are defined by the request schema, and providerType cannot be changed. Returns 409 if the resulting configuration duplicates another embedder for the owner, and 412 when model-defining fields are changed while the embedder is in use. Requires UPDATE_EMBEDDER on the requested embedder. See the embedder provider guide (<https://docs.goodmem.ai/docs/how-to/endpoint-registration>) for provider-specific configuration.
Errors include local validation, HTTP failures, and malformed responses.
HTTP: PUT /v1/embedders/{id}
Types
EmbedderCreationRequestEmbedderResponseEmbeddersGetOptionsEmbeddersListOptionsListEmbeddersResponseUpdateEmbedderRequest
Trait implementations
Clone(derived)Copy(derived)Debug(derived)