Altimate AI OPPORTUNITIES API
The OPPORTUNITIES API from Altimate AI — 19 operation(s) for opportunities.
The OPPORTUNITIES API from Altimate AI — 19 operation(s) for opportunities.
openapi: 3.1.0
info:
title: Fast ACCOUNT_COSTS OPPORTUNITIES API
version: 0.1.0
tags:
- name: OPPORTUNITIES
paths:
/opportunities/:
get:
tags:
- OPPORTUNITIES
summary: Get Opportunities Data
description: 'Get opportunities data.
:param db: The database session for accessing the database.
:param auth: The authorization token for the request.
:param opportunities_data_request: opportunities data request.
:return: ok status and optional message.'
operationId: get_opportunities_data_opportunities__get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: page
in: query
required: true
schema:
type: integer
title: Page
- name: size
in: query
required: true
schema:
type: integer
title: Size
- name: override_global_opportunties_fetch_size
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
title: Override Global Opportunties Fetch Size
- name: effort
in: query
required: false
schema:
type: array
items:
type: string
title: Effort
- name: resource_name
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Name
- name: resource_type
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Type
- name: owner
in: query
required: false
schema:
type: array
items:
type: integer
title: Owner
- name: user
in: query
required: false
schema:
type: array
items:
type: string
title: User
- name: status
in: query
required: false
schema:
type: array
items:
type: string
title: Status
- name: opportunity_name
in: query
required: false
schema:
type: array
items:
type: string
title: Opportunity Name
- name: secondary_resource
in: query
required: false
schema:
type: array
items:
type: string
title: Secondary Resource
- name: warehouse
in: query
required: false
schema:
type: array
items:
type: string
title: Warehouse
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
description: Start date for filtering opportunities (ISO format)
title: Start Date
description: Start date for filtering opportunities (ISO format)
- name: end_date
in: query
required: true
schema:
type: string
format: date-time
description: End date for filtering opportunities (ISO format)
title: End Date
description: End date for filtering opportunities (ISO format)
- name: sort
in: query
required: false
schema:
type: string
default: cost_savings_max
title: Sort
- name: sort_order
in: query
required: false
schema:
type: string
default: desc
title: Sort Order
- name: instance_id
in: query
required: false
schema:
type: array
items:
type: string
title: Instance Id
- name: workspace_id
in: query
required: false
schema:
type: array
items:
type: string
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
title: Workspace Id
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Page_GetOpportunitiesDataResponse_'
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Get Opportunities Data Opportunities Get
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Get Opportunities Data Opportunities Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- OPPORTUNITIES
summary: Put Opportunities Data
description: "Update opportunities data in both PostgreSQL and ClickHouse databases and OS(TODO: to be removed).\n\nArgs:\n db: Database session for PostgreSQL access\n auth: Authentication token containing user info\n tenant: Tenant identifier\n tenant_alias: Alias for the tenant\n opportunities_data_request: Request containing opportunity changes\n client: OpenSearch client for legacy updates (TODO: to be removed)\n clickhouse_client: ClickHouse client for updating global_opportunities_aggregated table\n is_operation_allowed: Flag indicating if operation is allowed for tenant\n\nReturns:\n StandardResponse with status and optional message"
operationId: put_opportunities_data_opportunities__post
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PutOpportunitiesDataRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StandardResponse'
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Put Opportunities Data Opportunities Post
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Put Opportunities Data Opportunities Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/implemented:
get:
tags:
- OPPORTUNITIES
summary: Get Implemented Opportunities Data
description: 'List opportunities that were marked IMPLEMENTED.
Reads from the dedicated `implemented_opportunities` ClickHouse table
that survives the 1-month TTL on `individual_opportunities`. The main
GET `/opportunities/` endpoint is untouched — it still serves the
Active/Dismissed view from the original tables.'
operationId: get_implemented_opportunities_data_opportunities_implemented_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: page
in: query
required: true
schema:
type: integer
title: Page
- name: size
in: query
required: true
schema:
type: integer
title: Size
- name: effort
in: query
required: false
schema:
type: array
items:
type: string
title: Effort
- name: resource_name
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Name
- name: resource_type
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Type
- name: owner
in: query
required: false
schema:
type: array
items:
type: integer
title: Owner
- name: opportunity_name
in: query
required: false
schema:
type: array
items:
type: string
title: Opportunity Name
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
- name: sort
in: query
required: false
schema:
type: string
default: cost_savings_max
title: Sort
- name: sort_order
in: query
required: false
schema:
type: string
default: desc
title: Sort Order
- name: instance_id
in: query
required: false
schema:
type: array
items:
type: string
title: Instance Id
- name: user
in: query
required: false
schema:
type: array
items:
type: string
title: User
- name: warehouse
in: query
required: false
schema:
type: array
items:
type: string
title: Warehouse
- name: database
in: query
required: false
schema:
type: array
items:
type: string
title: Database
- name: schema
in: query
required: false
schema:
type: array
items:
type: string
title: Schema
- name: workspace_id
in: query
required: false
schema:
type: array
items:
type: string
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
title: Workspace Id
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Page_GetImplementedOpportunitiesDataResponse_'
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Get Implemented Opportunities Data Opportunities Implemented Get
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Get Implemented Opportunities Data Opportunities Implemented Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/priority:
get:
tags:
- OPPORTUNITIES
summary: Get Priority Opportunities Data
description: Top-N curated priority opportunities for the tenant (read-only).
operationId: get_priority_opportunities_data_opportunities_priority_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: workspace_id
in: query
required: false
schema:
type: array
items:
type: string
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
title: Workspace Id
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PriorityOpportunityResponse'
title: Response Get Priority Opportunities Data Opportunities Priority Get
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Get Priority Opportunities Data Opportunities Priority Get
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Get Priority Opportunities Data Opportunities Priority Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/detail:
get:
tags:
- OPPORTUNITIES
summary: Get Opportunity Detail Data
description: Hydrated single opportunity with comments and (for SE-authored priority opps) priority metadata.
operationId: get_opportunity_detail_data_opportunities_detail_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: opportunity_id
in: query
required: true
schema:
type: string
title: Opportunity Id
- name: instance_id
in: query
required: true
schema:
type: integer
title: Instance Id
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityDetailResponse'
'404':
description: Opportunity not found
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 404 Get Opportunity Detail Data Opportunities Detail Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/comments:
get:
tags:
- OPPORTUNITIES
summary: List Opportunity Comments
operationId: list_opportunity_comments_opportunities_comments_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: opportunity_id
in: query
required: true
schema:
type: string
title: Opportunity Id
- name: instance_id
in: query
required: true
schema:
type: integer
title: Instance Id
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CommentResponse'
title: Response List Opportunity Comments Opportunities Comments Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- OPPORTUNITIES
summary: Create Opportunity Comment
operationId: create_opportunity_comment_opportunities_comments_post
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddCommentRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CommentResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/comments/{comment_id}:
put:
tags:
- OPPORTUNITIES
summary: Edit Opportunity Comment
operationId: edit_opportunity_comment_opportunities_comments__comment_id__put
deprecated: true
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: comment_id
in: path
required: true
schema:
type: string
title: Comment Id
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCommentRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CommentResponse'
'403':
description: Only the comment author can edit this comment
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Edit Opportunity Comment Opportunities Comments Comment Id Put
'404':
description: Comment not found
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 404 Edit Opportunity Comment Opportunities Comments Comment Id Put
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- OPPORTUNITIES
summary: Remove Opportunity Comment
operationId: remove_opportunity_comment_opportunities_comments__comment_id__delete
deprecated: true
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: comment_id
in: path
required: true
schema:
type: string
title: Comment Id
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StandardResponse'
'403':
description: Only the comment author can delete this comment
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Remove Opportunity Comment Opportunities Comments Comment Id Delete
'404':
description: Comment not found
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 404 Remove Opportunity Comment Opportunities Comments Comment Id Delete
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/grouped:
get:
tags:
- OPPORTUNITIES
summary: Get Opportunities Grouped Data
operationId: get_opportunities_grouped_data_opportunities_grouped_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: effort
in: query
required: false
schema:
type: array
items:
type: string
title: Effort
- name: resource_name
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Name
- name: resource_type
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Type
- name: owner
in: query
required: false
schema:
type: array
items:
type: integer
title: Owner
- name: user
in: query
required: false
schema:
type: array
items:
type: string
title: User
- name: status
in: query
required: false
schema:
type: array
items:
type: string
title: Status
- name: opportunity_name
in: query
required: false
schema:
type: array
items:
type: string
title: Opportunity Name
- name: secondary_resource
in: query
required: false
schema:
type: array
items:
type: string
title: Secondary Resource
- name: warehouse
in: query
required: false
schema:
type: array
items:
type: string
title: Warehouse
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
description: Start date for filtering opportunities (ISO format)
title: Start Date
description: Start date for filtering opportunities (ISO format)
- name: end_date
in: query
required: true
schema:
type: string
format: date-time
description: End date for filtering opportunities (ISO format)
title: End Date
description: End date for filtering opportunities (ISO format)
- name: sort
in: query
required: false
schema:
type: string
default: cost_savings_max
title: Sort
- name: sort_order
in: query
required: false
schema:
type: string
default: desc
title: Sort Order
- name: instance_id
in: query
required: false
schema:
type: array
items:
type: string
title: Instance Id
- name: workspace_id
in: query
required: false
schema:
type: array
items:
type: string
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
title: Workspace Id
description: Databricks workspace IDs (multi-value). Sourced from the More-Filters Workspace chip; ignored on non-Databricks tenants.
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GroupedOpportunityResponse'
title: Response Get Opportunities Grouped Data Opportunities Grouped Get
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Get Opportunities Grouped Data Opportunities Grouped Get
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Get Opportunities Grouped Data Opportunities Grouped Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/opportunities/summary:
get:
tags:
- OPPORTUNITIES
summary: Get Opportunities Summary Data
description: 'Get opportunities data.
:param db: The database session for accessing the database.
:param auth: The authorization token for the request.
:return: ok status and optional message.'
operationId: get_opportunities_summary_data_opportunities_summary_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: effort
in: query
required: false
schema:
type: array
items:
type: string
title: Effort
- name: resource_name
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Name
- name: opportunity_name
in: query
required: false
schema:
type: array
items:
type: string
title: Opportunity Name
- name: resource_type
in: query
required: false
schema:
type: array
items:
type: string
title: Resource Type
- name: owner
in: query
required: false
schema:
type: array
items:
type: integer
title: Owner
- name: user
in: query
required: false
schema:
type: array
items:
type: string
title: User
- name: status
in: query
required: false
schema:
type: array
items:
type: string
title: Status
- name: secondary_resource
in: query
required: false
schema:
type: array
items:
type: string
title: Secondary Resource
- name: warehouse
in: query
required: false
schema:
type: array
items:
type: string
title: Warehouse
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
description: Start date for filtering opportunities (ISO format)
title: Start Date
description: Start date for filtering opportunities (ISO format)
- name: end_date
in: query
required: true
schema:
type: string
format: date-time
description: End date for filtering opportunities (ISO format)
title: End Date
description: End date for filtering opportunities (ISO format)
- name: instance_id
in: query
required: false
schema:
type: array
items:
type: string
title: Instance Id
- name: workspace_id
in: query
required: false
schema:
type: array
items:
type: string
description: Databricks workspace IDs (multi-value). Mirrors the list endpoint's workspace_id so summary tiles scope to the same selection.
title: Workspace Id
description: Databricks workspace IDs (multi-value). Mirrors the list endpoint's workspace_id so summary tiles scope to the same selection.
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GetOpportunitiesSummaryResponse'
title: Response Get Opportunities Summary Data Opportunities Summary Get
'400':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 400 Get Opportunities Summary Data Opportunities Summary Get
'403':
description: Not supported for public user
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response 403 Get Opportunities Summary Data Opportunities Summary Get
'422':
# --- truncated at 32 KB (80 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/altimate-ai/refs/heads/main/openapi/altimate-ai-opportunities-api-openapi.yml