noesis

Noesis Hub API Documentation

This document explains how to use the Fish-based API to communicate with the noe-core repository via .noe files.

Overview

Noesis Hub API provides a simple interface to interact with the noe-core repository. It allows you to:

  1. Check the connection status with noe-core
  2. Process .noe files
  3. Execute commands in the noe-core repository

API Usage

Starting the API Server

./run.fish start_api

Or from the interactive menu, select option 9.

This will start the API server on port 3000 (default).

Stopping the API Server

./run.fish stop_api

Or from the interactive menu, select option 0.

Checking API Status

./run.fish api_status

Or from the interactive menu, select option s.

Processing a .noe File

./run.fish process_noe /path/to/file.noe

Executing a Command in noe-core

./run.fish exec_noe "command to execute"

RESTful API Endpoints

When the API server is running, you can access the following endpoints:

GET /api/noe/status

Check the connection status with noe-core.

Example response:

{
  "status": "connected",
  "path": "/path/to/noe-core"
}

POST /api/noe/process

Process a .noe file.

Example request:

POST /api/noe/process
Content-Type: multipart/form-data

[file content]

Example response:

{
  "message": "File processed successfully",
  "file": "/path/to/uploaded/file.noe"
}

POST /api/noe/command

Execute a command in the noe-core repository.

Example request:

{
  "command": "git status"
}

Example response:

{
  "status": "success",
  "command": "git status",
  "output": "On branch main\nNothing to commit, working tree clean"
}

Configuration

The API configuration is stored in /src/api/config.fish. You can modify this file to change the API port, noe-core path, and other settings.

Troubleshooting