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

# Get function build logs



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/logs.yaml get /api/logs/functions/build-logs
openapi: 3.0.3
info:
  title: Insforge Logs API
  version: 1.0.0
servers: []
security: []
paths:
  /api/logs/functions/build-logs:
    get:
      tags:
        - Admin
      summary: Get function build logs
      parameters:
        - name: deployment_id
          in: query
          schema:
            type: string
          description: Defaults to the latest deployment when omitted
      responses:
        '200':
          description: Build logs for the deployment
          content:
            application/json:
              schema:
                type: object
                required:
                  - deploymentId
                  - status
                  - logs
                  - createdAt
                properties:
                  deploymentId:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - success
                      - failed
                  logs:
                    type: array
                    items:
                      type: object
                      required:
                        - level
                        - message
                      properties:
                        level:
                          type: string
                        message:
                          type: string
                  createdAt:
                    type: string
                    format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Deno Deploy is not configured, or no deployment was found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: LOG_NOT_FOUND
                message: >-
                  Build logs not available. Deno Deploy may not be configured or
                  no deployments found.
                statusCode: 404
      security:
        - bearerAuth: []
        - apiKey: []
components:
  responses:
    Unauthorized:
      description: Missing or invalid admin credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: AUTH_INVALID_CREDENTIALS
            message: Unauthorized
            statusCode: 401
    Forbidden:
      description: Authenticated, but the token is not a project_admin
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: AUTH_UNAUTHORIZED
            message: Admin access required
            statusCode: 403
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          description: Human-readable error message
        statusCode:
          type: integer
          description: HTTP status code
        nextActions:
          type: string
          description: Suggested action to resolve the error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````