ChainLaunch

API Reference

ChainLaunch provides a comprehensive REST API for programmatic access to all platform features. This reference documents the main API endpoints and their usage.

ChainLaunch provides a comprehensive REST API for programmatic access to all platform features. This reference documents the main API endpoints and their usage.

Base URL

http://localhost:8100/api/v1

Authentication

All API requests must include authentication. Supported methods:

Cookie-based sessions are the primary authentication method. Obtain a session by logging in:

curl -X POST http://localhost:8100/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{"username": "admin", "password": "yourpassword"}'

Then use the cookie in subsequent requests:

curl -b cookies.txt \
  http://localhost:8100/api/v1/nodes

Basic Auth

curl -u username:password \
  http://localhost:8100/api/v1/nodes

API Keys (ChainLaunch Pro)

API keys use Bearer token authentication with the clpro_ prefix:

curl -H "Authorization: Bearer clpro_your_api_key_here" \
  http://localhost:8100/api/v1/nodes

Authentication

Login

POST /auth/login
curl -X POST http://localhost:8100/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{"username": "admin", "password": "yourpassword"}'

Logout

POST /auth/logout

Get Current User

GET /auth/me

Change Password

POST /auth/change-password

Users

List Users

GET /users
curl -u admin:password http://localhost:8100/api/v1/users

Create User

POST /users

Get User

GET /users/{id}

Update User

PUT /users/{id}

Delete User

DELETE /users/{id}

Update User Password

PUT /users/{id}/password

Update User Role

PUT /users/{id}/role

Nodes

Create Node

POST /nodes
curl -X POST http://localhost:8100/api/v1/nodes \
  -u admin:password \
  -H "Content-Type: application/json" \
  -d '{
    "name": "peer-0",
    "platform": "FABRIC",
    "nodeType": "FABRIC_PEER"
  }'

List Nodes

GET /nodes
curl -u admin:password http://localhost:8100/api/v1/nodes

List Nodes by Platform

GET /nodes/platform/{platform}

Filter nodes by platform (FABRIC or BESU):

curl -u admin:password http://localhost:8100/api/v1/nodes/platform/FABRIC

Get Node Defaults

Retrieve default configuration for each node type:

GET /nodes/defaults/fabric-peer
GET /nodes/defaults/fabric-orderer
GET /nodes/defaults/besu-node

Get Node

GET /nodes/{id}

Update Node

PUT /nodes/{id}

Delete Node

DELETE /nodes/{id}

Start Node

POST /nodes/{id}/start
curl -X POST http://localhost:8100/api/v1/nodes/1/start \
  -u admin:password

Stop Node

POST /nodes/{id}/stop

Restart Node

POST /nodes/{id}/restart

Get Node Logs (WebSocket)

GET /nodes/{id}/logs

This endpoint upgrades to a WebSocket connection for real-time log streaming.

Get Node Events

GET /nodes/{id}/events

Renew Node Certificates

POST /nodes/{id}/certificates/renew

Fabric Networks

List Fabric Networks

GET /networks/fabric
curl -u admin:password http://localhost:8100/api/v1/networks/fabric

Create Fabric Network

POST /networks/fabric
curl -X POST http://localhost:8100/api/v1/networks/fabric \
  -u admin:password \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-fabric-network",
    "channelName": "mychannel"
  }'

Get Fabric Network

GET /networks/fabric/{id}

Delete Fabric Network

DELETE /networks/fabric/{id}

Get Fabric Network by Name

GET /networks/fabric/by-name/{name}

Import Fabric Network

POST /networks/fabric/import

List Fabric Network Nodes

GET /networks/fabric/{id}/nodes

Add Node to Fabric Network

POST /networks/fabric/{id}/nodes

Join Peer to Channel

POST /networks/fabric/{id}/peers/{peerId}/join

Join Orderer to Channel

POST /networks/fabric/{id}/orderers/{ordererId}/join

Set Anchor Peers

POST /networks/fabric/{id}/anchor-peers

Get Channel Configuration

GET /networks/fabric/{id}/channel-config

List Blocks

GET /networks/fabric/{id}/blocks

Get Block by Number

GET /networks/fabric/{id}/blocks/{blockNum}

Get Network Info

GET /networks/fabric/{id}/info

Get Transaction

GET /networks/fabric/{id}/transactions/{txId}

Get Network Map

GET /networks/fabric/{id}/map

Besu Networks

List Besu Networks

GET /networks/besu
curl -u admin:password http://localhost:8100/api/v1/networks/besu

Create Besu Network

POST /networks/besu

Get Besu Network

GET /networks/besu/{id}

Delete Besu Network

DELETE /networks/besu/{id}

Import Besu Network

POST /networks/besu/import

List Besu Network Nodes

GET /networks/besu/{id}/nodes

Get Besu Network Map

GET /networks/besu/{id}/map

Organizations

Create Organization

POST /organizations
curl -X POST http://localhost:8100/api/v1/organizations \
  -u admin:password \
  -H "Content-Type: application/json" \
  -d '{
    "name": "org1",
    "mspId": "Org1MSP"
  }'

List Organizations

GET /organizations

Get Organization

GET /organizations/{id}

Update Organization

PUT /organizations/{id}

Delete Organization

DELETE /organizations/{id}

Get Organization by MSP ID

GET /organizations/by-mspid/{mspid}

Create Organization Key

POST /organizations/{id}/keys

List Organization Keys

GET /organizations/{id}/keys

Get Organization CRL

GET /organizations/{id}/crl

Keys

List All Keys

GET /keys/all

Create Key

POST /keys
curl -X POST http://localhost:8100/api/v1/keys \
  -u admin:password \
  -H "Content-Type: application/json" \
  -d '{
    "name": "signing-key",
    "algorithm": "ECDSA",
    "curve": "P-256",
    "keyProviderId": 1
  }'

List Keys

GET /keys

Get Key

GET /keys/{id}

Delete Key

DELETE /keys/{id}

Sign

POST /keys/{keyID}/sign

Sign Data

POST /keys/{keyID}/sign-data

Key Providers

Create Key Provider

POST /key-providers

List Key Providers

GET /key-providers

Get Key Provider

GET /key-providers/{id}

Delete Key Provider

DELETE /key-providers/{id}

Backups

Backup Targets

POST /backups/targets         # Create target
GET /backups/targets          # List targets
GET /backups/targets/{id}     # Get target
PUT /backups/targets/{id}     # Update target
DELETE /backups/targets/{id}  # Delete target

Backup Schedules

POST /backups/schedules                  # Create schedule
GET /backups/schedules                   # List schedules
GET /backups/schedules/{id}              # Get schedule
PUT /backups/schedules/{id}/enable       # Enable schedule
PUT /backups/schedules/{id}/disable      # Disable schedule
DELETE /backups/schedules/{id}           # Delete schedule

Backups

GET /backups          # List backups
POST /backups         # Create backup
GET /backups/{id}     # Get backup
DELETE /backups/{id}  # Delete backup
curl -X POST http://localhost:8100/api/v1/backups \
  -u admin:password \
  -H "Content-Type: application/json" \
  -d '{
    "targetId": 1,
    "nodeId": 1
  }'

Smart Contracts (Fabric)

Deploy Chaincode

POST /sc/fabric/deploy

Install Chaincode on Peer

POST /sc/fabric/peer/{peerId}/chaincode/install

Approve Chaincode

POST /sc/fabric/peer/{peerId}/chaincode/approve

Commit Chaincode

POST /sc/fabric/peer/{peerId}/chaincode/commit

List Chaincodes

GET /sc/fabric/chaincodes

Create Chaincode

POST /sc/fabric/chaincodes

Invoke Chaincode

POST /sc/fabric/chaincodes/{chaincodeId}/invoke

Query Chaincode

POST /sc/fabric/chaincodes/{chaincodeId}/query

Smart Contracts (Besu)

Deploy Smart Contract

POST /sc/besu/deploy

Metrics

Get Metric Defaults

GET /metrics/defaults

Deploy Metrics Stack

POST /metrics/deploy

Undeploy Metrics Stack

POST /metrics/undeploy

Start Metrics

POST /metrics/start

Stop Metrics

POST /metrics/stop

Get Node Metrics

GET /metrics/node/{id}

Get Metrics Status

GET /metrics/status

Plugins

List Plugins

GET /plugins

List Available Plugins

GET /plugins/available

Install Plugin

POST /plugins

Get Plugin

GET /plugins/{name}

Update Plugin

PUT /plugins/{name}

Delete Plugin

DELETE /plugins/{name}

Deploy Plugin

POST /plugins/{name}/deploy

Stop Plugin

POST /plugins/{name}/stop

Resume Plugin

POST /plugins/{name}/resume

Notifications

Create Notification Provider

POST /notifications/providers

List Notification Providers

GET /notifications/providers

Get Notification Provider

GET /notifications/providers/{id}

Update Notification Provider

PUT /notifications/providers/{id}

Delete Notification Provider

DELETE /notifications/providers/{id}

Test Notification Provider

POST /notifications/providers/{id}/test

Audit Logs

List Audit Logs

GET /audit/logs
curl -u admin:password http://localhost:8100/api/v1/audit/logs

Get Audit Log

GET /audit/logs/{id}

Settings

Create Settings

POST /settings

Get Settings

GET /settings

Update Settings

PUT /settings

Error Codes

HTTP Status Description
400 Bad request / validation failed
401 Authentication required or failed
403 Permission denied
404 Resource not found
409 Resource conflict (e.g., duplicate name)
500 Internal server error

Pagination

List endpoints support pagination via query parameters:

  • limit (int) - Items per page
  • offset (int) - Number of items to skip

OpenAPI / Swagger

The complete OpenAPI specification and interactive Swagger UI are available at:

GET http://localhost:8100/api/swagger/doc.json    # Raw OpenAPI spec
GET http://localhost:8100/api/swagger/             # Swagger UI

See Also