🔒

Insights Manager

Enter password to continue

Insights Manager

Connected
|
TypePortfolioVPrompt PreviewStatusByActions

Loading...

|
ModuleQueryPortfolioSQL PreviewStatusOrderActions

Loading...

|
NameProviderModelPortfolioModeStatusActions

Loading...

How per-client LLM configuration works

Resolution order: When generating insights for a portfolio, the system picks the LLM in this priority:

  1. Portfolio-specific — if there's an active provider with portfolio = "client-name", use it
  2. Global default — if no portfolio match, use the active provider with portfolio = (empty)
  3. Hardcoded fallback — if Supabase is unreachable, use Vertex AI with GCP service account

To set up a client with their own LLM:

  1. Click "+ New Provider"
  2. Set the Portfolio field to the client's portfolio name (e.g. "centuria")
  3. Choose their provider (OpenAI, Anthropic, etc.) and enter their API key
  4. Set to Active — this client now uses their own LLM, everyone else uses the global default

Important: Only one global default (portfolio = empty) should be active at a time. Multiple active defaults cause unpredictable behavior.

NameLabelDescriptionStatusCreatedActions

Loading...

How to set up a new module

  1. Create the module here (name + label)
  2. Go to Prompts tab → create a system prompt with insight_type = your module name
  3. Go to SQL Queries tab → add BigQuery queries with module = your module name
  4. Test via Test / Execute tab → select your module and run Generate

Select Insight

Available Dates

Select filters and click "Load Insights"
Select a date from the left panel to view the insight
|
PortfolioAPI KeyDescriptionStatusCreated ByCreatedActions

Loading...

|
NameModulePortfolioEnvScheduleStatusLast RunNext RunActions

Loading...

Configuration

Active Config for this Portfolio

Click "Load Active Config" to see what prompt, SQL queries, and LLM provider are active for the selected module + portfolio.

Active Prompt Preview

No config loaded yet

Active SQL Queries

0 queries
No config loaded yet

Response

No request
Click "Execute" to send a request...

API Reference

Base URL: https://insights.ility.com

All endpoints require a key parameter for authentication and a module parameter to specify the insight type. Modules are dynamic — add new ones in the Modules tab.

GET /get_insights

Retrieve insights for any module. Supports 4 modes: latest (default), specific date, date range, or list available dates. Works with any registered module (portfolio, tenants, revenue, or custom).

Parameter Type Required Description
keystringYesAPI key
modulestringYesModule name (e.g. "portfolio", "tenants", "revenue", "work-order")
portfoliostringYesPortfolio name (e.g. "centuria")
envstringYes"stg" or "prod"
data_datestringNoYYYY-MM-DD — get insight for a specific date
start_datestringNoYYYY-MM-DD — start of date range (use with end_date)
end_datestringNoYYYY-MM-DD — end of date range (use with start_date)
dates_onlybooleanNo"true" — returns only the list of available dates
# Latest insight for a module
curl "BASE_URL/get_insights?key=YOUR_KEY&module=portfolio&portfolio=centuria&env=prod"

# Specific date
curl "BASE_URL/get_insights?key=YOUR_KEY&module=portfolio&portfolio=centuria&env=prod&data_date=2026-04-07"

# List available dates
curl "BASE_URL/get_insights?key=YOUR_KEY&module=portfolio&portfolio=centuria&env=prod&dates_only=true"

# Date range
curl "BASE_URL/get_insights?key=YOUR_KEY&module=portfolio&portfolio=centuria&env=prod&start_date=2026-04-01&end_date=2026-04-07"

# Custom module (e.g. work-order)
curl "BASE_URL/get_insights?key=YOUR_KEY&module=work-order&portfolio=centuria&env=prod"
GET /get_scores

Returns insight scores in card format (e.g. tenant renewal scores). Pass the module via query param.

curl "BASE_URL/get_scores?key=YOUR_KEY&module=tenants&portfolio=centuria&env=prod"
POST /generate_insights

Generate insights for any module from BigQuery data via LLM. If insights for today already exist, returns them with already_exists: true unless force: true is set. Works with any registered module.

Body Parameter Type Required Description
keystringYesAPI key
modulestringYesModule name (e.g. "portfolio", "tenants", "work-order")
portfoliostringYesPortfolio name
envstringYes"stg" or "prod"
forcebooleanNotrue = regenerate even if today's insights exist
tenantsstringNoComma-separated tenant names (filters BQ queries)
# Generate portfolio insights
curl -X POST "BASE_URL/generate_insights" \
  -H "Content-Type: application/json" \
  -d '{"key":"YOUR_KEY","module":"portfolio","portfolio":"centuria","env":"prod"}'

