API Reference

REST API Reference

Complete API documentation for integrating with Nurosentrix programmatically.

Base URL

https://app.nurosentrix.com/api/v1

Authentication

All API requests require authentication using a Bearer token. Include the token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Generate API tokens from Settings → API Keys in the Nurosentrix dashboard.

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer token for authentication
Content-TypeYes (POST/PUT)Must be application/json
X-Request-IDNoOptional request ID for tracing

Response Format

All responses are JSON with this structure:

{
  "success": true,
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}

Error Responses

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request parameters",
    "details": {
      "field": "name",
      "reason": "Name is required"
    }
  }
}

Servers

List Servers

GET /servers

Returns a list of all servers in your account.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, provisioning, offline

Response

{
  "success": true,
  "data": [
    {
      "id": "srv_abc123",
      "name": "web-server-1",
      "ip_address": "192.168.1.100",
      "status": "active",
      "provider": "digitalocean",
      "region": "nyc1",
      "specs": {
        "cpu": 4,
        "memory_gb": 8,
        "disk_gb": 160
      },
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 3
  }
}

Get Server

GET /servers/:id

Create Server

POST /servers

Request Body

{
  "name": "web-server-2",
  "provider": "digitalocean",
  "region": "nyc1",
  "size": "s-4vcpu-8gb",
  "ssh_key_id": "key_xyz789"
}

Delete Server

DELETE /servers/:id

Instances

List Instances

GET /instances

Create Instance

POST /instances

Request Body

{
  "name": "production-crm",
  "server_id": "srv_abc123",
  "odoo_version": "17.0",
  "edition": "community",
  "database_name": "production_crm",
  "admin_email": "admin@example.com",
  "domain": "crm.example.com"
}

Clone Instance

POST /instances/:id/clone

Creates a new instance from a completed backup. If admin_password is omitted, Nurosentrix will generate one and return it in the response.

Request Body

{
  "name": "staging-crm",
  "domain": "staging-crm.example.com",
  "backup_id": "bkp_123",
  "neutralize": true,
  "restore_database": true,
  "restore_filestore": true
}

Instance Actions

POST /instances/:id/actions

Available Actions

ActionDescription
startStart a stopped instance
stopStop a running instance
restartRestart the instance
backupCreate an immediate backup

Backups

List Backups

GET /instances/:id/backups

Create Backup

POST /instances/:id/backups

Restore Backup

POST /backups/:id/restore

Rate Limits

EndpointRate Limit
All endpoints100 requests per minute
Create/Delete operations20 requests per minute

SDKs and Libraries

Official SDKs are coming soon. In the meantime, you can use any HTTP client to interact with the API. Here are examples in popular languages:

cURL

curl -X GET "https://app.nurosentrix.com/api/v1/servers" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Python

import requests

response = requests.get(
    "https://app.nurosentrix.com/api/v1/servers",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json"
    }
)

servers = response.json()["data"]

JavaScript

const response = await fetch(
  "https://app.nurosentrix.com/api/v1/servers",
  {
    headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
    }
  }
);

const { data: servers } = await response.json();