OpenAPI Specification
openapi: 3.1.0
info:
title: Breeze Admin API
description: A comprehensive API for managing yield farming operations, funds, and user authentication
contact:
name: Breeze Team
email: support@breeze.com
license:
name: Proprietary
url: https://breeze.com/license
version: 1.0.0
servers:
- url: http://localhost:8080
description: Local development server
- url: https://api.breeze.com
description: Production server
tags:
- name: Admin
description: Administrative operations
paths:
/admin/agent/metrics:
get:
tags:
- Admin
operationId: get_agent_metrics
responses:
'200':
description: Global and per-asset metrics for tracked agents aggregated from agent_data.tokens and user_fund
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAgentMetricsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/assign-fund-to-organization:
post:
tags:
- Admin
operationId: assign_fund_to_organization
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiAssignFundToOrganization'
required: true
responses:
'200':
description: Fund assigned to partner successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiAssignFundOperationResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/close-fund/{fund_id}:
post:
tags:
- Admin
operationId: close_fund
parameters:
- name: fund_id
in: path
description: Fund ID to close
required: true
schema:
type: string
responses:
'200':
description: Close fund job submitted successfully
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/create-fund:
post:
tags:
- Admin
operationId: process_create_fund
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiCreateFundRequest'
required: true
responses:
'200':
description: Fund created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFundApiResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/create-selective-yield-sources:
post:
tags:
- Admin
operationId: create_selective_yield_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiSelectiveYieldSources'
required: true
responses:
'200':
description: selective yield sources created successfully
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/delete-empty-strategy:
post:
tags:
- Admin
operationId: delete_empty_strategy
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInputForDeletingEmptyStrategy'
required: true
responses:
'200':
description: Strategy deleted successfully
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/delete-strategy-template:
post:
tags:
- Admin
operationId: delete_strategy_template
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInputForDeletingStrategy'
required: true
responses:
'200':
description: Strategy template deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiDeleteStrategyOperationResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/funds:
get:
tags:
- Admin
operationId: list_all_funds
responses:
'200':
description: All funds retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AdminFundListItem'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
post:
tags:
- Admin
operationId: create_fund_admin
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiCreateFundRequest'
required: true
responses:
'200':
description: Fund created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFundApiResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/funds/{fund_id}:
get:
tags:
- Admin
operationId: get_fund_detail
parameters:
- name: fund_id
in: path
description: Fund ID
required: true
schema:
type: string
responses:
'200':
description: Fund detail retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AdminFundDetail'
'404':
description: Fund not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
put:
tags:
- Admin
operationId: update_fund_admin
parameters:
- name: fund_id
in: path
description: Fund ID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUpdateFundAdminRequest'
required: true
responses:
'200':
description: Fund updated successfully
'404':
description: Fund not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/funds/{fund_id}/metrics:
get:
tags:
- Admin
operationId: get_fund_metrics
parameters:
- name: fund_id
in: path
description: Fund ID
required: true
schema:
type: string
- name: start_timestamp
in: query
description: Start timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: end_timestamp
in: query
description: End timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: aggregation_window
in: query
description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '1d'
required: false
schema:
type: string
responses:
'200':
description: Fund metrics retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiFundMetricsResponse'
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Fund not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/funds/{fund_id}/rebalance-history:
get:
tags:
- Admin
operationId: get_fund_rebalance_history_admin
parameters:
- name: fund_id
in: path
description: Fund ID
required: true
schema:
type: string
- name: per_page
in: query
description: Limit of records to return
required: true
schema:
type: integer
format: int64
minimum: 0
- name: page
in: query
description: Offset of records to return
required: true
schema:
type: integer
format: int64
minimum: 0
- name: include_failed
in: query
description: Include failed rebalance history
required: true
schema:
type: boolean
responses:
'200':
description: Fund rebalance history retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse'
'404':
description: Fund not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/jobs/{job_id}/cancel:
post:
tags:
- Admin
operationId: cancel_job
parameters:
- name: job_id
in: path
description: Job ID to cancel
required: true
schema:
type: string
responses:
'200':
description: Job cancelled successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiCancelJobResult'
'400':
description: Job cannot be cancelled (already completed, failed, or cancelled)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/jobs/{job_id}/retry:
post:
tags:
- Admin
operationId: retry_job
parameters:
- name: job_id
in: path
description: Job ID to retry
required: true
schema:
type: string
responses:
'200':
description: Job queued for retry successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiRetryJobResult'
'400':
description: Job cannot be retried (not in failed or cancelled state)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/list-admin-jobs:
get:
tags:
- Admin
operationId: list_all_admin_jobs
parameters:
- name: page
in: query
description: 'Page number for pagination (default: 1)'
required: false
schema:
type: integer
format: int32
minimum: 0
- name: per_page
in: query
description: 'Items per page (default: 20, max: 100)'
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'200':
description: Admin jobs retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse'
'400':
description: Invalid query parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/metrics:
get:
tags:
- Admin
operationId: get_metrics
parameters:
- name: start_timestamp
in: query
description: Start timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: end_timestamp
in: query
description: End timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: aggregation_window
in: query
description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '30d'
required: false
schema:
type: string
responses:
'200':
description: Platform metrics retrieved successfully (same format as strategy/metrics)
content:
application/json:
schema:
$ref: '#/components/schemas/AdminMetricsResponse'
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/migrate-org-to-strategy:
post:
tags:
- Admin
operationId: migrate_org_to_strategy
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInputForMigratingToStrategy'
required: true
responses:
'200':
description: Strategy migrated org to strategy successfully
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/org-fund-access:
get:
tags:
- Admin
operationId: get_org_fund_access
responses:
'200':
description: Organization fund access records retrieved successfully
content:
application/json:
schema:
type: array
items: {}
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/organizations:
get:
tags:
- Admin
operationId: get_organizations
responses:
'200':
description: All organizations retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrganizationsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
post:
tags:
- Admin
operationId: create_organization_admin
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganizationRequest'
required: true
responses:
'200':
description: Organization created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganizationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/organizations/{org_id}:
get:
tags:
- Admin
operationId: get_organization_detail_handler
parameters:
- name: org_id
in: path
description: Organization ID
required: true
schema:
type: string
responses:
'200':
description: Organization details retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrganizationDetailResponse'
'404':
description: Organization not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
put:
tags:
- Admin
operationId: update_organization_admin
parameters:
- name: org_id
in: path
description: Organization ID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUpdateOrganizationAdminRequest'
required: true
responses:
'200':
description: Organization updated successfully
'404':
description: Organization not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/organizations/{org_id}/invites:
post:
tags:
- Admin
operationId: create_organization_invite
parameters:
- name: org_id
in: path
description: Organization ID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganizationInviteRequest'
required: true
responses:
'200':
description: Invitation created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganizationInviteResponse'
'400':
description: Bad request - invalid email or role
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Organization not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/organizations/{org_id}/invites/{invite_id}/revoke:
post:
tags:
- Admin
operationId: revoke_organization_invite
parameters:
- name: org_id
in: path
description: Organization ID
required: true
schema:
type: string
- name: invite_id
in: path
description: Invitation ID to revoke
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeOrganizationInviteRequest'
required: true
responses:
'200':
description: Invitation revoked successfully
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeOrganizationInviteResponse'
'404':
description: Organization or invitation not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/overview:
get:
tags:
- Admin
operationId: get_overview
responses:
'200':
description: Platform overview with all metrics
content:
application/json:
schema:
$ref: '#/components/schemas/PlatformSummary'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/strategies:
get:
tags:
- Admin
operationId: list_all_strategies
responses:
'200':
description: All strategies retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AdminStrategyListItem'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/strategies/{strategy_id}:
get:
tags:
- Admin
operationId: get_strategy_detail
parameters:
- name: strategy_id
in: path
description: Strategy ID
required: true
schema:
type: string
responses:
'200':
description: Strategy detail retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AdminStrategyDetail'
'404':
description: Strategy not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
put:
tags:
- Admin
operationId: update_strategy_admin
parameters:
- name: strategy_id
in: path
description: Strategy ID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInputForUpdatingStrategyInstance'
required: true
responses:
'200':
description: Strategy updated successfully
'404':
description: Strategy not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
delete:
tags:
- Admin
operationId: delete_strategy_admin
parameters:
- name: strategy_id
in: path
description: Strategy ID
required: true
schema:
type: string
responses:
'200':
description: Strategy deleted successfully
'400':
description: Strategy has funds and cannot be deleted
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Strategy not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/strategies/{strategy_id}/close-funds:
post:
tags:
- Admin
operationId: close_strategy_funds_admin
parameters:
- name: strategy_id
in: path
description: Strategy ID to close all funds for
required: true
schema:
type: string
responses:
'200':
description: Close fund jobs submitted successfully for all funds in strategy
'404':
description: Strategy not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/strategies/{strategy_id}/metrics:
get:
tags:
- Admin
operationId: get_strategy_metrics
parameters:
- name: strategy_id
in: path
description: Strategy ID
required: true
schema:
type: string
- name: start_timestamp
in: query
description: Start timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: end_timestamp
in: query
description: End timestamp for metrics range (ISO 8601 format)
required: true
schema:
type: string
- name: aggregation_window
in: query
description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '1d'
required: false
schema:
type: string
responses:
'200':
description: Strategy metrics retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiStrategyMetricUniversal'
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Strategy not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/templates:
get:
tags:
- Admin
operationId: get_templates
responses:
'200':
description: Strategy templates retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Vec'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/unassign-fund-to-organization:
post:
tags:
- Admin
operationId: unassign_fund_to_organization
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnAssignFundFromOrganization'
required: true
responses:
'200':
description: Fund assigned to partner successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiAssignFundOperationResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/admin/update-fund:
post:
tags:
- Admin
operationId: update_fund
reque
# --- truncated at 32 KB (100 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/breeze/refs/heads/main/openapi/breeze-admin-api-openapi.yml