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

# Get Service Logs

> Fetch logs from Cloud Logging for a specific service.
Use `cursor` from response as `since` to poll for new logs.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/deployment/logs
openapi: 3.1.0
info:
  title: Cycls Cloud API
  description: >

    ## Deploy serverless functions in seconds


    Cycls Cloud lets you deploy containerized functions to the cloud with a
    single command.


    ### Authentication


    All endpoints require authentication via:

    - **API Key**: Pass `X-API-Key` header

    - **JWT**: Pass `Authorization: Bearer <token>` header


    ### Quick Start


    ```bash

    curl -X POST https://api.cycls.ai/v1/deploy \
      -H "X-API-Key: your_api_key" \
      -F "function_name=hello" \
      -F "source=@source.tar.gz"
    ```
  contact:
    name: Cycls
    url: https://cycls.com/
  version: 1.0.0
servers: []
security: []
tags:
  - name: Deployments
    description: Deploy, list, and manage your services
  - name: Volumes
    description: Named storage, attached to deployments by mount path
  - name: Logs
    description: Fetch service logs
  - name: Billing
    description: Subscription and usage
paths:
  /v1/deployment/logs:
    post:
      tags:
        - Logs
      summary: Get Service Logs
      description: |-
        Fetch logs from Cloud Logging for a specific service.
        Use `cursor` from response as `since` to poll for new logs.
      operationId: get_deployment_logs_v1_deployment_logs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: Service Unavailable
      security:
        - HTTPBearer: []
        - APIKeyHeader: []
components:
  schemas:
    LogsRequest:
      properties:
        deployment_name:
          type: string
          title: Deployment Name
          description: Service name to fetch logs for
          examples:
            - my-function
        since:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Since
          description: Fetch logs after this timestamp (use cursor from previous response)
        limit:
          type: integer
          maximum: 1000
          minimum: 1
          title: Limit
          description: Maximum number of log entries to return
          default: 100
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: >-
            Cloud Logging filter expression to AND with the base filter (e.g.
            'jsonPayload.level="error"'). Parentheses must be balanced.
      type: object
      required:
        - deployment_name
      title: LogsRequest
    LogsResponse:
      properties:
        logs:
          items:
            $ref: '#/components/schemas/LogEntry'
          type: array
          title: Logs
          description: List of log entries (oldest first)
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: Pass as 'since' to fetch newer logs
      type: object
      required:
        - logs
      title: LogsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LogEntry:
      properties:
        timestamp:
          type: string
          title: Timestamp
          description: ISO 8601 timestamp
          examples:
            - '2024-01-15T10:30:00+00:00'
        severity:
          type: string
          title: Severity
          description: Log level
          examples:
            - DEFAULT
        message:
          type: string
          title: Message
          description: Log message content
          examples:
            - 'INFO: 127.0.0.1 - "GET / HTTP/1.1" 200 OK'
      type: object
      required:
        - timestamp
        - severity
        - message
      title: LogEntry
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````