main.py•41.3 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-07-07T15:56:15+00:00
import argparse
import json
import os
from datetime import datetime
from typing import *
from typing import Optional, Union
from uuid import UUID
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import BaseSecurity, HTTPBasic
from fastapi import Path
from models import (
ApiKeyPatchRequest,
ApiKeyPostRequest,
BackupConfigurationPatchRequest,
ClickPipePatchRequest,
ClickPipePostRequest,
ClickPipeScalingPatchRequest,
ClickPipeStatePatchRequest,
CreateReversePrivateEndpoint,
InstanceServiceQueryApiEndpointsPostRequest,
InvitationPostRequest,
MemberPatchRequest,
OrganizationPatchRequest,
ServicePasswordPatchRequest,
ServicePatchRequest,
ServicePostRequest,
ServiceReplicaScalingPatchRequest,
ServiceScalingPatchRequest,
ServiceStatePatchRequest,
ServicPrivateEndpointePostRequest,
V1OrganizationsGetResponse,
V1OrganizationsGetResponse1,
V1OrganizationsOrganizationIdActivitiesActivityIdGetResponse,
V1OrganizationsOrganizationIdActivitiesActivityIdGetResponse1,
V1OrganizationsOrganizationIdActivitiesGetResponse,
V1OrganizationsOrganizationIdActivitiesGetResponse1,
V1OrganizationsOrganizationIdGetResponse,
V1OrganizationsOrganizationIdGetResponse1,
V1OrganizationsOrganizationIdInvitationsGetResponse,
V1OrganizationsOrganizationIdInvitationsGetResponse1,
V1OrganizationsOrganizationIdInvitationsInvitationIdDeleteResponse,
V1OrganizationsOrganizationIdInvitationsInvitationIdDeleteResponse1,
V1OrganizationsOrganizationIdInvitationsInvitationIdGetResponse,
V1OrganizationsOrganizationIdInvitationsInvitationIdGetResponse1,
V1OrganizationsOrganizationIdInvitationsPostResponse,
V1OrganizationsOrganizationIdInvitationsPostResponse1,
V1OrganizationsOrganizationIdKeysGetResponse,
V1OrganizationsOrganizationIdKeysGetResponse1,
V1OrganizationsOrganizationIdKeysKeyIdDeleteResponse,
V1OrganizationsOrganizationIdKeysKeyIdDeleteResponse1,
V1OrganizationsOrganizationIdKeysKeyIdGetResponse,
V1OrganizationsOrganizationIdKeysKeyIdGetResponse1,
V1OrganizationsOrganizationIdKeysKeyIdPatchResponse,
V1OrganizationsOrganizationIdKeysKeyIdPatchResponse1,
V1OrganizationsOrganizationIdKeysPostResponse,
V1OrganizationsOrganizationIdKeysPostResponse1,
V1OrganizationsOrganizationIdMembersGetResponse,
V1OrganizationsOrganizationIdMembersGetResponse1,
V1OrganizationsOrganizationIdMembersUserIdDeleteResponse,
V1OrganizationsOrganizationIdMembersUserIdDeleteResponse1,
V1OrganizationsOrganizationIdMembersUserIdGetResponse,
V1OrganizationsOrganizationIdMembersUserIdGetResponse1,
V1OrganizationsOrganizationIdMembersUserIdPatchResponse,
V1OrganizationsOrganizationIdMembersUserIdPatchResponse1,
V1OrganizationsOrganizationIdPatchResponse,
V1OrganizationsOrganizationIdPatchResponse1,
V1OrganizationsOrganizationIdPrivateEndpointConfigGetResponse,
V1OrganizationsOrganizationIdPrivateEndpointConfigGetResponse1,
V1OrganizationsOrganizationIdPrometheusGetResponse,
V1OrganizationsOrganizationIdServicesGetResponse,
V1OrganizationsOrganizationIdServicesGetResponse1,
V1OrganizationsOrganizationIdServicesPostResponse,
V1OrganizationsOrganizationIdServicesPostResponse1,
V1OrganizationsOrganizationIdServicesServiceIdBackupConfigurationGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdBackupConfigurationGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdBackupConfigurationPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdBackupConfigurationPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdBackupsBackupIdGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdBackupsBackupIdGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdBackupsGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdBackupsGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdDeleteResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdDeleteResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdScalingPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdScalingPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdStatePatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesClickPipeIdStatePatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesPostResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesPostResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsPostResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsPostResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsReversePrivateEndpointIdDeleteResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsReversePrivateEndpointIdDeleteResponse1,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsReversePrivateEndpointIdGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdClickpipesReversePrivateEndpointsReversePrivateEndpointIdGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdDeleteResponse,
V1OrganizationsOrganizationIdServicesServiceIdDeleteResponse1,
V1OrganizationsOrganizationIdServicesServiceIdGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdPasswordPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdPasswordPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdPrivateEndpointConfigGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdPrivateEndpointConfigGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdPrivateEndpointPostResponse,
V1OrganizationsOrganizationIdServicesServiceIdPrivateEndpointPostResponse1,
V1OrganizationsOrganizationIdServicesServiceIdPrometheusGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdReplicaScalingPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdReplicaScalingPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdScalingPatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdScalingPatchResponse1,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointDeleteResponse,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointDeleteResponse1,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointGetResponse,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointGetResponse1,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointPostResponse,
V1OrganizationsOrganizationIdServicesServiceIdServiceQueryEndpointPostResponse1,
V1OrganizationsOrganizationIdServicesServiceIdStatePatchResponse,
V1OrganizationsOrganizationIdServicesServiceIdStatePatchResponse1,
V1OrganizationsOrganizationIdUsageCostGetResponse,
V1OrganizationsOrganizationIdUsageCostGetResponse1,
)
app = MCPProxy(
contact={
'email': 'support@clickhouse.com',
'name': 'ClickHouse Support',
'url': 'https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-257466',
},
title='OpenAPI spec for ClickHouse Cloud',
version='1.0',
servers=[{'url': 'https://api.clickhouse.cloud'}],
)
@app.get(
'/v1/organizations',
description=""" Returns a list with a single organization associated with the API key in the request. """,
tags=['organization_management', 'organization_member_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations():
"""
Get list of available organizations
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}',
description=""" Returns details of a single organization. In order to get the details, the auth key must belong to the organization. """,
tags=['organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id(
organization_id: UUID = Path(..., alias='organizationId')
):
"""
Get organization details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}',
description=""" Updates organization fields. Requires ADMIN auth key role. """,
tags=['organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def patch_v1_organizations__organization_id(
organization_id: UUID = Path(..., alias='organizationId'),
body: OrganizationPatchRequest = None,
):
"""
Update organization details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/activities',
description=""" Returns a list of all organization activities. """,
tags=['organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_activities(
organization_id: UUID = Path(..., alias='organizationId'),
from_date: Optional[datetime] = None,
to_date: Optional[datetime] = None,
):
"""
List of organization activities
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/activities/{activityId}',
description=""" Returns a single organization activity by ID. """,
tags=['organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_activities__activity_id(
organization_id: UUID = Path(..., alias='organizationId'),
activity_id: str = Path(..., alias='activityId'),
):
"""
Organization activity
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/invitations',
description=""" Returns list of all organization invitations. """,
tags=['organization_invitations'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_invitations(
organization_id: UUID = Path(..., alias='organizationId')
):
"""
List all invitations
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/invitations',
description=""" Creates organization invitation. """,
tags=['organization_invitations'],
security=[
HTTPBasic(name="None"),
],
)
def post_v1_organizations__organization_id_invitations(
organization_id: UUID = Path(..., alias='organizationId'),
body: InvitationPostRequest = None,
):
"""
Create an invitation
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/invitations/{invitationId}',
description=""" Deletes a single organization invitation. """,
tags=['organization_invitations', 'organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_organization_invitation(
organization_id: UUID = Path(..., alias='organizationId'),
invitation_id: UUID = Path(..., alias='invitationId'),
):
"""
Delete organization invitation
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/invitations/{invitationId}',
description=""" Returns details for a single organization invitation. """,
tags=['organization_invitations'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_invitations__invitation_id(
organization_id: UUID = Path(..., alias='organizationId'),
invitation_id: UUID = Path(..., alias='invitationId'),
):
"""
Get invitation details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/keys',
description=""" Returns a list of all keys in the organization. """,
tags=['organization_api_keys'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_keys(
organization_id: UUID = Path(..., alias='organizationId')
):
"""
Get list of all keys
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/keys',
description=""" Creates new API key. """,
tags=['organization_api_keys'],
security=[
HTTPBasic(name="None"),
],
)
def post_v1_organizations__organization_id_keys(
organization_id: UUID = Path(..., alias='organizationId'),
body: ApiKeyPostRequest = None,
):
"""
Create key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/keys/{keyId}',
description=""" Deletes API key. Only a key not used to authenticate the active request can be deleted. """,
tags=['organization_api_keys'],
security=[
HTTPBasic(name="None"),
],
)
def delete_v1_organizations__organization_id_keys__key_id(
organization_id: UUID = Path(..., alias='organizationId'),
key_id: UUID = Path(..., alias='keyId'),
):
"""
Delete key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/keys/{keyId}',
description=""" Returns a single key details. """,
tags=['organization_api_keys'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_keys__key_id(
organization_id: UUID = Path(..., alias='organizationId'),
key_id: UUID = Path(..., alias='keyId'),
):
"""
Get key details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/keys/{keyId}',
description=""" Updates API key properties. """,
tags=['organization_api_keys'],
security=[
HTTPBasic(name="None"),
],
)
def patch_v1_organizations__organization_id_keys__key_id(
organization_id: UUID = Path(..., alias='organizationId'),
key_id: UUID = Path(..., alias='keyId'),
body: ApiKeyPatchRequest = None,
):
"""
Update key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/members',
description=""" Returns a list of all members in the organization. """,
tags=['organization_management', 'organization_member_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_members(
organization_id: UUID = Path(..., alias='organizationId')
):
"""
List organization members
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/members/{userId}',
description=""" Removes a user from the organization """,
tags=['organization_member_management', 'organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_v1_organizations__organization_id_members__user_id(
organization_id: UUID = Path(..., alias='organizationId'),
user_id: UUID = Path(..., alias='userId'),
):
"""
Remove an organization member
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/members/{userId}',
description=""" Returns a single organization member details. """,
tags=['organization_member_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_members__user_id(
organization_id: UUID = Path(..., alias='organizationId'),
user_id: UUID = Path(..., alias='userId'),
):
"""
Get member details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/members/{userId}',
description=""" Updates organization member role. """,
tags=['organization_member_management', 'organization_management'],
security=[
HTTPBasic(name="None"),
],
)
def patch_v1_organizations__organization_id_members__user_id(
organization_id: UUID = Path(..., alias='organizationId'),
user_id: UUID = Path(..., alias='userId'),
body: MemberPatchRequest = None,
):
"""
Update organization member
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/privateEndpointConfig',
description=""" Information required to set up a private endpoint """,
tags=['organization_management', 'reverse_endpoint_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_private_endpoint_config(
organization_id: UUID = Path(..., alias='organizationId'),
cloud_provider: str = ...,
region_id: str = ...,
):
"""
Get private endpoint configuration for region within cloud provider for an organization
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/prometheus',
description=""" Returns prometheus metrics for all services in an organization. """,
tags=['organization_management', 'organization_cost_analysis'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_prometheus(
organization_id: UUID = Path(..., alias='organizationId'),
filtered_metrics: Optional[str] = None,
):
"""
Get organization metrics
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services',
description=""" Returns a list of all services in the organization. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_services(
organization_id: UUID = Path(..., alias='organizationId')
):
"""
List of organization services
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/services',
description=""" Creates a new service in the organization, and returns the current service state and a password to access the service. The service is started asynchronously. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def post_v1_organizations__organization_id_services(
organization_id: UUID = Path(..., alias='organizationId'),
body: ServicePostRequest = None,
):
"""
Create new service
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/services/{serviceId}',
description=""" Deletes the service. The service must be in stopped state and is deleted asynchronously after this method call. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_v1_organizations__organization_id_services__service_id(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Delete service
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}',
description=""" Returns a service that belongs to the organization """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_services__service_id(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Get service details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}',
description=""" Updates basic service details like service name or IP access list. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def patch_v1_organizations__organization_id_services__service_id(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServicePatchRequest = None,
):
"""
Update service basic details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration',
description=""" Returns the service backup configuration. """,
tags=['service_backup_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_service_backup_configuration(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Get service backup configuration
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration',
description=""" Updates service backup configuration. Requires ADMIN auth key role. Setting the properties with null value, will reset the properties to theirs default values. """,
tags=['organization_service_management', 'service_backup_operations'],
security=[
HTTPBasic(name="None"),
],
)
def update_service_backup_configuration(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: BackupConfigurationPatchRequest = None,
):
"""
Update service backup configuration
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/backups',
description=""" Returns a list of all backups for the service. The most recent backups comes first in the list. """,
tags=['service_backup_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def list_service_backups_by_org_service(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
List of service backups
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId}',
description=""" Returns a single backup info. """,
tags=['service_backup_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_backup_details(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
backup_id: UUID = Path(..., alias='backupId'),
):
"""
Get backup details
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of ClickPipes. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def list_clickpipes_for_service_in_org(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
List ClickPipes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new ClickPipe. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_clickpipe_for_organization_service(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ClickPipePostRequest = None,
):
"""
Create ClickPipe
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the specified ClickPipe. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_click_pipe_by_ids(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
click_pipe_id: UUID = Path(..., alias='clickPipeId'),
):
"""
Delete ClickPipe
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the specified ClickPipe. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_click_pipe_by_ids(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
click_pipe_id: UUID = Path(..., alias='clickPipeId'),
):
"""
Get ClickPipe
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update the specified ClickPipe. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_click_pipe(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
click_pipe_id: UUID = Path(..., alias='clickPipeId'),
body: ClickPipePatchRequest = None,
):
"""
Update ClickPipe
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Change scaling settings for the specified ClickPipe. """,
tags=['click_pipe_operations', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def scale_click_pipe(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
click_pipe_id: UUID = Path(..., alias='clickPipeId'),
body: ClickPipeScalingPatchRequest = None,
):
"""
Scaling ClickPipe
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/state',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Start, stop or resync ClickPipe. Stopping a ClickPipe will stop the ingestion process from any state. Starting is allowed for ClickPipes in the "Stopped" state or with a "Failed" state. Resyncing is only for Postgres pipes and can be done from any state. """,
tags=['click_pipe_operations', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_click_pipe_state(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
click_pipe_id: UUID = Path(..., alias='clickPipeId'),
body: ClickPipeStatePatchRequest = None,
):
"""
Update ClickPipe state
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of reverse private endpoints for the specified service. """,
tags=['reverse_endpoint_management', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def list_reverse_private_endpoints(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
List reverse private endpoints
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new reverse private endpoint. """,
tags=['reverse_endpoint_management', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_reverse_private_endpoint(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: CreateReversePrivateEndpoint = None,
):
"""
Create reverse private endpoint
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the reverse private endpoint with the specified ID. """,
tags=['reverse_endpoint_management', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_reverse_private_endpoint(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
reverse_private_endpoint_id: UUID = Path(..., alias='reversePrivateEndpointId'),
):
"""
Delete reverse private endpoint
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}',
description=""" **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the reverse private endpoint with the specified ID. """,
tags=['reverse_endpoint_management', 'organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_reverse_private_endpoint(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
reverse_private_endpoint_id: UUID = Path(..., alias='reversePrivateEndpointId'),
):
"""
Get reverse private endpoint
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/password',
description=""" Sets a new password for the service """,
tags=['organization_service_management', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_service_password(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServicePasswordPatchRequest = None,
):
"""
Update service password
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/services/{serviceId}/privateEndpoint',
description=""" Create a new private endpoint. The private endpoint will be associated with this service and organization """,
tags=['organization_service_management', 'reverse_endpoint_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_private_endpoint(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServicPrivateEndpointePostRequest = None,
):
"""
Create a private endpoint
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/privateEndpointConfig',
description=""" Information required to set up a private endpoint """,
tags=[
'organization_management',
'organization_service_management',
'reverse_endpoint_management',
],
security=[
HTTPBasic(name="None"),
],
)
def get_private_endpoint_config(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Get private endpoint configuration
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/prometheus',
description=""" Returns prometheus metrics for a service. """,
tags=['organization_service_management', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_service_metrics_by_organization_and_service(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
filtered_metrics: Optional[str] = None,
):
"""
Get service metrics
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/replicaScaling',
description=""" Updates minimum and maximum memory limits per replica and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 4 starting from 8GB. Please contact support to enable adjustment of numReplicas. """,
tags=['organization_service_management', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_service_auto_scaling_settings(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServiceReplicaScalingPatchRequest = None,
):
"""
Update service auto scaling settings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/scaling',
description=""" Updates minimum and maximum total memory limits and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 12 starting from 24GB. Please contact support to enable adjustment of numReplicas. """,
tags=['organization_service_management', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def modify_service_scaling_settings(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServiceScalingPatchRequest = None,
):
"""
Update service auto scaling settings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint',
description=""" This is an experimental feature. Please contact support to enable it. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_service_query_endpoint_by_ids(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Delete the service query endpoint for a given instance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint',
description=""" This is an experimental feature. Please contact support to enable it. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def get_service_query_endpoint_by_org_and_service(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
):
"""
Get the service query endpoint for a given instance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint',
description=""" This is an experimental feature. Please contact support to enable it. """,
tags=['organization_service_management'],
security=[
HTTPBasic(name="None"),
],
)
def upsert_service_query_endpoint(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: InstanceServiceQueryApiEndpointsPostRequest = None,
):
"""
Upsert the service query endpoint for a given instance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/organizations/{organizationId}/services/{serviceId}/state',
description=""" Starts or stop service """,
tags=['organization_service_management', 'service_operations_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_service_state(
organization_id: UUID = Path(..., alias='organizationId'),
service_id: UUID = Path(..., alias='serviceId'),
body: ServiceStatePatchRequest = None,
):
"""
Update service state
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/organizations/{organizationId}/usageCost',
description=""" Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone. """,
tags=['organization_cost_analysis'],
security=[
HTTPBasic(name="None"),
],
)
def get_v1_organizations__organization_id_usage_cost(
organization_id: UUID = Path(..., alias='organizationId'),
from_date: datetime = ...,
to_date: datetime = ...,
):
"""
Get organization usage costs
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="MCP Server")
parser.add_argument(
"transport",
choices=["stdio", "sse", "streamable-http"],
help="Transport mode (stdio, sse or streamable-http)",
)
args = parser.parse_args()
if "CONFIG_PATH" in os.environ:
config_path = os.environ["CONFIG_PATH"]
app.load_configuration(config_path)
if "CONFIG" in os.environ:
config = os.environ["CONFIG"]
app.load_configuration_from_string(config)
if "SECURITY" in os.environ:
security_params = BaseSecurity.parse_security_parameters_from_env(
os.environ,
)
app.set_security_params(security_params)
mcp_settings = json.loads(os.environ.get("MCP_SETTINGS", "{}"))
app.get_mcp(**mcp_settings).run(transport=args.transport)