メインコンテンツへスキップ
GET
/
v3
/
enterprise
/
sessions
/
insights
インサイト付きセッションを一覧表示します。
curl --request GET \
  --url https://api.devin.ai/v3/enterprise/sessions/insights \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.devin.ai/v3/enterprise/sessions/insights"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.devin.ai/v3/enterprise/sessions/insights', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devin.ai/v3/enterprise/sessions/insights",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.devin.ai/v3/enterprise/sessions/insights"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.devin.ai/v3/enterprise/sessions/insights")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v3/enterprise/sessions/insights")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "acus_consumed": 123,
      "created_at": 123,
      "num_devin_messages": 123,
      "num_user_messages": 123,
      "org_id": "<string>",
      "pull_requests": [
        {
          "pr_state": "<string>",
          "pr_url": "<string>"
        }
      ],
      "session_id": "<string>",
      "tags": [
        "<string>"
      ],
      "updated_at": 123,
      "url": "<string>",
      "analysis": {
        "action_items": [],
        "classification": {
          "category": "<string>",
          "confidence": 123,
          "programming_languages": [],
          "tools_and_frameworks": []
        },
        "issues": [],
        "note_usage": {
          "bad_usages": [],
          "good_usages": []
        },
        "suggested_prompt": {
          "original_prompt": "<string>",
          "suggested_prompt": "<string>",
          "feedback_items": []
        },
        "timeline": []
      },
      "child_session_ids": [
        "<string>"
      ],
      "is_archived": false,
      "parent_session_id": "<string>",
      "playbook_id": "<string>",
      "service_user_id": "<string>",
      "structured_output": {},
      "subcategory": "<string>",
      "title": "<string>",
      "user_id": "<string>"
    }
  ],
  "end_cursor": "<string>",
  "has_next_page": false,
  "total": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

権限

Enterprise レベルで ViewAccountSessions 権限が付与されたサービスユーザーが必要です。

承認

Authorization
string
header
必須

サービスユーザーの認証情報(接頭辞: cog_)

クエリパラメータ

after
string | null
first
integer
デフォルト:100
必須範囲: 1 <= x <= 200
session_ids
string[] | null
created_after
integer | null
created_before
integer | null
updated_after
integer | null
updated_before
integer | null
tags
string[] | null
playbook_id
string | null
origins
enum<string>[] | null
利用可能なオプション:
webapp,
slack,
teams,
api,
linear,
jira,
automation,
cli,
desktop,
code_scan,
other
schedule_id
string | null
user_ids
string[] | null
service_user_ids
string[] | null
repo_names
string[] | null

リポジトリ名で絞り込む(例: 'owner/repo')

category
enum<string> | null
利用可能なオプション:
bug_fixing,
ci_cd_and_devops,
code_quality_and_security,
code_review,
code_review_and_analysis,
data_and_automation,
documentation_and_content,
feature_development,
migrations_and_upgrades,
other,
refactoring_and_optimization,
research_and_exploration,
security,
unit_test_generation
is_archived
boolean | null
org_ids
string[] | null
include_deleted_orgs
boolean
デフォルト:false

レスポンス

成功時のレスポンス

items
SessionInsightsResponse · object[]
必須
end_cursor
string | null

次のページを取得するためのカーソル。最終ページの場合は None。

has_next_page
boolean
デフォルト:false

このページの後に、追加で取得可能な項目があるかどうか。

total
integer | null

総件数(パフォーマンス上の理由から省略可能なオプション項目)。