Mycelial API
Workflow Specification
POST
/api/pipe
Creates a pipe config
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
name type data type description None required object/payload (JSON) N/A
Payloads
Mycelite Source
{
"configs": [
{
"workspace_id": 1, // this field is currently optional and will default to 1, but may be required in the future.
"pipe": [
{
"name": "sqlite_physical_replication_source",
"label": "sqlite_physical_replication_source node",
"client": "{daemon name}",
"type": "sqlite_physical_replication",
"display_name": "[display name]",
"journal_path": "[path and filename of source journal]"
},
{
"name": "mycelial_server_destination",
"label": "mycelial_server node",
"type": "mycelial_server",
"display_name": "Mycelial Server",
"endpoint": "http://{host or ip}:7777/ingestion",
"token": "[security token]",
"topic": "[unique topic id]"
}
]
}
]
}
Mycelite Destination
{
"configs": [
{
"workspace_id": 1, // this field is currently optional and will default to 1, but may be required in the future.
"pipe": [
{
"name": "mycelial_server_source",
"label": "mycelial_server node",
"type": "mycelial_server",
"display_name": "Mycelial Server",
"endpoint": "http://[host or ip]:7777/ingestion",
"token": "token",
"topic": "[topic id]"
},
{
"name": "sqlite_physical_replication_destination",
"label": "sqlite_physical_replication_destination node",
"client": "dev",
"type": "sqlite_physical_replication",
"display_name": "[display name]",
"journal_path": "[path and filename of destination journal]",
"database_path": "[path and filename of destination database]"
}
]
}
]
}
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
Example cURL
curl -X POST 'http://[control plane]:7777/api/pipe' -H 'Authorization: Basic [(base 64 token):]' --data @post.json'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
PUT
/api/pipe/[id]
Updates a pipe config
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
name type data type description None required object/payload (JSON) N/A
Payloads
Mycelite Source
{
"configs": [
{
"workspace_id": 1, // this field is currently optional and will default to 1 if not provided, but may be required in the future.
"pipe": [
{
"name": "sqlite_physical_replication_source",
"label": "sqlite_physical_replication_source node",
"client": "[daemon name]",
"type": "sqlite_physical_replication",
"display_name": "[display name]",
"journal_path": "[path and filename of source journal]"
},
{
"name": "mycelial_server_destination",
"label": "mycelial_server node",
"type": "mycelial_server",
"display_name": "Mycelial Server",
"endpoint": "http://[host or ip]:7777/ingestion",
"token": "[security token]",
"topic": "[unique topic id]"
}
]
}
]
}
Mycelite Destination
{
"configs": [
{
"workspace_id": 1, // this field is currently optional and will default to 1 if not provided, but may be required in the future.
"pipe": [
{
"name": "mycelial_server_source",
"label": "mycelial_server node",
"type": "mycelial_server",
"display_name": "Mycelial Server",
"endpoint": "http://[host or ip]:7777/ingestion",
"token": "token",
"topic": "[topic id]"
},
{
"name": "sqlite_physical_replication_destination",
"label": "sqlite_physical_replication_destination node",
"client": "dev",
"type": "sqlite_physical_replication",
"display_name": "[display name]",
"journal_path": "[path and filename of destination journal]",
"database_path": "[path and filename of destination database]"
}
]
}
]
}
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
Example cURL
curl -X POST 'http://[control plane]:7777/api/pipe/1' -H 'Authorization: Basic [(base 64 token):]' --data @post.json'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
DELETE
/api/pipe/[id]
Delete a config
Parameters
None
Responses
http code content-type response 200
text/plain;charset=UTF-8
Example cURL
curl 'http://[control plane]:7777/api/pipe/[id]' -X 'DELETE' -H 'Authorization: Basic [(base 64 token):]' \
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
GET
/api/pipe/[id]
fetch a single workflow specification by id
Parameters
None
Responses
http code content-type response 200
application/json
active configurations
Example cURL
curl 'http://[control plane]:7777/api/pipe/[id]' -H 'Authorization: Basic [(base 64 token):]'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
GET
/api/pipe
fetch all active workflow specifications
Parameters
None
Responses
http code content-type response 200
application/json
active configurations
Example cURL
curl 'http://[control plane]:7777/api/pipe' -H 'Authorization: Basic [(base 64 token):]'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
Daemons
GET
/api/clients
List of registered daemons
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
None
Responses
http code content-type response 200
application/json
JSON
Response Example
{
"clients": [
{
"id": "dev_daemon",
"display_name": "Daemon 1",
"sources": [
{
"type": "sqlite_physical_replication",
"display_name": "Mycelite SRC",
"journal_path": "/Users/knowthen/junk/source.db-mycelial"
}
],
"destinations": [
{
"type": "sqlite_physical_replication",
"display_name": "Mycelite DEST",
"journal_path": "/Users/knowthen/junk/dest/destination.db-mycelial",
"database_path": "/Users/knowthen/junk/dest/destination.db"
},
]
},
{
"id": "ui",
"display_name": "UI",
"sources": [],
"destinations": []
}
]
}
Example cURL
curl 'http://[control plane]:7777/api/clients' -H 'Authorization: Basic [(base 64 token):]'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
Workspaces
GET
/api/workspaces
Fetches all workspaces (not hydrated with pipe configs)
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
None
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
[
{
"id": 1,
"created_at": "2023-10-30T19:46:53.429132Z",
"pipe_configs": [],
"name": "Default"
}
]
Example cURL
curl 'http://[control plane]:7777/api/workspaces' -H 'Authorization: Basic [(base 64 token):]'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
GET
/api/workspaces/[id]
Fetches a single workspace by id that is hydrated with pipe configs
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
None
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
{
"id": 1,
"created_at": "2023-10-30T19:55:13.646818Z",
"pipe_configs": [
{
"id": 18,
"pipe": [
{
"client": "dev",
"display_name": "Excel Source",
"journal_path": "/tmp/test.xlsx",
"label": "excel_connector_source node",
"name": "excel_connector_source",
"path": "/tmp/test.xlsx",
"sheets": "Sheet1",
"type": "excel_connector"
},
{
"client": "dev",
"display_name": "Hello World Dest",
"label": "hello_world_destination node",
"name": "hello_world_destination",
"type": "hello_world"
}
],
"workspace_id": 1
}
],
"name": "Default"
}
Example cURL
curl 'http://[control plane]:7777/api/workspaces/1' -H 'Authorization: Basic [(base 64 token):]'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
POST
/api/workspaces
Creates a workspace
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
name type data type description None required object/payload (JSON) N/A
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
Example cURL
curl -X POST 'http://[control plane]:7777/api/workspaces/1' -H 'Authorization: Basic [(base 64 token):]' --data-raw $'{"name":"new"}'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
{"id":1,"created_at":"1970-01-01T00:00:00Z","pipe_configs":[],"name":"new"}
PUT
/api/workspaces/[id]
Update a workspace
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
name type data type description None required object/payload (JSON) N/A
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
Example cURL
curl -X PUT 'http://[control plane]:7777/api/workspaces/1' -H 'Authorization: Basic [(base 64 token):]' --data-raw $'{"name":"rename"}'
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64
{"id":1,"created_at":"1970-01-01T00:00:00Z","pipe_configs":[],"name":"rename"}
DELETE
/api/workspaces/[id]
Delete a workspace
Headers
name type data type description Authorization required string Base64 encoded token
Parameters
None
Responses
http code content-type response 200
application/json
Configuration created successfully
400
text/plain;charset=UTF-8
Example cURL
curl -X DELETE 'http://[control plane]:7777/api/workspaces/1' -H 'Authorization: Basic [(base 64 token):]''
NOTE: to generate a base64 encoded token (ie (base 64 token) above), use the following command:
echo -n 'token' | base64