Layero Analysis API

The analysis API from Layero — 4 operation(s) for analysis.

GitHub OpenAPI

Operations 4

GET /build-presets Get Build Presets #
POST /projects/{project_id}/analysis Request Analysis #
GET /analysis-requests/{request_id} Get Analysis Request #
GET /snapshots/{snapshot_id}/index Get Snapshot Index #

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/layero-ru:layero-ru-analysis-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

layero-ru-analysis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layero Analysis API
  version: 0.1.0
tags:
- name: Analysis
paths:
  /build-presets:
    get:
      tags:
      - Analysis
      summary: Get Build Presets
      description: 'Каталог пресетов сборки целиком — один ответ на весь мастер.


        Живёт здесь, а не под `/projects`, по двум причинам: ответ не про

        конкретный проект (он один на всю платформу и меняется только вместе со

        спекой детекта), и путь `/projects/build-presets` конфликтовал бы с

        `/projects/{project_id}` — совпало бы то, что первым объявлено.


        Ответ статичен в пределах версии спеки: `spec_version` в теле, чтобы панель

        могла кешировать и понимать, когда каталог протух.'
      operationId: get_build_presets_build_presets_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildPresetCatalogOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/analysis:
    post:
      tags:
      - Analysis
      summary: Request Analysis
      description: 'Попросить индекс для ветки. Идемпотентно.


        Уже посчитанный индекс не пересчитывается: идентичность снимка контентная,

        а строка `analysis_requests` — про работу. Повторное открытие мастера не

        занимает слот флота.'
      operationId: request_analysis_projects__project_id__analysis_post
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalysisRequestIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisState'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /analysis-requests/{request_id}:
    get:
      tags:
      - Analysis
      summary: Get Analysis Request
      operationId: get_analysis_request_analysis_requests__request_id__get
      parameters:
      - name: request_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Request Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisState'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /snapshots/{snapshot_id}/index:
    get:
      tags:
      - Analysis
      summary: Get Snapshot Index
      description: 'Индекс снимка целиком: дерево, манифесты, план.


        Ключ кеша у панели — `["snapshot", id]`, и он ИММУТАБЕЛЕН: снимок

        описывает состояние кода, протухать в нём нечему. Прежние ключи с веткой

        (`["project-tree", id, branch]`) были формой того же, только протухающей.'
      operationId: get_snapshot_index_snapshots__snapshot_id__index_get
      parameters:
      - name: snapshot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Snapshot Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Get Snapshot Index Snapshots  Snapshot Id  Index Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnalysisState:
      properties:
        request_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Request Id
        status:
          type: string
          title: Status
          description: ready | queued | running | failed
        snapshot_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Snapshot Id
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
      type: object
      required:
      - status
      title: AnalysisState
      description: 'Состояние анализа для мастера.


        `snapshot_id` появляется РОВНО тогда, когда индекс есть; читатель не должен

        гадать по статусу. Это тот же приём, что и `fidelity` у снимка: полнота

        ответа объявляется, а не выводится.'
    AnalysisRequestIn:
      properties:
        ref:
          type: string
          maxLength: 255
          title: Ref
          default: ''
        root_directory:
          type: string
          maxLength: 256
          title: Root Directory
          default: ''
      type: object
      title: AnalysisRequestIn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    BuildPresetOut:
      properties:
        name:
          type: string
          title: Name
        label:
          type: string
          title: Label
        fields:
          items:
            type: string
          type: array
          title: Fields
        defaults:
          additionalProperties:
            anyOf:
            - type: string
            - type: 'null'
          type: object
          title: Defaults
          default: {}
        has_ssr_switch:
          type: boolean
          title: Has Ssr Switch
          default: false
        no_build:
          type: boolean
          title: No Build
          default: false
        env_prefix:
          anyOf:
          - type: string
          - type: 'null'
          title: Env Prefix
        start_candidates:
          items:
            type: string
          type: array
          title: Start Candidates
          default: []
      type: object
      required:
      - name
      - label
      - fields
      title: BuildPresetOut
      description: Один пресет каталога — то, что мастеру нужно знать до сохранения.
    BuildPresetCatalogOut:
      properties:
        spec_version:
          type: string
          title: Spec Version
        presets:
          items:
            $ref: '#/components/schemas/BuildPresetOut'
          type: array
          title: Presets
        server:
          items:
            $ref: '#/components/schemas/BuildPresetOut'
          type: array
          title: Server
          default: []
      type: object
      required:
      - spec_version
      - presets
      title: BuildPresetCatalogOut
      description: 'Каталог пресетов целиком — ОДИН ответ на весь мастер.


        ═══ ЗАЧЕМ ОТДАЁТ СЕРВЕР ═══


        Мастер меняет фреймворк локально, до сохранения, и на каждый клик обязан

        знать, есть ли у пресета шаг сборки и куда он кладёт результат. Спрашивать

        сервер на клик — round-trip; держать свою таблицу — вторая таблица

        умолчаний (`T-20260824-6`: 10 записей в панели против 33 в спеке).


        🚨 Пакет `layero-detection` спеку наружу не отдаёт — только подписи и

        версию, — поэтому прочитать умолчания панель не может физически. Каталог

        считается там, где он и так считается, и второго места не заводится.


        Два прочтения на фреймворк, `presets` и `server`, потому что набор полей

        решает ПАРА «пресет + его РЕЖИМ»: у Next.js при статическом экспорте есть

        и команда, и каталог; у него же на сервере каталог в настройках не

        спрашивается — раскладку задаёт сам фреймворк, — а команда остаётся.


        🚨 Здесь стояло `runtime: {ssr_next: […], node_web: […], python_web: […]}`,

        то есть каталог раскладывался по ВНУТРЕННЕЙ ОСИ, и контракт сам предлагал

        панели думать в осях. Режим — свойство фреймворка и называется человеку его

        словами; `project_type` из пары «пресет + режим» вычисляется, а не задаёт

        её (`T-20260825-26`).'