> ## Documentation Index
> Fetch the complete documentation index at: https://surf-dcinside-api.kr.ask.surf/llms.txt
> Use this file to discover all available pages before exploring further.

# Health

> Service information and last received cycle; separate from alert verification

This endpoint reports service information and the latest cycle recorded by the running process. It currently permits unauthenticated access. A successful response does not prove that the delivered model is loaded, data is durable or alerts are operating.

Surf needs to alert DCinside when no data has arrived for 15 minutes, including when DCinside's sending machine is entirely down. That requires an independent check of arrivals; DCinside polling health is not sufficient.

The alert destination, contacts and operation must be confirmed and tested. The current `status: ok` response is not evidence that the 15-minute watchdog exists. The rehearsal failure drill stops sending for 20 minutes and verifies that the alert reaches the intended recipients.

After a current-process restart, last-cycle fields may return to `null`. Verify restart recovery separately before starting the acceptance run.


## OpenAPI

````yaml openapi.json GET /v1/health
openapi: 3.0.3
info:
  title: DCinside RTB API
  description: >-
    Proposed contract for DCinside's scoring-only dress rehearsal. Real queue
    candidates go to Surf; DCinside logs would-be picks while operators continue
    publishing. The model does not publish during rehearsal. The intended model
    is the delivered Model 0924 with down-vote weight 0; the deployed
    transport-test adapter is not that artifact. Five-minute cycles, inline
    responses, pending re-scoring, payload details and authentication are Surf
    proposals for confirmation. The response deadline is not yet agreed.
    DCinside's draft first-score target is at least 99% within two cycles of
    queue entry, with no separate scoring wait. This specification describes
    target rehearsal behavior, not deployment readiness. See the rehearsal
    documentation for implementation gaps and acceptance criteria.
  version: 1.1.0-draft
servers:
  - url: https://{host}
    description: Issued by Surf together with the API key.
    variables:
      host:
        default: rtb.example.com
        description: >-
          Host name issued by Surf for the environment (rehearsal or
          production). The default is a placeholder.
security:
  - ApiKey: []
tags:
  - name: Scoring
    description: >-
      Proposed cycle scoring and retrieval for rehearsal; cadence, refresh
      policy and deadline need confirmation.
  - name: Images
    description: >-
      Proposed one-time image transfer; layout and scoring readiness behavior
      need confirmation.
  - name: Outcomes
    description: >-
      Not in scope for trial. Reference for later outcomes-endpoint integration.
      Daily operator outcomes may be shared separately by agreement.
  - name: Weights
    description: >-
      Not in scope for trial. Reference for later client-facing
      weight-management integration. Surf configures the initial trial model and
      weights.
  - name: Health
    description: >-
      Service information; not proof of model readiness, durable state or alert
      delivery.
paths:
  /v1/health:
    get:
      tags:
        - Health
      summary: Health
      description: >-
        Current service information and last recorded cycle. Public in the
        current implementation. An ok response does not establish real-model
        readiness, durable delivery or an independent 15-minute no-data alert.
        Verify alert delivery with the rehearsal failure drill.
      operationId: getHealth
      responses:
        '200':
          description: Service state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Health'
              example:
                status: ok
                time: '2026-09-29T02:05:30+09:00'
                api_version: '1'
                model_version: m0924-weight0
                weights_version: w-1
                last_cycle_id: 20260929T0205
                last_cycle_received_at: '2026-09-29T02:05:03+09:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
      security: []
components:
  schemas:
    Health:
      type: object
      properties:
        status:
          type: string
          enum:
            - ok
            - degraded
          example: ok
          description: >-
            Current service status. The existing handler returns ok; this does
            not establish real-model readiness, alert operation or durable
            state.
        time:
          type: string
          format: date-time
          description: Our clock.
          example: '2026-09-29T02:05:30+09:00'
          pattern: >-
            ^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$
        api_version:
          type: string
          example: '1'
          description: API major version.
        model_version:
          type: string
          example: m0924-weight0
          description: >-
            Reported model label. Confirm the loaded artifact separately; the
            current adapter label does not prove Model 0924 is loaded.
        weights_version:
          type: string
          example: w-1
          description: Weights in force.
        last_cycle_id:
          type: string
          nullable: true
          example: 20260929T0205
          description: The last cycle call received, or `null` before the first.
        last_cycle_received_at:
          type: string
          format: date-time
          description: When that call arrived, or `null` before the first.
          example: '2026-09-29T02:05:03+09:00'
          nullable: true
          pattern: >-
            ^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$
      required:
        - status
        - time
        - api_version
        - model_version
        - weights_version
        - last_cycle_id
        - last_cycle_received_at
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
    ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: bad_request
          description: Machine-readable code. See Errors.
        message:
          type: string
          example: 2 fields failed validation
          description: Human-readable summary.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
          description: Every failing field, when the error is about the body.
      required:
        - code
        - message
    ErrorField:
      type: object
      properties:
        path:
          type: string
          example: candidates[0].created_at
          description: Path of the failing field.
        problem:
          type: string
          example: timestamp must include an explicit offset
          description: Description of the validation failure.
      required:
        - path
        - problem
  responses:
    Unauthorized:
      description: The API key is missing or unknown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: API key missing or unknown
    ServerError:
      description: >-
        Server failure. Skip late or unusable scores for the decision cycle,
        preserve unacknowledged data and reconcile delivery. Alert delivery must
        be verified separately.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: server_error
              message: internal error
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        Proposed API key sent as the whole Authorization header value.
        Long-lived credential scope, handoff and rotation need confirmation.
        Per-endpoint scopes are not currently enforced.

````