Skip to content

API Reference parrot.handlers.integrations

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.handlers.integrations

View source

HTTP handler for the OAuth2 integrations endpoints.

Exposes three routes under /api/v1/agents/integrations/{agent_id}:

  • GET /api/v1/agents/integrations/{agent_id} → list integrations for the current user.
  • POST /api/v1/agents/integrations/{agent_id}/{provider}/connect → initiate the OAuth2 popup flow; returns auth_url + state nonce.
  • DELETE /api/v1/agents/integrations/{agent_id}/{provider} → disconnect the principal's provider connection.

The handler delegates all business logic to :class:~parrot.integrations.oauth2.service.IntegrationsService.

Class IntegrationsHandler

Aiohttp class-based view for the OAuth2 integrations API.

URL dispatch is performed by URL suffix inspection:

  • POST .../{provider}/connect → start OAuth2 flow.
  • DELETE .../{provider} → disconnect.

Method IntegrationsHandler.get

GET /api/v1/agents/integrations/{agent_id} — list integrations.

get() -> web.Response

Returns: web.Response — JSON array of :class:~parrot.integrations.oauth2.models.IntegrationDescriptor objects for the authenticated user on the given agent.

Method IntegrationsHandler.post

POST dispatcher — routes to connect-init.

Dispatches by the last path segment:

  • …/{provider}/connect → :meth:_post_connect

post() -> web.Response

Returns: web.Response — JSON response from the appropriate sub-handler.

Method IntegrationsHandler.delete

Handle DELETE .../integrations/{agent_id}/{provider}.

Revokes the provider and deletes the principal's metadata row.

delete() -> web.Response

Returns: web.Response — DisconnectResponse JSON on success.

Alias IntegrationsService

Re-exported from parrot.auth.oauth2.service.IntegrationsService.

Alias WEB_OAUTH_ALLOWED_ORIGINS

Re-exported from parrot.conf.WEB_OAUTH_ALLOWED_ORIGINS.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally