Hostingsurge Logs API

The Logs API from Hostingsurge — 2 operation(s) for logs.

GitHub OpenAPI

Operations 2

GET /projects/{projectId}/logs/overview What the project's logs keep: plan retention, lines stored today, which logs… #
GET /projects/{projectId}/logs/search Search the project's stored logs: app output (runtime), build logs (build) or… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hostingsurge-com:hostingsurge-com-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hostingsurge-com-logs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hostingsurge Platform Logs API
  version: 1.0.0
  description: 'Deploy and operate projects on Hostingsurge: Git/upload/Docker/WordPress projects, deployments, logs, environment variables, domains and databases. Errors are {"error":{"code","message","details?"}}.'
servers:
- url: /api/v1
  description: Same origin as the dashboard, e.g. https://hostingsurge.com/api/v1
security:
- bearerAuth: []
- sessionCookie: []
tags:
- name: Logs
paths:
  /projects/{projectId}/logs/overview:
    get:
      tags:
      - Logs
      summary: 'What the project''s logs keep: plan retention, lines stored today, which logs…'
      parameters:
      - schema:
          type: string
          maxLength: 64
          format: uuid
        required: true
        name: projectId
        in: path
      responses:
        '200':
          description: Overview
          content:
            application/json:
              schema:
                type: object
                properties:
                  projectId:
                    type: string
                    format: uuid
                  plan:
                    type: string
                  retentionDays:
                    type: integer
                  linesPerDay:
                    type: integer
                  today:
                    type: object
                    properties:
                      kept:
                        type: integer
                      dropped:
                        type: integer
                    required:
                    - kept
                    - dropped
                  runtime:
                    type: object
                    properties:
                      collecting:
                        type: boolean
                        description: the platform reads this project's app logs
                      lastAt:
                        type:
                        - string
                        - 'null'
                        description: ISO-8601 timestamp
                    required:
                    - collecting
                    - lastAt
                  build:
                    type: object
                    properties:
                      lastAt:
                        type:
                        - string
                        - 'null'
                        description: ISO-8601 timestamp
                    required:
                    - lastAt
                  http:
                    type: object
                    properties:
                      collecting:
                        type: boolean
                        description: the request log collector reports
                      errorsLogged:
                        type: boolean
                        description: error answers (4xx/5xx) are in the request log (needed for the error-rate alert)
                      lastAt:
                        type:
                        - string
                        - 'null'
                        description: ISO-8601 timestamp
                    required:
                    - collecting
                    - errorsLogged
                    - lastAt
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        hour:
                          type: string
                          description: ISO-8601 timestamp
                        requests:
                          type: integer
                        errors5xx:
                          type: integer
                        errors4xx:
                          type: integer
                      required:
                      - hour
                      - requests
                      - errors5xx
                      - errors4xx
                    description: the last 24 hours, hourly, oldest first
                required:
                - projectId
                - plan
                - retentionDays
                - linesPerDay
                - today
                - runtime
                - build
                - http
                - requests
        '400':
          description: Invalid request (code invalid_request)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '401':
          description: Missing or invalid session/token (code unauthorized)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '403':
          description: Authenticated but not permitted (code forbidden)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: Not found or not visible to the caller (code not_found)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: Too many requests (code rate_limited); see Retry-After
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '501':
          description: 'Not available on this server yet (code not_configured): migration 190 is not applied'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
      operationId: getProjectsByProjectIdLogsOverview
      x-operation-id-source: derived
  /projects/{projectId}/logs/search:
    get:
      tags:
      - Logs
      summary: 'Search the project''s stored logs: app output (runtime), build logs (build) or…'
      description: Lines are kept as long as the plan says (Free 1 day, Pro 7 days, Business 30 days). One call reads a bounded part of the range; pass nextCursor to go on with older lines. Secret environment values are redacted in app and build lines; request lines hold no client address or query string. Needs logs:read.
      parameters:
      - schema:
          type: string
          maxLength: 64
          format: uuid
        required: true
        name: projectId
        in: path
      - schema:
          type: string
          enum:
          - runtime
          - build
          - http
          default: runtime
          description: 'runtime: the app''s own output; build: build logs of deployments; http: requests the platform proxy served for the project''s hostnames'
        required: false
        description: 'runtime: the app''s own output; build: build logs of deployments; http: requests the platform proxy served for the project''s hostnames'
        name: source
        in: query
      - schema:
          type: string
          format: date-time
          description: 'oldest line to include; default: 24 hours ago, never before the plan keeps lines'
        required: false
        description: 'oldest line to include; default: 24 hours ago, never before the plan keeps lines'
        name: from
        in: query
      - schema:
          type: string
          format: date-time
          description: 'newest line to include; default: now'
        required: false
        description: 'newest line to include; default: now'
        name: to
        in: query
      - schema:
          type: string
          maxLength: 200
          description: text to find (case does not matter); several words must all appear
        required: false
        description: text to find (case does not matter); several words must all appear
        name: q
        in: query
      - schema:
          type: string
          enum:
          - all
          - errors
          default: all
          description: 'errors: error lines only (stderr/error words; 5xx for requests)'
        required: false
        description: 'errors: error lines only (stderr/error words; 5xx for requests)'
        name: level
        in: query
      - schema:
          type: string
          enum:
          - all
          - 2xx
          - 3xx
          - 4xx
          - 5xx
          default: all
          description: 'requests only: the status class'
        required: false
        description: 'requests only: the status class'
        name: status
        in: query
      - schema:
          type: string
          format: uuid
          description: build logs of one deployment
        required: false
        description: build logs of one deployment
        name: deploymentId
        in: query
      - schema:
          type: string
          maxLength: 100
          pattern: ^[0-9a-z.:-]+$
          description: 'nextCursor of the previous page: continue with older lines'
        required: false
        description: 'nextCursor of the previous page: continue with older lines'
        name: cursor
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 500
          default: 200
        required: false
        name: limit
        in: query
      responses:
        '200':
          description: Lines
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        ts:
                          type: string
                          description: ISO-8601 timestamp
                        source:
                          type: string
                          enum:
                          - runtime
                          - build
                          - http
                          description: 'runtime: the app''s own output; build: build logs of deployments; http: requests the platform proxy served for the project''s hostnames'
                        level:
                          type: string
                          enum:
                          - error
                          - warning
                          - info
                        stream:
                          type:
                          - string
                          - 'null'
                          enum:
                          - stdout
                          - stderr
                          - system
                          - null
                        message:
                          type: string
                          description: 'the line (requests: "GET /path 500")'
                        request:
                          type:
                          - object
                          - 'null'
                          properties:
                            method:
                              type: string
                            host:
                              type: string
                            path:
                              type: string
                            status:
                              type: integer
                            durationMs:
                              type:
                              - integer
                              - 'null'
                          required:
                          - method
                          - host
                          - path
                          - status
                          - durationMs
                          description: requests only
                        deploymentId:
                          type:
                          - string
                          - 'null'
                          format: uuid
                          description: build lines only
                      required:
                      - ts
                      - source
                      - level
                      - stream
                      - message
                      - request
                      - deploymentId
                    description: newest first
                  nextCursor:
                    type:
                    - string
                    - 'null'
                    description: pass as cursor for older lines; null when the whole range was searched
                  from:
                    type: string
                    description: ISO-8601 timestamp
                  to:
                    type: string
                    description: ISO-8601 timestamp
                  retentionDays:
                    type: integer
                    description: how long the project's plan keeps lines
                  scannedLines:
                    type: integer
                  complete:
                    type: boolean
                    description: 'false: the search stopped early (page full or time budget); nextCursor continues it'
                required:
                - items
                - nextCursor
                - from
                - to
                - retentionDays
                - scannedLines
                - complete
        '400':
          description: Invalid request (code invalid_request)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '401':
          description: Missing or invalid session/token (code unauthorized)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '403':
          description: Authenticated but not permitted (code forbidden)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: Not found or not visible to the caller (code not_found)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: Too many requests (code rate_limited); see Retry-After
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
        '501':
          description: 'Not available on this server yet (code not_configured): migration 190 is not applied'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - unauthorized
                        - forbidden
                        - not_found
                        - invalid_request
                        - conflict
                        - limit_reached
                        - rate_limited
                        - provider_unavailable
                        - not_configured
                        - internal
                        - ip_not_allowed
                        - upgrade_required
                        - view_only
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: {}
                    required:
                    - code
                    - message
                required:
                - error
      operationId: getProjectsByProjectIdLogsSearch
      x-operation-id-source: derived
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API or MCP key created in the dashboard (Account → API & MCP keys). Keys carry scopes and project grants.
    sessionCookie:
      type: apiKey
      in: cookie
      name: __Host-hs_session
      description: Dashboard session (same origin only; changes require a matching Origin header)