CoreStory Admin API
The admin API from CoreStory — 6 operation(s) for admin.
The admin API from CoreStory — 6 operation(s) for admin.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/corestory-admin-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Crowdbotics API Documentation Admin API
description: '# CoreStory API Overview
The CoreStory API provides programmatic access to structured insights derived from software source code.'
version: 1.26.2
servers:
- url: /
description: Current server
security:
- BearerAuth: []
tags:
- name: Admin
paths:
/api/admin/config:
get:
tags:
- Admin
summary: Get admin configuration
description: View current application configuration settings. Requires CoreStory internal access.
operationId: get_admin_config_api_admin_config_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Get Admin Config Api Admin Config Get
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
/api/admin/metrics:
get:
tags:
- Admin
summary: Get admin metrics
description: Retrieve application-wide admin metrics including usage statistics. Requires CoreStory internal access.
operationId: get_app_admin_metrics_api_admin_metrics_get
parameters:
- name: date_range
in: query
required: false
schema:
anyOf:
- enum:
- all
- 30d
- 3m
- 6m
type: string
- type: 'null'
description: 'Date range for activity-based metrics: all, 30d, 3m, 6m. Defaults to all when None.'
title: Date Range
description: 'Date range for activity-based metrics: all, 30d, 3m, 6m. Defaults to all when None.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AdminMetricsResponse'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
/api/admin/organizations:
get:
tags:
- Admin
summary: List all organizations
description: List all organizations with summary info. Restricted to superusers.
operationId: list_all_organizations_api_admin_organizations_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: Maximum number of results
default: 20
title: Limit
description: Maximum number of results
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Number of results to skip
default: 0
title: Offset
description: Number of results to skip
- name: search
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter organizations by name (case-insensitive)
title: Search
description: Filter organizations by name (case-insensitive)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AdminOrganizationListResponse'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
/api/admin/users:
get:
tags:
- Admin
summary: List platform users
description: List all Clerk users with role metadata (is_superuser, is_internal). Supports pagination and optional free-text search by name or email. Restricted to superusers.
operationId: list_platform_users_api_admin_users_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
description: Page size (max 100 to respect Clerk rate limits)
default: 20
title: Limit
description: Page size (max 100 to respect Clerk rate limits)
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Number of results to skip
default: 0
title: Offset
description: Number of results to skip
- name: search
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Free-text search across name, email, username
title: Search
description: Free-text search across name, email, username
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserListResponse'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
/api/admin/users/{user_id}/metadata:
patch:
tags:
- Admin
summary: Update user role metadata
description: Partially update a user's Clerk public metadata (is_superuser, is_internal). Only provided fields are updated; others are preserved. Restricted to superusers.
operationId: update_user_metadata_api_admin_users__user_id__metadata_patch
parameters:
- name: user_id
in: path
required: true
schema:
type: string
title: User Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserMetadataUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUserSummary'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
/api/admin/pipeline-metrics:
get:
tags:
- Admin
summary: Get pipeline run metrics by repo URL
description: Returns timing metrics for all projects matching the given repo URL. Useful for tracking pipeline performance trends over time.
operationId: get_pipeline_metrics
parameters:
- name: repo_url
in: query
required: true
schema:
type: string
minLength: 1
pattern: \S
description: Repo URL fragment to filter projects on (e.g. 'aws-mainframe-modernization-carddemo.git').
title: Repo Url
description: Repo URL fragment to filter projects on (e.g. 'aws-mainframe-modernization-carddemo.git').
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PipelineMetricsResponse'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorSchema'
components:
schemas:
PipelineRunMetrics:
properties:
project_id:
type: integer
title: Project Id
project_name:
type: string
title: Project Name
created_at:
type: string
format: date-time
title: Created At
dispatch_delay_seconds:
anyOf:
- type: number
- type: 'null'
title: Dispatch Delay Seconds
description: Time between project creation and ingestion start.
ingestion_duration_seconds:
anyOf:
- type: number
- type: 'null'
title: Ingestion Duration Seconds
description: Full ingestion duration in seconds.
prd_generation_seconds:
anyOf:
- type: number
- type: 'null'
title: Prd Generation Seconds
description: PRD generation time in seconds.
tech_spec_generation_seconds:
anyOf:
- type: number
- type: 'null'
title: Tech Spec Generation Seconds
description: Tech spec generation time in seconds.
total_pipeline_seconds:
anyOf:
- type: number
- type: 'null'
title: Total Pipeline Seconds
description: Sum of dispatch delay + ingestion + PRD + tech spec durations.
ingestion_llm_model:
anyOf:
- type: string
- type: 'null'
title: Ingestion Llm Model
description: LLM model used during ingestion.
ingestion_llm_provider:
anyOf:
- type: string
- type: 'null'
title: Ingestion Llm Provider
description: LLM provider used during ingestion.
ingestion_embedding_model:
anyOf:
- type: string
- type: 'null'
title: Ingestion Embedding Model
description: Embedding model used during ingestion.
prd_llm_model:
anyOf:
- type: string
- type: 'null'
title: Prd Llm Model
description: LLM model used for PRD generation.
prd_llm_provider:
anyOf:
- type: string
- type: 'null'
title: Prd Llm Provider
description: LLM provider used for PRD generation.
prd_embedding_model:
anyOf:
- type: string
- type: 'null'
title: Prd Embedding Model
description: Embedding model used for PRD generation.
prd_use_dga_pipeline:
anyOf:
- type: boolean
- type: 'null'
title: Prd Use Dga Pipeline
description: Whether DGA pipeline was used for PRD.
tech_spec_llm_model:
anyOf:
- type: string
- type: 'null'
title: Tech Spec Llm Model
description: LLM model used for tech spec generation.
tech_spec_llm_provider:
anyOf:
- type: string
- type: 'null'
title: Tech Spec Llm Provider
description: LLM provider used for tech spec generation.
tech_spec_embedding_model:
anyOf:
- type: string
- type: 'null'
title: Tech Spec Embedding Model
description: Embedding model used for tech spec generation.
tech_spec_use_dga_pipeline:
anyOf:
- type: boolean
- type: 'null'
title: Tech Spec Use Dga Pipeline
description: Whether DGA pipeline was used for tech spec.
user_stories_count:
anyOf:
- type: integer
- type: 'null'
title: User Stories Count
description: Number of user stories generated during PRD.
type: object
required:
- project_id
- project_name
- created_at
title: PipelineRunMetrics
description: Timing metrics for a single pipeline run.
TokenTotals:
properties:
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
total_tokens:
type: integer
title: Total Tokens
type: object
required:
- input_tokens
- output_tokens
- total_tokens
title: TokenTotals
AdminOrganizationOwner:
properties:
name:
type: string
title: Name
description: Owner full name
email:
type: string
title: Email
description: Owner email
type: object
required:
- name
- email
title: AdminOrganizationOwner
description: Owner summary resolved from the org:owner membership.
AdminMetricsPrimaryLanguages:
properties:
counts:
items:
additionalProperties: true
type: object
type: array
title: Counts
type: object
required:
- counts
title: AdminMetricsPrimaryLanguages
ErrorSchema:
properties:
error:
$ref: '#/components/schemas/ErrorBody'
type: object
required:
- error
title: ErrorSchema
AdminMetricsConversations:
properties:
total_conversations:
type: integer
title: Total Conversations
conversations_per_project:
$ref: '#/components/schemas/MinMaxAvg'
messages_per_conversation:
$ref: '#/components/schemas/MinMaxAvg'
type: object
required:
- total_conversations
- conversations_per_project
- messages_per_conversation
title: AdminMetricsConversations
AdminUserSummary:
properties:
id:
type: string
title: Id
description: Clerk user ID
first_name:
anyOf:
- type: string
- type: 'null'
title: First Name
description: User first name
last_name:
anyOf:
- type: string
- type: 'null'
title: Last Name
description: User last name
email:
anyOf:
- type: string
- type: 'null'
title: Email
description: Primary email address
created_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Created At
description: Account creation date
is_superuser:
type: boolean
title: Is Superuser
description: Superuser flag from Clerk public metadata
default: false
is_internal:
type: boolean
title: Is Internal
description: Internal employee flag from Clerk public metadata
default: false
type: object
required:
- id
title: AdminUserSummary
description: Summary of a Clerk user for the admin listing endpoint.
AdminUserMetadataUpdate:
properties:
is_superuser:
anyOf:
- type: boolean
- type: 'null'
title: Is Superuser
description: Grant or revoke superuser privileges
is_internal:
anyOf:
- type: boolean
- type: 'null'
title: Is Internal
description: Mark or unmark as CoreStory internal employee
type: object
title: AdminUserMetadataUpdate
description: Partial update payload for user role metadata.
AdminMetricsCodeIngestion:
properties:
loc_stats:
$ref: '#/components/schemas/MinMaxAvg'
files_ingested_stats:
$ref: '#/components/schemas/MinMaxAvg'
source_type_counts:
items:
additionalProperties: true
type: object
type: array
title: Source Type Counts
unsupported_file_counts_stats:
$ref: '#/components/schemas/MinMaxAvg'
type: object
required:
- loc_stats
- files_ingested_stats
- source_type_counts
- unsupported_file_counts_stats
title: AdminMetricsCodeIngestion
AdminMetricsUsersOrgs:
properties:
users_per_org:
items:
additionalProperties: true
type: object
type: array
title: Users Per Org
single_user_org_count:
type: integer
title: Single User Org Count
projects_per_org_stats:
$ref: '#/components/schemas/MinMaxAvg'
top_orgs_by_project_count:
items:
$ref: '#/components/schemas/TopCountRow'
type: array
title: Top Orgs By Project Count
top_users_by_projects_created:
items:
$ref: '#/components/schemas/TopCountRow'
type: array
title: Top Users By Projects Created
type: object
required:
- users_per_org
- single_user_org_count
- projects_per_org_stats
- top_orgs_by_project_count
- top_users_by_projects_created
title: AdminMetricsUsersOrgs
AdminMetricsResponse:
properties:
kpis:
$ref: '#/components/schemas/AdminMetricsKPIs'
tokens:
$ref: '#/components/schemas/AdminMetricsTokens'
users_orgs:
$ref: '#/components/schemas/AdminMetricsUsersOrgs'
project_performance:
$ref: '#/components/schemas/AdminMetricsProjectPerformance'
code_ingestion:
$ref: '#/components/schemas/AdminMetricsCodeIngestion'
data_audit_totals:
$ref: '#/components/schemas/AdminMetricsDataAuditTotals'
conversations:
$ref: '#/components/schemas/AdminMetricsConversations'
jobs:
$ref: '#/components/schemas/AdminMetricsJobs'
user_stories_buckets:
items:
$ref: '#/components/schemas/UserStoriesBucket'
type: array
title: User Stories Buckets
prd_version_buckets:
items:
$ref: '#/components/schemas/PrdVersionBucket'
type: array
title: Prd Version Buckets
projects_per_org_buckets:
items:
$ref: '#/components/schemas/ProjectsPerOrgBucket'
type: array
title: Projects Per Org Buckets
primary_languages:
$ref: '#/components/schemas/AdminMetricsPrimaryLanguages'
credit_usage:
$ref: '#/components/schemas/AdminMetricsCreditUsage'
type: object
required:
- kpis
- tokens
- users_orgs
- project_performance
- code_ingestion
- data_audit_totals
- conversations
- jobs
- user_stories_buckets
- prd_version_buckets
- projects_per_org_buckets
- primary_languages
- credit_usage
title: AdminMetricsResponse
BalanceRow:
properties:
id:
type: string
title: Id
name:
anyOf:
- type: string
- type: 'null'
title: Name
amount:
type: number
title: Amount
pct:
type: number
title: Pct
type: object
required:
- id
- name
- amount
- pct
title: BalanceRow
description: Organization balance with remaining credits and percentage remaining.
TopAmountRow:
properties:
id:
type: string
title: Id
name:
anyOf:
- type: string
- type: 'null'
title: Name
amount:
type: number
title: Amount
type: object
required:
- id
- name
- amount
title: TopAmountRow
description: Like TopCountRow but with a decimal amount instead of an integer count.
AdminMetricsProjectPerformance:
properties:
ingestion_seconds:
$ref: '#/components/schemas/MinMaxAvg'
default:
min: 0.0
max: 0.0
avg: 0.0
prd_seconds:
$ref: '#/components/schemas/MinMaxAvg'
default:
min: 0.0
max: 0.0
avg: 0.0
tech_spec_seconds:
$ref: '#/components/schemas/MinMaxAvg'
default:
min: 0.0
max: 0.0
avg: 0.0
type: object
title: AdminMetricsProjectPerformance
PrdVersionBucket:
properties:
bucket:
type: string
title: Bucket
prd_count:
type: integer
title: Prd Count
type: object
required:
- bucket
- prd_count
title: PrdVersionBucket
description: Bucket for PRD version count histogram.
AdminMetricsCreditUsage:
properties:
total_credits_used:
type: number
title: Total Credits Used
top_orgs_by_credits_used:
items:
$ref: '#/components/schemas/TopAmountRow'
type: array
title: Top Orgs By Credits Used
top_orgs_lowest_remaining_balance:
items:
$ref: '#/components/schemas/BalanceRow'
type: array
title: Top Orgs Lowest Remaining Balance
top_orgs_highest_remaining_balance:
items:
$ref: '#/components/schemas/BalanceRow'
type: array
title: Top Orgs Highest Remaining Balance
usage_by_action_type:
items:
$ref: '#/components/schemas/CreditUsageByAction'
type: array
title: Usage By Action Type
type: object
required:
- total_credits_used
- top_orgs_by_credits_used
- top_orgs_lowest_remaining_balance
- top_orgs_highest_remaining_balance
- usage_by_action_type
title: AdminMetricsCreditUsage
description: Credit (CIU) usage section for admin metrics.
AdminMetricsDataAuditTotals:
properties:
users:
type: integer
title: Users
non_corestory_users:
type: integer
title: Non Corestory Users
organizations:
type: integer
title: Organizations
github_installations:
type: integer
title: Github Installations
projects:
type: integer
title: Projects
sotj_jobs:
type: integer
title: Sotj Jobs
prds:
type: integer
title: Prds
prd_versions:
type: integer
title: Prd Versions
prd_multi_version_pct:
type: number
title: Prd Multi Version Pct
conversations:
type: integer
title: Conversations
custom_prompts:
type: integer
title: Custom Prompts
type: object
required:
- users
- non_corestory_users
- organizations
- github_installations
- projects
- sotj_jobs
- prds
- prd_versions
- prd_multi_version_pct
- conversations
- custom_prompts
title: AdminMetricsDataAuditTotals
AdminUserListResponse:
properties:
items:
items:
$ref: '#/components/schemas/AdminUserSummary'
type: array
title: Items
description: List of user summaries
total:
type: integer
title: Total
description: Total number of users
limit:
type: integer
title: Limit
description: Page size
offset:
type: integer
title: Offset
description: Current offset
type: object
required:
- items
- total
- limit
- offset
title: AdminUserListResponse
description: Paginated response for admin user listing.
PipelineMetricsResponse:
properties:
repo_url:
type: string
title: Repo Url
description: The repo URL fragment used to filter projects.
total_runs:
type: integer
title: Total Runs
runs:
items:
$ref: '#/components/schemas/PipelineRunMetrics'
type: array
title: Runs
description: Pipeline runs ordered by created_at ascending.
type: object
required:
- repo_url
- total_runs
- runs
title: PipelineMetricsResponse
description: Response for the pipeline metrics endpoint.
MinMaxAvg:
properties:
min:
anyOf:
- type: number
- type: 'null'
title: Min
default: 0
max:
anyOf:
- type: number
- type: 'null'
title: Max
default: 0
avg:
anyOf:
- type: number
- type: 'null'
title: Avg
default: 0
type: object
title: MinMaxAvg
AdminOrganizationSummary:
properties:
organization_id:
type: string
title: Organization Id
description: Internal organization UUID
organization_name:
type: string
title: Organization Name
description: Organization name
plan_tier:
type: string
title: Plan Tier
description: 'Plan tier: free / pro / enterprise'
default: free
subscription_status:
type: string
title: Subscription Status
description: 'Subscription status: active / suspended / canceled / none'
default: none
owner:
anyOf:
- $ref: '#/components/schemas/AdminOrganizationOwner'
- type: 'null'
description: Organization owner, null if no org:owner exists
members_count:
type: integer
title: Members Count
description: Number of members
default: 0
projects_count:
type: integer
title: Projects Count
description: Number of projects
default: 0
created_at:
type: string
format: date-time
title: Created At
description: Organization creation date
type: object
required:
- organization_id
- organization_name
- created_at
title: AdminOrganizationSummary
description: Summary of an organization for the admin listing endpoint.
TopCountRow:
properties:
id:
type: string
title: Id
name:
anyOf:
- type: string
- type: 'null'
title: Name
count:
type: integer
title: Count
type: object
required:
- id
- name
- count
title: TopCountRow
AdminMetricsKPIs:
properties:
total_users:
type: integer
title: Total Users
total_organizations:
type: integer
title: Total Organizations
total_projects:
type: integer
title: Total Projects
active_projects_30d:
type: integer
title: Active Projects 30D
total_loc_ingested:
type: integer
title: Total Loc Ingested
total_files_ingested:
type: integer
title: Total Files Ingested
type: object
required:
- total_users
- total_organizations
- total_projects
- active_projects_30d
- total_loc_ingested
- total_files_ingested
title: AdminMetricsKPIs
AdminMetricsTokens:
properties:
all_time:
$ref: '#/components/schemas/TokenTotals'
last_30d:
$ref: '#/components/schemas/TokenTotals'
per_project:
$ref: '#/components/schemas/MinMaxAvg'
type: object
required:
- all_time
- last_30d
- per_project
title: AdminMetricsTokens
ErrorBody:
properties:
message:
type: string
title: Message
type:
type: string
title: Type
details:
additionalProperties: true
type: object
title: Details
description: Optional extra context for the error.
type: object
required:
- message
- type
title: ErrorBody
AdminMetricsJobs:
properties:
total_jobs:
type: integer
title: Total Jobs
not_started:
type: integer
title: Not Started
running:
type: integer
title: Running
failed_jobs_by_type:
items:
additionalProperties: true
type: object
type: array
title: Failed Jobs By Type
type: object
required:
- total_jobs
- not_started
- running
- failed_jobs_by_type
title: AdminMetricsJobs
AdminOrganizationListResponse:
properties:
items:
items:
$ref: '#/components/schemas/AdminOrganizationSummary'
type: array
title: Items
description: List of organization summaries
total:
type: integer
title: Total
description: Total number of organizations
limit:
type: integer
title: Limit
description: Page size
offset:
type: integer
title: Offset
description: Current offset
type: object
required:
- items
- total
- limit
- offset
title: AdminOrganizationListResponse
description: Paginated response for admin organization listing.
ProjectsPerOrgBucket:
properties:
bucket:
type: string
title: Bucket
org_count:
type: integer
title: Org Count
type: object
required:
- bucket
- org_count
title: ProjectsPerOrgBucket
description: Bucket for projects per organization histogram.
UserStoriesBucket:
properties:
bucket:
type: string
title: Bucket
count:
type: integer
title: Count
type: object
required:
- bucket
- count
title: UserStoriesBucket
description: Bucket for user stories per project histogram.
CreditUsageByAction:
properties:
action_type:
type: string
title: Action Type
total_amount:
type: number
title: Total Amount
percentage:
type: number
title: Percentage
type: object
required:
- action_type
- total_amount
- percentage
title: CreditUsageByAction
description: Breakdown of credit usage by action type (for pie chart).
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Enter the Bearer token from Clerk authentication
x-tagGroups:
- name: Ingest Your Codebase
tags:
- vector_store
- projects
- pre_ingestion
- reingestion
- name: Generate Code Intelligence
tags:
- documents
- document_generation
- document_formatters
- prd
- prd_version
- tech_spec
- quality_metrics
- sample_projects
- name: Query Your Codebase
tags:
- conversations
- workflows
- discovery
- context
- artifacts
- name: Manage and Inspect Intelligence
tags:
- api_debugging
- events
- version
- files
- cache
- token_tracking
- name: Authenticate and Manage Access
tags:
- clerk_authentication
- github_webhooks
- github_integration
- organizations
- api_key_management
- mcp_token_management
- user
- name: (Advanced) Prompt Tuning
tags:
- prompts
- name: MCP Protocol
tags:
- mcp_protocol
- name: Administration
tags:
- admin