Skip to main content

Analytics API

Auto-generated from codebase analysis

This section documents the Analytics API endpoints.

GET Endpoints

GET /hypotheses/{hypothesis_id}

Get hypothesis specification by ID.

Parameters

NameTypeRequiredDescription
hypothesis_idstrYes

Example Request

curl -X GET "https://your-instance.datalinx.ai/api/hypotheses/{hypothesis_id}" \
-H "Authorization: Bearer YOUR_TOKEN"

GET /status/{hypothesis_id}

Get analysis execution status for a hypothesis.

Parameters

NameTypeRequiredDescription
hypothesis_idstrYes

Example Request

curl -X GET "https://your-instance.datalinx.ai/api/status/{hypothesis_id}" \
-H "Authorization: Bearer YOUR_TOKEN"

GET /results/mining/{hypothesis_id}

Get mining results for a hypothesis.

Parameters

NameTypeRequiredDescription
hypothesis_idstrYes

Example Request

curl -X GET "https://your-instance.datalinx.ai/api/results/mining/{hypothesis_id}" \
-H "Authorization: Bearer YOUR_TOKEN"

GET /insights/performance

Get high-performing insights for closed-loop learning.

Parameters

NameTypeRequiredDescription
min_confidencefloatNo

Example Request

curl -X GET "https://your-instance.datalinx.ai/api/insights/performance" \
-H "Authorization: Bearer YOUR_TOKEN"

GET /budget/status

Get current budget status and spending.

Example Request

curl -X GET "https://your-instance.datalinx.ai/api/budget/status" \
-H "Authorization: Bearer YOUR_TOKEN"

POST Endpoints

POST /execute

Execute a SQL query and return results.

Example Request

curl -X POST "https://your-instance.datalinx.ai/api/execute" \
-H "Authorization: Bearer YOUR_TOKEN"

POST /hypotheses

Create a new hypothesis specification.

Example Request

curl -X POST "https://your-instance.datalinx.ai/api/hypotheses" \
-H "Authorization: Bearer YOUR_TOKEN"

POST /insights

Create a business insight from validated analysis results.

Example Request

curl -X POST "https://your-instance.datalinx.ai/api/insights" \
-H "Authorization: Bearer YOUR_TOKEN"

POST /hypotheses/generate

Generate testable hypotheses from business context.

Example Request

curl -X POST "https://your-instance.datalinx.ai/api/hypotheses/generate" \
-H "Authorization: Bearer YOUR_TOKEN"

POST /hypotheses/test

Test a specific hypothesis using the specified algorithm.

Example Request

curl -X POST "https://your-instance.datalinx.ai/api/hypotheses/test" \
-H "Authorization: Bearer YOUR_TOKEN"

PUT Endpoints

PUT /insights/{insight_id}/performance

Update insight performance metrics from audience results.

Parameters

NameTypeRequiredDescription
insight_idstrYes
metricsDict[str, Any]Yes

Example Request

curl -X PUT "https://your-instance.datalinx.ai/api/insights/{insight_id}/performance" \
-H "Authorization: Bearer YOUR_TOKEN"