# Force regenerate (bypass duplicate check)
curl -X POST "BASE_URL/generate_insights" \
  -H "Content-Type: application/json" \
  -d '{"key":"YOUR_KEY","module":"portfolio","portfolio":"centuria","env":"prod","force":true}'

# Generate custom module
curl -X POST "BASE_URL/generate_insights" \
  -H "Content-Type: application/json" \
  -d '{"key":"YOUR_KEY","module":"work-order","portfolio":"centuria","env":"prod"}'
POST /upload_and_analyse_file

Upload a file (or send JSON/text data) with an analysis prompt. Returns a structured report or email via LLM. Supports multipart form-data with optional file attachment.

Form Field Type Required Description
keystringYesAPI key (form field or header)
promptstringYesAnalysis prompt (min 5 words, 20 chars). Can be plain text or JSON data.
filefileNoFile upload (max 2MB). Supported: CSV, XLSX, XLS, PDF, TXT, DOC, DOCX, RTF, PNG, JPG
typestringNo"report" (default) or "email"
output_formatstringNo"html" (default) or "json". HTML returns rendered report; JSON returns structured data.
model_idstringNoOverride LLM model (e.g. "gemini-2.5-flash"). Must be in allowlist.
max_output_tokensintegerNoMax response tokens (default: 4096, cap: 4096)
# Report with file upload
curl -X POST "BASE_URL/upload_and_analyse_file" \
  -F "key=YOUR_KEY" \
  -F "prompt=Analyse this data and generate a summary with key metrics and risks" \
  -F "type=report" \
  -F "output_format=json" \
  -F "file=@data.csv"

# Email from JSON data (no file)
curl -X POST "BASE_URL/upload_and_analyse_file" \
  -F "key=YOUR_KEY" \
  -F 'prompt=[{"name":"Alice","score":92},{"name":"Bob","score":74}]' \
  -F "type=email" \
  -F "output_format=json"

# Report with S3 file references in prompt
curl -X POST "BASE_URL/upload_and_analyse_file" \
  -F "key=YOUR_KEY" \
  -F 'prompt=[{"bucket":"my-bucket","awsKey":"data/report.csv","type":"csv"}]' \
  -F "type=report" \
  -F "output_format=json"
POST /compare_insights

Compare insights across multiple dates using AI. Accepts 2-10 insight IDs and returns a structured comparison with trends, improvements, deteriorations, and recommendations.

Body Parameter Type Required Description
keystringYesAPI key
modulestringYesModule name (e.g. "portfolio", "work-order")
portfoliostringYesPortfolio name
envstringYes"stg" or "prod"
insight_idsarrayYesArray of 2-10 insight UUIDs to compare
curl -X POST "BASE_URL/compare_insights" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "YOUR_KEY",
    "module": "portfolio",
    "portfolio": "centuria",
    "env": "prod",
    "insight_ids": ["uuid-1", "uuid-2"]
  }'
GET /modules

List all active insight modules. No authentication required. Use this to discover available module names for other endpoints.

curl "BASE_URL/modules"

# Response:
# [
#   {"name": "portfolio", "label": "Portfolio", "description": "...", "is_active": true},
#   {"name": "tenants", "label": "Tenants", "description": "...", "is_active": true},
#   {"name": "revenue", "label": "Revenue", "description": "...", "is_active": true},
#   {"name": "work-order", "label": "Work Orders", "description": "...", "is_active": true}
# ]
GET /schedules | POST /schedules

Manage scheduled insight generation jobs. GET lists all schedules. POST creates a new one. Works with any registered module.

POST Body Type Required Description
namestringYesSchedule name
insight_typestringYesModule name (e.g. "portfolio", "work-order")
portfoliostringYesPortfolio name
envstringYes"stg" or "prod"
cron_expressionstringYes5-field cron: "0 2 * * *" = daily at 2 AM
is_activebooleanNoDefault: true

Additional endpoints: PUT /schedules/<id> (update), DELETE /schedules/<id> (delete), POST /schedules/<id>/run (trigger now).

EMBED /embed.html

Standalone embeddable page for iframes. Displays the latest insight with a date picker for historical browsing. Works with any registered module. Each portfolio + module combination gets a unique URL.

URL Param Required Description
keyYesAPI key
portfolioYesPortfolio name
moduleNo"portfolio" (default) or any registered module name
envNo"prod" (default) or "stg"
<!-- Portfolio insights for Centuria -->
<iframe
  src="BASE_URL/embed.html?key=YOUR_KEY&portfolio=centuria&module=portfolio&env=prod"
  width="100%" height="800" frameborder="0"
  style="border-radius: 12px; border: 1px solid #e2e4eb;"
></iframe>

<!-- Custom module (e.g. work orders) -->
<iframe
  src="BASE_URL/embed.html?key=YOUR_KEY&portfolio=centuria&module=work-order&env=prod"
  width="100%" height="800" frameborder="0"
></iframe>