Skip to content

Views

Specialized visualizations for analyzing chain behavior over time, plus a gamified puzzle view for chainies.

Behavioral Views

Endpoints

MethodPathDescriptionAuthRate Limit
GET/chains/:chainId/views/snakeSnake visualizationJWT30/min
GET/chains/:chainId/views/voxelVoxel grid viewJWT30/min
GET/chains/:chainId/views/concurrencyConcurrency timelineJWT30/min

Snake View

Renamed: this view was previously called Sneak. Old links and saved preferences that still send the sneak value continue to work — it maps to snake.

Request

  • Path params: chainId
  • Query params:
ParameterTypeDescription
fromstringStart date (ISO 8601)
tostringEnd date (ISO 8601)
bucketstringBucket size for voxel view: day, week, month

Response

json
{
  "data": {
    "segments": [
      { "date": "2026-03-01", "value": 1, "streak": true },
      { "date": "2026-03-02", "value": 0, "streak": false },
      { "date": "2026-03-03", "value": 1, "streak": true }
    ],
    "totalCompleted": 12,
    "totalDays": 17
  }
}

Code Examples

Replace $CHAIN_ID below with the id of the chain you want to inspect — from Create Chain or List Chains.

bash
curl "https://api.chainabit.com/api/v1/chains/$CHAIN_ID/views/snake?from=2026-03-01&to=2026-03-17" \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const CHAIN_ID = process.env.CHAIN_ID; // from a create-chain or list-chains response

const response = await fetch(
  `${BASE_URL}/chains/${CHAIN_ID}/views/snake?from=2026-03-01&to=2026-03-17`,
  { headers: { Authorization: `Bearer ${TOKEN}` } }
);
const { data } = await response.json();
python
import requests, os

chain_id = os.environ["CHAIN_ID"]  # from a create-chain or list-chains response

response = requests.get(
    f"{os.environ['BASE_URL']}/chains/{chain_id}/views/snake",
    params={"from": "2026-03-01", "to": "2026-03-17"},
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

Voxel Grid View

Request

  • Path params: chainId
  • Query params:
ParameterTypeDescription
fromstringStart date (ISO 8601)
tostringEnd date (ISO 8601)
bucketstringBucket size for voxel view: day, week, month

Response

json
{
  "data": {
    "buckets": [
      { "period": "2026-W01", "completions": 5, "total": 7, "intensity": 0.71 },
      { "period": "2026-W02", "completions": 7, "total": 7, "intensity": 1.0 }
    ]
  }
}

Code Examples

bash
curl "https://api.chainabit.com/api/v1/chains/$CHAIN_ID/views/voxel?from=2026-01-01&to=2026-03-17&bucket=week" \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const CHAIN_ID = process.env.CHAIN_ID; // from a create-chain or list-chains response

const response = await fetch(
  `${BASE_URL}/chains/${CHAIN_ID}/views/voxel?from=2026-01-01&to=2026-03-17&bucket=week`,
  { headers: { Authorization: `Bearer ${TOKEN}` } }
);
const { data } = await response.json();
python
import requests, os

chain_id = os.environ["CHAIN_ID"]  # from a create-chain or list-chains response

response = requests.get(
    f"{os.environ['BASE_URL']}/chains/{chain_id}/views/voxel",
    params={"from": "2026-01-01", "to": "2026-03-17", "bucket": "week"},
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

Concurrency Timeline

Request

  • Path params: chainId
  • Query params:
ParameterTypeDescription
fromstringStart date (ISO 8601)
tostringEnd date (ISO 8601)
bucketstringBucket size for voxel view: day, week, month

Response

json
{
  "data": {
    "timeline": [
      {
        "date": "2026-03-17",
        "events": [
          { "bitId": "cm5bit001", "completedAt": "2026-03-17T09:00:00.000Z" },
          { "bitId": "cm5bit002", "completedAt": "2026-03-17T14:30:00.000Z" }
        ]
      }
    ]
  }
}

Code Examples

bash
curl "https://api.chainabit.com/api/v1/chains/$CHAIN_ID/views/concurrency?from=2026-03-01&to=2026-03-17" \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const CHAIN_ID = process.env.CHAIN_ID; // from a create-chain or list-chains response

const response = await fetch(
  `${BASE_URL}/chains/${CHAIN_ID}/views/concurrency?from=2026-03-01&to=2026-03-17`,
  { headers: { Authorization: `Bearer ${TOKEN}` } }
);
const { data } = await response.json();
python
import requests, os

chain_id = os.environ["CHAIN_ID"]  # from a create-chain or list-chains response

response = requests.get(
    f"{os.environ['BASE_URL']}/chains/{chain_id}/views/concurrency",
    params={"from": "2026-03-01", "to": "2026-03-17"},
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

Puzzle View

A gamified puzzle visualization for chainies that shows progress as pieces coming together.

Endpoints

MethodPathDescriptionAuthRate Limit
GET/chainies/:chainyId/views/puzzleGet puzzle viewJWT30/min
GET/chainies/:chainyId/views/puzzle/configGet puzzle configurationJWT30/min
PUT/chainies/:chainyId/views/puzzle/configUpdate puzzle configurationJWT30/min

Get Puzzle View

Request

  • Path params: chainyId

Response

json
{
  "data": {
    "chainyId": "cm5abc123",
    "totalPieces": 20,
    "completedPieces": 14,
    "completionPercentage": 0.70,
    "pieces": [
      { "id": "piece-1", "chainId": "cm5chain01", "completed": true },
      { "id": "piece-2", "chainId": "cm5chain02", "completed": false }
    ]
  }
}

Code Examples

Replace $CHAINY_ID below with the id of the chainy you want to inspect — from Create Chainy or List Chainies.

bash
curl "https://api.chainabit.com/api/v1/chainies/$CHAINY_ID/views/puzzle?from=2026-03-01&to=2026-03-17" \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const CHAINY_ID = process.env.CHAINY_ID; // from a create-chainy or list-chainies response

const response = await fetch(
  `${BASE_URL}/chainies/${CHAINY_ID}/views/puzzle?from=2026-03-01&to=2026-03-17`,
  { headers: { Authorization: `Bearer ${TOKEN}` } }
);
const { data } = await response.json();
python
import requests, os

chainy_id = os.environ["CHAINY_ID"]  # from a create-chainy or list-chainies response

response = requests.get(
    f"{os.environ['BASE_URL']}/chainies/{chainy_id}/views/puzzle",
    params={"from": "2026-03-01", "to": "2026-03-17"},
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

Update Puzzle Config

Request

  • Path params: chainyId
  • Body: gridSize, theme, showLabels — see example below.

Response

json
{
  "data": {
    "chainyId": "cm5abc123",
    "gridSize": 5,
    "theme": "space",
    "showLabels": true,
    "updatedAt": "2026-03-17T12:00:00.000Z"
  }
}

Code Examples

bash
curl -X PUT https://api.chainabit.com/api/v1/chainies/$CHAINY_ID/views/puzzle/config \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "gridSize": 5,
    "theme": "space",
    "showLabels": true
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const CHAINY_ID = process.env.CHAINY_ID; // from a create-chainy or list-chainies response

const response = await fetch(`${BASE_URL}/chainies/${CHAINY_ID}/views/puzzle/config`, {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ gridSize: 5, theme: "space", showLabels: true }),
});
const { data } = await response.json();
python
import requests, os

chainy_id = os.environ["CHAINY_ID"]  # from a create-chainy or list-chainies response

response = requests.put(
    f"{os.environ['BASE_URL']}/chainies/{chainy_id}/views/puzzle/config",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={"gridSize": 5, "theme": "space", "showLabels": True},
)
data = response.json()["data"]

Built with purpose.