> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取 Enterprise 会话

> 获取特定 Devin 会话的详细信息，包括 分析数据和 pull request（PR）

需要 Enterprise 管理员的个人 API key。

获取你的 Enterprise 中特定 Devin 会话的详细信息，包括完整的会话分析数据、初始用户消息、pull request（PR）信息以及 ACU 使用数据。


## OpenAPI

````yaml zh/v2-openapi.yaml GET /v2/enterprise/sessions/{session_id}
openapi: 3.1.0
info:
  description: 供企业管理员使用的 Devin v2 API（个人 API key）
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/sessions/{session_id}:
    get:
      tags:
        - sessions
      summary: 获取会话详细信息
      description: 根据 ID 获取单个会话的详细信息。
      operationId: get_session_detail_v2_enterprise_sessions__session_id__get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetailResponse'
          description: 成功的响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    SessionDetailResponse:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        created_at:
          format: date-time
          title: Created At
          type: string
        initial_user_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Initial User Message
        org_id:
          title: Org Id
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        session_analysis:
          anyOf:
            - $ref: '#/components/schemas/SessionAnalysisData'
            - type: 'null'
        session_id:
          title: Session Id
          type: string
        status:
          enum:
            - new
            - claimed
            - running
            - exit
            - error
            - suspended
            - resuming
          title: Status
          type: string
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        updated_at:
          format: date-time
          title: Updated At
          type: string
        url:
          title: Url
          type: string
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
      required:
        - session_id
        - url
        - status
        - tags
        - org_id
        - created_at
        - updated_at
        - acus_consumed
        - pull_requests
        - session_analysis
        - initial_user_message
      title: SessionDetailResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SessionPullRequest:
      properties:
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        url:
          title: Url
          type: string
      required:
        - url
      title: SessionPullRequest
      type: object
    SessionAnalysisData:
      properties:
        action_items:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisActionItem'
          title: Action Items
          type: array
        issues:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisIssue'
          title: Issues
          type: array
        suggested_prompt:
          anyOf:
            - $ref: '#/components/schemas/SessionAnalysisSuggestedPrompt'
            - type: 'null'
        timeline:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisTimelineEvent'
          title: Timeline
          type: array
      required:
        - suggested_prompt
      title: SessionAnalysisData
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    SessionAnalysisActionItem:
      properties:
        action_item:
          title: Action Item
          type: string
        issue_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Id
        type:
          title: Type
          type: string
      required:
        - issue_id
        - type
        - action_item
      title: SessionAnalysisActionItem
      type: object
    SessionAnalysisIssue:
      properties:
        impact:
          title: Impact
          type: string
        issue:
          title: Issue
          type: string
        label:
          title: Label
          type: string
      required:
        - issue
        - impact
        - label
      title: SessionAnalysisIssue
      type: object
    SessionAnalysisSuggestedPrompt:
      properties:
        feedback_items:
          items:
            $ref: '#/components/schemas/SessionAnalysisFeedbackItem'
          title: Feedback Items
          type: array
        original_prompt:
          title: Original Prompt
          type: string
        suggested_prompt:
          title: Suggested Prompt
          type: string
      required:
        - original_prompt
        - suggested_prompt
        - feedback_items
      title: SessionAnalysisSuggestedPrompt
      type: object
    SessionAnalysisTimelineEvent:
      properties:
        description:
          title: Description
          type: string
        title:
          title: Title
          type: string
      required:
        - title
        - description
      title: SessionAnalysisTimelineEvent
      type: object
    SessionAnalysisFeedbackItem:
      properties:
        details:
          anyOf:
            - type: string
            - type: 'null'
          title: Details
        excerpt:
          anyOf:
            - type: string
            - type: 'null'
          title: Excerpt
        issue_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Id
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
      required:
        - issue_id
        - summary
        - excerpt
        - details
      title: SessionAnalysisFeedbackItem
      type: object
  securitySchemes:
    bearerAuth:
      description: 仅供 Enterprise 管理员使用的个人 API Key（apk_user_*）
      scheme: bearer
      type: http

````