xhostd Integrations API
The Integrations API from xhostd — 9 operation(s) for integrations.
The Integrations API from xhostd — 9 operation(s) for integrations.
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/xhostd-com:xhostd-com-integrations-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: xhostd web Integrations API
version: 0.1.0
tags:
- name: Integrations
paths:
/integrations/origin/install:
get:
summary: Origin Install Start
description: 'Send the signed-in user to Origin''s install page.
The route renders no page, so the state appears in no console page
view: only the outbound redirect carries it. The state binds the
approval to this user, and Origin echoes it into the receipt.
The session check comes before the switch, so a signed-out visitor
bounces to sign-in like on every other console route
(``tests/test_sign_in_entry_census.py``).'
operationId: origin_install_start_integrations_origin_install_get
parameters:
- name: return_to
in: query
required: false
schema:
type: string
default: ''
title: Return To
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/origin/callback:
get:
summary: Origin Install Callback
description: 'Store Origin''s approval in the cookie, and send the reader to confirm.
**This route renders nothing.** A person with no session reaches it
from Origin, so it reads no session except to bounce an incomplete
link. It answers a 303 to the confirm page, so the receipt leaves the
address bar, and it carries ``Referrer-Policy: no-referrer`` and
``Cache-Control: no-store``, so no later request carries the receipt
on and no cache keeps it. Every refusal is one plain line with the
same headers.
The checks compare, and verify nothing: the display decode
(:func:`_receipt_display_claims`) must name this installation, and a
query ``state`` must equal the receipt''s ``state`` claim. The
signature covers that claim, so xhostd''s check at the bind then makes
the comparison authentic.'
operationId: origin_install_callback_integrations_origin_callback_get
parameters:
- name: installation_id
in: query
required: false
schema:
type: string
default: ''
title: Installation Id
- name: installation_receipt
in: query
required: false
schema:
type: string
default: ''
title: Installation Receipt
- name: state
in: query
required: false
schema:
type: string
default: ''
title: State
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/confirm:
get:
summary: Integrations Confirm Page
description: 'Confirm the pending approval, or bind it when this session started it.
**This GET binds only an approval whose state this session minted**
(:func:`_origin_resume_target`). Every other approval — one that
started from Origin, one with no state, and one whose state names
another user — renders the confirm page, and the bind waits for its
POST. A link an attacker sends therefore binds nothing on its own.
A signed-out reader signs in and returns here, through the
``return_to`` of :func:`_sign_in_redirect`.'
operationId: integrations_confirm_page_integrations_confirm_get
responses:
'200':
description: Successful Response
content:
text/html:
schema:
type: string
tags:
- Integrations
post:
summary: Integrations Confirm Submit
description: 'Bind the pending approval to the signed-in user.
This POST is the login cross-site request forgery (CSRF) guard of
the flow that starts from Origin.
``src/xhost_web/middleware.py::origin_admitted`` refuses a POST from
any other origin, so only a press on the console''s own confirm page
binds the approval.'
operationId: integrations_confirm_submit_integrations_confirm_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Integrations
/integrations/github/install:
get:
summary: Github Install Start
description: 'Send the signed-in user to the app''s install page on GitHub.
The state carries ``return_to`` to the setup route, and nothing
else: the setup route reads it as a convenience. The route renders
no page. The session check comes before the switch, so a signed-out
visitor bounces to sign-in like on every other console route.'
operationId: github_install_start_integrations_github_install_get
parameters:
- name: return_to
in: query
required: false
schema:
type: string
default: ''
title: Return To
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/github/setup:
get:
summary: Github Setup
description: 'Send the signed-in user from GitHub''s setup redirect to GitHub''s authorization.
GitHub sends a person here after an install, a change to an
installation, or an install request, whether the flow started on
xhostd or on GitHub. Nothing in the query is secret, so a signed-out
reader signs in and resumes here. An install request binds nothing:
only an owner of the organization can install the app. Every other
action mints the authorization state, with this installation and
this user, and answers 302 to GitHub''s authorization page with the
PKCE challenge of that state.'
operationId: github_setup_integrations_github_setup_get
parameters:
- name: installation_id
in: query
required: false
schema:
type: string
default: ''
title: Installation Id
- name: setup_action
in: query
required: false
schema:
type: string
default: ''
title: Setup Action
- name: state
in: query
required: false
schema:
type: string
default: ''
title: State
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/github/callback:
get:
summary: Github Callback
description: 'Bind the installation with GitHub''s code, then land with one flash.
**This route renders nothing.** Every answer carries
``Referrer-Policy: no-referrer`` and ``Cache-Control: no-store``, so
no later request carries the code on and no cache keeps it. A
signed-out reader bounces to sign-in with no ``return_to``, so the
code never rides into a sign-in URL.
Only an authorization state that this user''s session minted counts
(:func:`_load_github_authorization`). The callback derives the PKCE
verifier from it and sends xhostd the code and the verifier, unread.
An expired code restarts the authorization once.'
operationId: github_callback_integrations_github_callback_get
parameters:
- name: code
in: query
required: false
schema:
type: string
default: ''
title: Code
- name: state
in: query
required: false
schema:
type: string
default: ''
title: State
- name: error
in: query
required: false
schema:
type: string
default: ''
title: Error
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/repos:
get:
summary: Repos Page
description: 'The repository picker: one page of one git host account''s repositories.
``installation`` picks one of the reader''s active accounts, of any
git host, and the first one is the default. ``filter`` and
``page_token`` pass to xhostd''s repository listing. A filtered page
can come back empty with a next page token, because xhostd reads a
bounded number of the host''s pages per call; the page then offers to
keep searching. ``project`` scopes the page to one project the reader
owns; a project the reader does not own answers 303 to its Git page.'
operationId: repos_page_integrations_repos_get
parameters:
- name: installation
in: query
required: false
schema:
type: string
default: ''
title: Installation
- name: project
in: query
required: false
schema:
type: string
default: ''
title: Project
- name: filter
in: query
required: false
schema:
type: string
default: ''
title: Filter
- name: page_token
in: query
required: false
schema:
type: string
default: ''
title: Page Token
responses:
'200':
description: Successful Response
content:
text/html:
schema:
type: string
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/repos/connect:
post:
summary: Repos Connect
description: 'Connect one of the reader''s projects to a repository, then 303 to its Git page.
Both entries of the picker post here: ``app_id`` is the project, a
hidden field from a project''s Git page and a select from the
account''s picker, and ``project`` names the picker page a refusal
returns to. xhostd answers each refusal with its own sentence.'
operationId: repos_connect_integrations_repos_connect_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_repos_connect_integrations_repos_connect_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
/integrations/repos/create:
post:
summary: Repos Create
description: 'Create a project, then connect it to the repository, then 303 to its Git page.
The create names no branch: the repository''s default branch is
unknown until the first sync, and the reader binds a channel after
it. A refused create returns to the picker with xhostd''s sentence. A
refused connect rolls nothing back: the project stays, and the flash
says so on its Git page.'
operationId: repos_create_integrations_repos_create_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_repos_create_integrations_repos_create_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Integrations
components:
schemas:
Body_repos_create_integrations_repos_create_post:
properties:
installation_id:
type: string
title: Installation Id
default: ''
repository_id:
type: string
title: Repository Id
default: ''
name:
type: string
title: Name
default: ''
template:
type: string
title: Template
default: ''
type: object
title: Body_repos_create_integrations_repos_create_post
Body_repos_connect_integrations_repos_connect_post:
properties:
installation_id:
type: string
title: Installation Id
default: ''
repository_id:
type: string
title: Repository Id
default: ''
app_id:
type: string
title: App Id
default: ''
project:
type: string
title: Project
default: ''
type: object
title: Body_repos_connect_integrations_repos_connect_post
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
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