Skip to main content

MirrorNeuron REST API

Project description

MirrorNeuron API

The RESTful HTTP Gateway for the MirrorNeuron distributed runtime system.

Architecture

Built with FastAPI and Uvicorn, this component acts as an HTTP abstraction over the core mn-python-sdk gRPC Client. It allows external microservices, web dashboards, or non-Python applications to easily interact with the MirrorNeuron cluster without speaking Protobuf.

Installation

Note: This API is installed automatically and symlinked globally as mn-api by the MirrorNeuron install.sh script.

pip install mirrorneuron-api

Running the Server

mn-api

This runs the Uvicorn server on port 4001 locally.

Configuration

All overrides use MN_ env vars:

  • MN_ENV=prod requires MN_API_TOKEN.
  • MN_API_HOST, MN_API_PORT control binding; default localhost:4001.
  • MN_CORE_HOST controls the default core gRPC host; default localhost.
  • MN_GRPC_TARGET or MN_CORE_GRPC_TARGET can override the full core gRPC target.
  • MN_GRPC_TIMEOUT_SECONDS controls SDK calls.
  • MN_API_REQUEST_SIZE_LIMIT_BYTES bounds request bodies.
  • MN_API_CORS_ALLOW_ORIGINS is a comma-separated allowlist.

Protected endpoints accept Authorization: Bearer <MN_API_TOKEN>.

Endpoints

Method Route Description
GET /api/v1/health Service health check
GET /api/v1/system/summary Cluster hardware and pool state
GET /api/v1/metrics Runtime metrics summary
POST /api/v1/jobs Submit a new workflow via JSON
GET /api/v1/jobs List recent workflows
GET /api/v1/jobs/{job_id} Fetch workflow status
GET /api/v1/jobs/{job_id}/events Fetch job events
GET /api/v1/jobs/{job_id}/dead-letters Inspect dead-letter events
POST /api/v1/jobs/{job_id}/cancel Cancel a running job

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirrorneuron_api-1.0.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mirrorneuron_api-1.0.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file mirrorneuron_api-1.0.0.tar.gz.

File metadata

  • Download URL: mirrorneuron_api-1.0.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mirrorneuron_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 45e8d96f288a1b97abddb65a81ca00f4711ac5c97a2254165f3470afdbf3b4e0
MD5 749c0d025d7e256cf6a81da83c1e3328
BLAKE2b-256 b479f3b31fbb7895bc6f1eb930f60f595fafcccf879fbd364160b27a371c66d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mirrorneuron_api-1.0.0.tar.gz:

Publisher: release.yml on MirrorNeuronLab/mn-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mirrorneuron_api-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mirrorneuron_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4adeb096efb6e7cd446cbdbccac8c82ce254c843d527cc8d454a6ad17e7b4ac
MD5 c3eb366b3b7d267f5e6872e0310ee200
BLAKE2b-256 5357242d138f2baf5e2ce32ebd789e06db51cbe831149dfc91f072e4e4ca9849

See more details on using hashes here.

Provenance

The following attestation bundles were made for mirrorneuron_api-1.0.0-py3-none-any.whl:

Publisher: release.yml on MirrorNeuronLab/mn-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page