Skip to main content

NEXVECTA Storage API Overview

NEXVECTA Storage provides a comprehensive REST API that allows you to programmatically manage all aspects of your storage environment.

Authentication

All API requests require authentication. NEXVECTA Storage supports two authentication methods:

Token-based Authentication

  1. Generate an API token in the web interface:

    • Navigate to Settings > API Tokens
    • Click Generate Token
    • Set a name and permissions
    • Save the token (it will only be shown once)
  2. Include the token in API requests:

    Authorization: Bearer your_token_here

Basic Authentication

You can also use basic authentication with your NEXVECTA Storage credentials:

Authorization: Basic base64(username:password)

Base URL

The API base URL depends on your NEXVECTA Storage installation:

https://<your-storage-server>/api/v1/

Common Endpoints

System Management

GET /system/status               # Get system status
GET /system/stats # Get system statistics
GET /system/tasks # List running tasks
GET /system/version # Get software version

Storage Pools

GET /pools                       # List all storage pools
POST /pools # Create a new pool
GET /pools/{id} # Get pool details
PUT /pools/{id} # Update pool settings
DELETE /pools/{id} # Delete a pool
GET /pools/{id}/stats # Get pool statistics

File Shares

GET /shares                      # List all shares
POST /shares # Create a new share
GET /shares/{id} # Get share details
PUT /shares/{id} # Update share settings
DELETE /shares/{id} # Delete a share

Object Storage

GET /objectstorage/buckets       # List all buckets
POST /objectstorage/buckets # Create a new bucket
GET /objectstorage/users # List all object storage users
POST /objectstorage/users # Create a new object storage user

Response Format

All API responses are returned in JSON format:

{
"status": "success",
"data": {
// Response data
}
}

For error responses:

{
"status": "error",
"error": {
"code": "error_code",
"message": "Error description"
}
}

Example Request

curl -X GET \
"https://storage.example.com/api/v1/pools" \
-H "Authorization: Bearer your_token_here" \
-H "Content-Type: application/json"

Example response:

{
"status": "success",
"data": {
"pools": [
{
"id": "pool1",
"name": "Main Storage",
"size": 10995116277760,
"available": 9658792968192,
"used": 1336323309568,
"health": "ONLINE",
"protection": "raidz2",
"devices": 8
},
{
"id": "pool2",
"name": "Archive Storage",
"size": 21990232555520,
"available": 20975987523584,
"used": 1014245031936,
"health": "ONLINE",
"protection": "mirror",
"devices": 12
}
]
}
}

Rate Limiting

API requests are subject to rate limiting to prevent abuse. Rate limits vary by endpoint but generally allow:

  • 60 requests per minute for read operations
  • 20 requests per minute for write operations

When you exceed the rate limit, the API will return a 429 Too Many Requests response with a Retry-After header indicating when you can make new requests.

Next Steps

For detailed information about specific endpoints, request parameters, and response formats, please refer to the full API reference.