Brain Docs

Reference

Rust SDKInstallationHTTP clientWire client
create_entityget_entityresolve_entitylist_entitiesupdate_entityrename_entitymerge_entitiesunmerge_entitytombstone_entity
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
Rust SDKEntitiesupdate_entity

update_entity

Replace an entity's canonical name, aliases and attributes.

PURPOSE

Replace an entity's mutable fields. It is a PUT: the fields it is given replace what is there.

PUT/v1/entities/:idBearer API keystable
async fn update_entity(&self, entity_id: &str, input: &UpdateEntityInput) -> Result<EntityDetail, BrainHttpError>
Handshake credentialstable
async fn update_entity(&self, request: &EntityUpdateRequest) -> Result<EntityViewResponse>

Parameters

ParameterTypeRequired
entity_idstringrequired

The entity to update. Positional on the HTTP tier.

canonical_namestringrequired

The canonical name. Required even when unchanged.

aliasesstring[]optional

Replaces the alias set — passing an empty list clears it.

attributesstring (wire: bytes)optional

Replaces the attribute blob.

Returns

FieldTypePresence
—EntityDetailalways

The full entity as it now stands.

Replace, not merge

Omitting aliases is not the same as leaving them alone in every client: pass the full set you want to end up with. To change only the display name while keeping the old one resolvable, use rename_entity instead.

On the wire

Ids are fixed-width UUID bytes rather than strings, attributes is an opaque attributesBlob, and every request carries a requestId plus an optional actAs. See Wire client.

See also
rename_entityget_entity

Was this page helpful?

list_entities

Enumerate entities by type and name prefix — cursor-paged, with a required type filter.

rename_entity

Change an entity's canonical name, optionally keeping the old one as an alias.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground