Skip to content

Yapay Zeka Verimlilik Analizleri

Üretkenlik verileriniz üzerinde yapay zeka destekli analizler çalıştırın. İçgörü motoru, eğilimleri tespit etmek, anormallikleri işaretlemek, optimizasyon önermek ve ilerlemeyi tahmin etmek için zincirleriniz ve zincirleriniz genelinde bit tamamlama modellerini analiz eder.

Uç noktalar

MethodPathDescriptionAuthRate Limit
POST/ai/productivity-insights/analyzeRun an analysisJWT + Entitlement20/min
GET/ai/productivity-insightsList past insightsJWT + Entitlement60/min

POST /ai/productivity-insights/analyze

Tanım

Bir tarih aralığındaki üretkenlik kalıpları üzerinde yapay zeka analizi yapın.

Kimlik Doğrulama: JWT Taşıyıcı jetonu + aktif AI yetkisi gereklidir. Hız sınırı: 20/dak

Rica etmek

  • Başlıklar: Authorization: Bearer <token>, Content-Type: application/json
Talep Gövdesi
FieldTypeRequiredDescription
scopestringYesAnalysis scope: account, chainy, or chain
scopeIdstringNoTarget ID when scope is chainy or chain
insightTypestringYesOne of: trend, anomaly, optimization, forecast
fromstringNoStart date
tostringNoEnd date
Analiz Türleri
TypeWhat It Does
trendSplits the date range in half, compares average daily completions, and determines if you are improving, declining, or stable
anomalyDetects days with unusually high activity or unexpected gaps
optimizationGenerates actionable suggestions based on streak patterns, chain count, and daily pace
forecastProjects completion counts for the next 7 and 30 days based on your current pace

Cevap

Yanıt Örneği (Trend)
json
{
  "data": {
    "id": "cm5insight01",
    "scope": "account",
    "scopeId": null,
    "insightType": "trend",
    "content": {
      "direction": "improving",
      "avgDailyCompletions": 3.2,
      "firstHalfAvg": 2.1,
      "secondHalfAvg": 4.3,
      "activeChains": 4,
      "totalCompletions": 96
    },
    "runId": null,
    "createdAt": "2026-03-17T14:00:00.000Z"
  }
}
Yanıt Örneği (Anormallik)
json
{
  "data": {
    "id": "cm5insight02",
    "scope": "account",
    "scopeId": null,
    "insightType": "anomaly",
    "content": {
      "avgDailyCompletions": 3.2,
      "anomalyCount": 3,
      "anomalies": [
        { "date": "2026-03-01", "count": 12, "type": "spike" },
        { "date": "2026-03-05", "count": 0, "type": "gap" },
        { "date": "2026-03-10", "count": 11, "type": "spike" }
      ]
    },
    "runId": null,
    "createdAt": "2026-03-17T14:00:00.000Z"
  }
}
Yanıt Örneği (Optimizasyon)
json
{
  "data": {
    "id": "cm5insight03",
    "scope": "chainy",
    "scopeId": "cm5abc123",
    "insightType": "optimization",
    "content": {
      "currentAvgStreak": 2.5,
      "activeChains": 7,
      "suggestions": [
        "Focus on building consistent streaks before adding new chains.",
        "Consider consolidating chains -- too many parallel goals can reduce focus."
      ]
    },
    "runId": null,
    "createdAt": "2026-03-17T14:00:00.000Z"
  }
}
Yanıt Örneği (Tahmin)
json
{
  "data": {
    "id": "cm5insight04",
    "scope": "account",
    "scopeId": null,
    "insightType": "forecast",
    "content": {
      "projectedCompletions7d": 22,
      "projectedCompletions30d": 96,
      "currentPace": 3.2,
      "requiredPaceForTarget": null
    },
    "runId": null,
    "createdAt": "2026-03-17T14:00:00.000Z"
  }
}
Yanıt Alanları
FieldTypeDescription
idstringInsight UUID
scopestringAnalysis scope (account, chainy, chain)
scopeIdstring | nullTarget ID
insightTypestringThe insight type
contentobjectAnalysis results
runIdstring | nullAssociated AI run ID
createdAtstringISO 8601 timestamp

Kod Örnekleri

bash
curl -X POST https://api.chainabit.com/api/v1/ai/productivity-insights/analyze \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "account",
    "insightType": "trend",
    "from": "2026-02-15T00:00:00.000Z",
    "to": "2026-03-17T00:00:00.000Z"
  }'
javascript
const res = await fetch(`${BASE_URL}/ai/productivity-insights/analyze`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    scope: "account",
    insightType: "trend",
    from: "2026-02-15T00:00:00.000Z",
    to: "2026-03-17T00:00:00.000Z",
  }),
});
const { data } = await res.json();
python
import requests

res = requests.post(
    f"{BASE_URL}/ai/productivity-insights/analyze",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "scope": "account",
        "insightType": "trend",
        "from": "2026-02-15T00:00:00.000Z",
        "to": "2026-03-17T00:00:00.000Z",
    },
)
data = res.json()["data"]

GET /ai/productivity-insights

Tanım

Geçmiş üretkenlik öngörülerinizi en yenisi ilk sıraya göre sıralanarak listeleyin. En fazla 20 sonuç döndürür.

Kimlik Doğrulama: JWT Taşıyıcı jetonu + aktif AI yetkisi gereklidir. Hız sınırı: 60/dak

Rica etmek

  • Başlıklar: Authorization: Bearer <token>

Cevap

Yanıt Örneği
json
{
  "data": [
    {
      "id": "cm5insight01",
      "scope": "account",
      "scopeId": null,
      "insightType": "trend",
      "content": {
        "direction": "improving",
        "avgDailyCompletions": 3.2,
        "firstHalfAvg": 2.1,
        "secondHalfAvg": 4.3,
        "activeChains": 4,
        "totalCompletions": 96
      },
      "runId": null,
      "createdAt": "2026-03-17T14:00:00.000Z"
    },
    {
      "id": "cm5insight02",
      "scope": "chainy",
      "scopeId": "cm5abc123",
      "insightType": "optimization",
      "content": {
        "currentAvgStreak": 2.5,
        "activeChains": 7,
        "suggestions": [
          "Focus on building consistent streaks before adding new chains."
        ]
      },
      "runId": null,
      "createdAt": "2026-03-16T10:00:00.000Z"
    }
  ]
}

Kod Örnekleri

bash
curl https://api.chainabit.com/api/v1/ai/productivity-insights \
  -H "Authorization: Bearer $TOKEN"
javascript
const res = await fetch(`${BASE_URL}/ai/productivity-insights`, {
  headers: { Authorization: `Bearer ${TOKEN}` },
});
const { data } = await res.json();
python
import requests

res = requests.get(
    f"{BASE_URL}/ai/productivity-insights",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()["data"]

Built with purpose.