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

# One subject, in depth

> The per-subject screen: the rolling average and trend of the subject net, the net of
each deneme in the window, all-time completed study minutes on the subject, and the
topic table — success rate and consistency per topic, with the strong and weak
topics already picked out.

The path parameter is the canonical subject key, e.g. `tyt_turkce`, `ayt_matematik`,
`lgs_fen`. Consistency needs three denemeler of topic data and is null until then.



## OpenAPI

````yaml /api-reference/openapi.json get /api/journey/subjects/{subject}
openapi: 3.1.0
info:
  title: Lala Client API
  description: >-
    The HTTP API behind Lala, the AI study companion for Turkish YKS and LGS
    students. This document is generated from the Zod schemas that validate each
    request at runtime. Do not hand-edit openapi.json. Student-visible text is
    Turkish. All identifiers are English.
  version: 1.0.0
servers:
  - url: https://client-api.lala.ist
    description: production
  - url: http://localhost:3000
    description: local dev
security:
  - supabaseJwt: []
tags:
  - name: chat
    description: The chat stream, the message history, and reactions
  - name: media
    description: Upload and read message attachments
  - name: plan
    description: The study planner — blocks of work on a day
  - name: journey
    description: Deneme results, topic performance, study-hours stats, and the streak
  - name: profile
    description: The student profile and onboarding
  - name: devices
    description: Push notification devices
  - name: system
    description: Health check
paths:
  /api/journey/subjects/{subject}:
    get:
      tags:
        - journey
      summary: One subject, in depth
      description: >-
        The per-subject screen: the rolling average and trend of the subject
        net, the net of

        each deneme in the window, all-time completed study minutes on the
        subject, and the

        topic table — success rate and consistency per topic, with the strong
        and weak

        topics already picked out.


        The path parameter is the canonical subject key, e.g. `tyt_turkce`,
        `ayt_matematik`,

        `lgs_fen`. Consistency needs three denemeler of topic data and is null
        until then.
      operationId: getApiJourneySubjectsBySubject
      parameters:
        - in: query
          name: window
          schema:
            default: 10
            type: integer
            minimum: 1
            maximum: 30
          description: How many of the newest denemeler feed the topic aggregates.
        - schema:
            type: string
          in: path
          name: subject
          required: true
      responses:
        '200':
          description: The subject detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectDetail'
        '400':
          description: The input is not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The token is missing, expired, or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubjectDetail:
      type: object
      properties:
        subject:
          type: string
          description: >-
            Canonical subject key — exam-prefixed, e.g. `tyt_matematik`,
            `ayt_tarih1`, `lgs_fen`.
        label:
          type: string
        short:
          type: string
        examType:
          $ref: '#/components/schemas/ExamType'
        count:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Denemeler in the window containing the subject.
        avgNet:
          type: number
        trend:
          $ref: '#/components/schemas/DenemeTrend'
        totalStudyMin:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: All-time completed planner minutes on this subject.
        series:
          type: array
          items:
            $ref: '#/components/schemas/SubjectNetPoint'
          description: Newest first.
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicPerformance'
        strongTopics:
          type: array
          items:
            $ref: '#/components/schemas/TopicPerformance'
        weakTopics:
          type: array
          items:
            $ref: '#/components/schemas/TopicPerformance'
      required:
        - subject
        - label
        - short
        - examType
        - count
        - avgNet
        - trend
        - totalStudyMin
        - series
        - topics
        - strongTopics
        - weakTopics
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        issues:
          description: >-
            Present only on a 400 raised by request validation, capped at 10
            entries. Every other error carries `error` alone.
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
      required:
        - error
      description: Error body. `error` is a short English string.
    ExamType:
      type: string
      enum:
        - TYT
        - AYT
        - LGS
      description: One scored paper. TYT and AYT nets are never summed.
    DenemeTrend:
      type: string
      enum:
        - up
        - down
        - flat
      description: >-
        Direction of the rolling average: the newest window of 3 against the
        same window shifted one deneme back.
    SubjectNetPoint:
      type: object
      properties:
        denemeId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        takenDate:
          type: string
        net:
          type: number
        name:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - denemeId
        - takenDate
        - net
        - name
    TopicPerformance:
      type: object
      properties:
        topic:
          type: string
        total:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Questions seen across the window.
        correct:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        accuracy:
          type: number
          description: doğru / (doğru + yanlış + boş), 0–1.
        consistency:
          anyOf:
            - type: string
              enum:
                - high
                - low
            - type: 'null'
          description: >-
            High when the per-deneme accuracy barely moves. Null under 3
            denemeler of data.
        denemeCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - topic
        - total
        - correct
        - accuracy
        - consistency
        - denemeCount
    ValidationIssue:
      type: object
      properties:
        path:
          type: string
          description: Dotted path to the offending field, empty at the root.
        message:
          type: string
      required:
        - path
        - message
  securitySchemes:
    supabaseJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase access token: `Authorization: Bearer <token>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.