Atlas project production

MDM Integration Automation (Mosyle)

Unify device inventory and compliance signals so operations can act on a single source of truth. Authenticate with Mosyle using access token, email, and password to obtain a JWT. List devices with pagination; optionally export to CSV. Update a single device by serial, or bulk update via CSV in batches of 100.

Type
Component
Lifecycle
Deprecated
Last touched
2025-02-22
Visibility
Public

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 Ingestion

Contributes in this stage.

Canonical Storage

Contributes in this stage.

Automation Engines

Contributes in this stage.

Human Interfaces

Contributes in this stage.

Operational Adoption

Contributes 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

Owners

Josh Barton

Users

IT ops, device management, Josh Barton (owner)

mosyle_api

Architecture & Major Components

  • High-level diagram (text):

    • Entry/trigger -> core logic -> outputs (details per docs below)
  • 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.