Layero Import Sources API
The import_sources API from Layero — 2 operation(s) for import_sources.
The import_sources API from Layero — 2 operation(s) for import_sources.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/layero-ru:layero-ru-import-sources-api"
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.
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: 3.2.0
info:
title: Layero Import Sources API
version: 0.1.0
tags:
- name: import_sources
paths:
/organizations/{slug}/import/accounts:
get:
tags:
- import_sources
summary: List Accounts
description: Все аккаунты, из которых организация может импортировать код.
operationId: list_accounts_organizations__slug__import_accounts_get
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ImportAccountOut'
title: Response List Accounts Organizations Slug Import Accounts Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/organizations/{slug}/import/repos:
get:
tags:
- import_sources
summary: List Repos
description: 'Репозитории аккаунта в форме, одинаковой для всех операторов.
🚨 `Depends(get_conn)` здесь НЕТ намеренно, и вернуть его нельзя.
Эта ручка ходит к ЧУЖОМУ сервису: постранично, до `_MAX_PAGES=20`
страниц по `timeout=15s` каждая — то есть в худшем случае держит вызов
пять минут. Коннект из пула, взятый на всю ручку, всё это время был бы
занят ожиданием чужого ответа. У лидера-воркера из `max_size=15` шесть
слотов заняты LISTEN''ами и advisory-локом ВСЕГДА, так что девяти
одновременных импортов с медленным оператором хватило бы, чтобы повесить
воркер целиком — ровно так мы потеряли прод 11.08.2026 на лонг-полле
виджета поддержки.
Поэтому: короткие блоки `connection()` до и после похода наружу, а сам
поход — без коннекта на руках.'
operationId: list_repos_organizations__slug__import_repos_get
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: account
in: query
required: true
schema:
type: string
minLength: 3
maxLength: 200
title: Account
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ImportRepoOut'
title: Response List Repos Organizations Slug Import Repos Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ImportRepoOut:
properties:
account_key:
type: string
title: Account Key
provider:
type: string
title: Provider
external_id:
type: string
title: External Id
path:
type: string
title: Path
name:
type: string
title: Name
default_branch:
type: string
title: Default Branch
clone_url:
type: string
title: Clone Url
private:
type: boolean
title: Private
updated_at:
anyOf:
- type: string
- type: 'null'
title: Updated At
imported_project_ids:
items:
type: string
type: array
title: Imported Project Ids
default: []
type: object
required:
- account_key
- provider
- external_id
- path
- name
- default_branch
- clone_url
- private
title: ImportRepoOut
description: Репозиторий в форме, одинаковой для всех операторов.
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
ImportAccountOut:
properties:
key:
type: string
title: Key
provider:
type: string
title: Provider
provider_title:
type: string
title: Provider Title
login:
type: string
title: Login
status:
type: string
title: Status
status_note:
anyOf:
- type: string
- type: 'null'
title: Status Note
configure_url:
anyOf:
- type: string
- type: 'null'
title: Configure Url
can_import:
type: boolean
title: Can Import
default: true
type: object
required:
- key
- provider
- provider_title
- login
- status
title: ImportAccountOut
description: Аккаунт у оператора, из которого можно импортировать.
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError