This document explains how to use the Fish-based API to communicate with the noe-core repository via .noe files.
Noesis Hub API provides a simple interface to interact with the noe-core repository. It allows you to:
./run.fish start_api
Or from the interactive menu, select option 9.
This will start the API server on port 3000 (default).
./run.fish stop_api
Or from the interactive menu, select option 0.
./run.fish api_status
Or from the interactive menu, select option s.
./run.fish process_noe /path/to/file.noe
./run.fish exec_noe "command to execute"
When the API server is running, you can access the following endpoints:
Check the connection status with noe-core.
Example response:
{
"status": "connected",
"path": "/path/to/noe-core"
}
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"
}
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"
}
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.
brew install socat)