Purpose
Unify device inventory and compliance signals so operations can act on a single source of truth.
Current state
Last touched: 2025-02-22. Functionality and completeness: Core list and update flows are implemented; tests and CI are pending.
Next step
Add baseline automated tests to cover critical flows; Add CI pipeline for build/test/lint; Document deployment/runtime environment (or add Dockerfile); Document interfaces (CLI flags, API endpoints, file formats); Add structured logging and basic health checks.
Interfaces
Inputs- Mosyle API credentials, CSV inputs (optional)
Outputs- CSV exports, API updates (device attributes)
Reality to Action trace
Reality IngestionContributes in this stage.
Canonical StorageContributes in this stage.
Automation EnginesContributes in this stage.
Human InterfacesContributes in this stage.
Operational AdoptionContributes in this stage.
Core workflow
TBD. Document the 5-10 steps that define the core workflow.
Operational notes
Reliability posture
Failure modes and safe behavior: Auth failures or API errors abort the run; network timeouts surface in stdout/stderr. Idempotency / retries / batching behavior: list operations are idempotent; update operations apply requested values; bulk updates are batched to 100 elements per request with no documented retry/backoff.
Observability
- Logs: CLI outputs errors and API responses to stdout/stderr
- Metrics/health checks: None built-in; rely on CLI exit codes and API responses
- Logs: stdout/stderr from CLI; error messages include API response details.
Security and privacy
Device/user assignment data.
Dependencies
Upstream- Mosyle Manager API
- MDM API access
Downstream- refresh operations
- asset truth
- support workflows
Ownership
OwnersJosh Barton
UsersIT ops, device management, Josh Barton (owner)
mosyle_api
Architecture & Major Components
High-level diagram (text):
- Entry/trigger -> core logic -> outputs (details per docs below)
Entry/trigger
→core logic
→outputs
Main entrypoint in src/main.rs handles login, list, update, and CSV batch operations.
config.toml provides access token, email, password, and base URL.
Entry points: src/main.rs
Top-level folders: src
Key abstractions: CLI subcommands, Mosyle API transport, CSV reader/writer, batch uploader (100 elements per request)
Setup / Build / Run
- Build system(s): Cargo.
- Create a
config.toml with access token, email, password, and base URL; then build and run CLI commands.