API Reference

Fluxjiva API Overview

Fluxjiva provides a comprehensive REST API that allows you to programmatically interact with our platform. This reference documents all available endpoints, request parameters, and response formats.

Authentication

All API requests require authentication using an API key. To obtain an API key:

  1. Log in to your Fluxjiva account
  2. Navigate to Settings > API Keys
  3. Click "Generate New API Key"
  4. Name your key and set permissions
  5. Copy and securely store your API key

Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Base URL

All API endpoints are relative to the following base URL:

https://api.fluxjiva.com/v1

Projects API

List Projects

GET /projects

Returns a list of all projects accessible to the authenticated user.

Query Parameters:

  • limit (optional): Maximum number of projects to return (default: 20, max: 100)
  • offset (optional): Number of projects to skip (default: 0)
  • sort (optional): Sort field (created_at, name, updated_at)
  • order (optional): Sort order (asc, desc)

Response:

{
  "data": [
    {
      "id": "proj_123456",
      "name": "Sales Analysis",
      "description": "Analysis of Q2 sales data",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-20T14:45:00Z"
    },
    ...
  ],
  "meta": {
    "total": 45,
    "limit": 20,
    "offset": 0
  }
}

Create Project

POST /projects

Creates a new project.

Request Body:

{
  "name": "Marketing Campaign Analysis",
  "description": "Analysis of Q1 marketing campaigns",
  "industry": "retail"
}

Response:

{
  "data": {
    "id": "proj_789012",
    "name": "Marketing Campaign Analysis",
    "description": "Analysis of Q1 marketing campaigns",
    "industry": "retail",
    "created_at": "2025-02-01T09:15:00Z",
    "updated_at": "2025-02-01T09:15:00Z"
  }
}

Get Project

GET /projects/:projectId

Returns details for a specific project.

Path Parameters:

  • projectId: ID of the project to retrieve

Response:

{
  "data": {
    "id": "proj_789012",
    "name": "Marketing Campaign Analysis",
    "description": "Analysis of Q1 marketing campaigns",
    "industry": "retail",
    "created_at": "2025-02-01T09:15:00Z",
    "updated_at": "2025-02-01T09:15:00Z",
    "data_sources": [
      {
        "id": "ds_123456",
        "name": "Campaign Data",
        "type": "csv",
        "created_at": "2025-02-01T10:30:00Z"
      }
    ],
    "analyses": [
      {
        "id": "an_123456",
        "name": "ROI Analysis",
        "status": "completed",
        "created_at": "2025-02-02T14:20:00Z"
      }
    ]
  }
}

Data Sources API

List Data Sources

GET /projects/:projectId/data-sources

Returns a list of all data sources for a specific project.

Path Parameters:

  • projectId: ID of the project

Response:

{
  "data": [
    {
      "id": "ds_123456",
      "name": "Campaign Data",
      "type": "csv",
      "rows": 15000,
      "columns": 25,
      "created_at": "2025-02-01T10:30:00Z",
      "updated_at": "2025-02-01T10:30:00Z"
    },
    ...
  ]
}

Rate Limits

API requests are subject to rate limiting to ensure fair usage:

  • Standard plan: 60 requests per minute
  • Professional plan: 300 requests per minute
  • Enterprise plan: Custom limits based on contract

Rate limit information is included in the response headers:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1612345678

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

  • 200 OK: Request succeeded
  • 201 Created: Resource created successfully
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Authentication failed
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Error responses include a JSON body with details:

{
  "error": {
    "code": "invalid_parameter",
    "message": "The parameter 'limit' must be a number between 1 and 100",
    "details": {
      "parameter": "limit",
      "value": "200",
      "constraint": "1-100"
    }
  }
}

SDKs and Client Libraries

We provide official client libraries for several programming languages:

These libraries handle authentication, serialization, and error handling for you.