Mission API reference
Find Mission domain methods, contract types, native entry points, and result semantics.
Find Rust and Dart signatures for Mission objects, operations, and authority below. Shared mechanisms use the Platform Rust and Platform Dart references. Match signatures to the edition and artifact manifest.
Language references
- Mission Rust reference contains domain contracts and Rust entry points.
- Mission Dart reference maps the Mission contract and identifies the generated binding boundary.
Mission supports only Rust and Dart. Platform's other bindings do not supply Mission APIs.
Session lifecycle
Open one typed Mission session with verified identity, persistent storage, and current organization access. These are the generated declarations for this edition:
async fn open(identity: platform::PeerIdentity, storage: platform::StorageConfig, organization_access: OrganizationAccess) -> Result<Mission, platform::ApiError>
async fn shutdown() -> Result<(), platform::ApiError>
Future<Mission> open(platform.PeerIdentity identity, platform.StorageConfig storage, OrganizationAccess organizationAccess)
Future<void> shutdown()
Local readiness is independent of background synchronization. Cancel and join application-owned workers and close publishers before calling mission.shutdown().
Dart's RustLib.init() loads the matched native bridge once before SDK calls. It does not replace Mission.open. Keep the generated package and native library from the same build.
Domain groups
| Group | Types and operations | Read first |
|---|---|---|
| Admission and scope | OrganizationAccess, account/device identity, organization admission | Identity and admission |
| Organizations and teams | atlas.app().orgs(), .teams(), .task_groups() | Organizations, Groups, and teams |
| Entities and placement | CreateEntityParams, CreateEntityWithPlacementParams, EntityDetail, entity references | Entities, sites, and assets |
| Tracks | Track, Position, entities.save, entities.resolve | Tracks |
| Detections | TrackDetected, events.publish, events.subscribe | Events and telemetry |
| Track telemetry | TrackTelemetryV1, tracks.telemetry.advertise, tracks.telemetry.subscribe | Events and telemetry |
| Schemas and documents | FormSchema, CreateDocumentParams, FieldUpdate, Document | Schemas and documents |
Common result contracts
| Result | What it establishes | What it does not establish |
|---|---|---|
SaveResult | Local durable commit and stable entity_ref | Remote replication completion |
PublishResult | Local event acceptance and separate delivery observations | Universal receipt or exactly-once processing |
StreamPublisher | Advertised producer and publish lifetime | Authority for every consumer |
StreamSubscription | This consumer's authorized delivery and cancellation lifetime | A reusable credential or global subscription |
EntityDetail | Native entity creation/read result | A notification or live stream |
Read Platform event results and stream lifetimes for the canonical definitions.
Native site creation
The typed session exposes mission.app().entities().create_entity_with_placement(CreateEntityWithPlacementParams { ... }) in Rust. Dart uses mission.app().entities().createEntityWithPlacement(params). Supply all base fields, canonical ontology bytes, location_id, and team_id.
The existing native application facade retains its binding-specific declarations:
| Binding | Operation | Required inputs |
|---|---|---|
| Rust | atlas.app().entities().create_entity_with_placement(params) | CreateEntityWithPlacementParams with entity, ontology, location_id, and team_id |
| Dart | createEntityWithPlacement(input: ..., teamId: ..., locationId: null) | CreateEntityInput requires orgId, entityType, and affiliation. A site also supplies name, valid latitude and longitude, recognized ontologyJson, and checked teamId. |
For a new site, leave the entity identifier absent, set the location absent, and use the selected team's identifier. Rust reads the returned EntityDetail.entity.id() through its public accessor. The native Dart binding returns EntityDetailInfo.id.
Document operations use the host-supplied Rust atlas.app().documents() facade: create(CreateDocumentParams), update_fields(document_id, updates), and get(document_id). They are not declared as methods on the typed Mission session.
The placement request includes entity data and ontology in one checked operation.
Reading an operation
Check parameters, result, errors, authority, and lifetime together. A successful type conversion does not authorize a write. A successful local commit does not prove remote delivery. A valid descriptor does not authorize a subscription.
Use the edition's exact binding declarations and package tuple. Check required fields as well as method names before calling an operation.