Colour Memory Admin API
The Admin API from Colour Memory — 14 operation(s) for admin.
The Admin API from Colour Memory — 14 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/colourmemory-com:colourmemory-com-admin-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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: Colourmemory Com Admin API
version: 2.3.4
description: 'Operations tagged Admin across 2 of this provider''s published API definitions: colourmemory-com-openapi.json, colourmemory-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.colourmemory.com
description: Host serving this spec; also named as mcp_endpoint host in https://api.colourmemory.com/mcp discovery document (vendor PR Eye Ltd).
tags:
- name: Admin
paths:
/admin/queries:
get:
summary: Admin Queries
description: 'Return the last n queries in reverse-chronological order.
In-memory only -- resets on redeploy. Use for tester review.
Requires X-Admin-Key header matching ADMIN_SECRET env var.
Example: GET /admin/queries?n=50'
operationId: admin_queries_admin_queries_get
parameters:
- name: n
in: query
required: false
schema:
type: integer
default: 100
title: N
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/reliability:
get:
summary: Admin Reliability
description: 'Fix 9 (Session 2B-i): connections, distinct authenticated callers
(count only, never which keys), PDFs generated, top failure codes,
and schema hashes currently being served -- the last one is
specifically useful for checking this session''s own rollback
condition "more than one schema hash served by the same deployed
build" without a manual log query.
Admin-gated (same X-Admin-Key/ADMIN_SECRET pattern as /admin/queries)
and already rate-limited by the global RateLimitMiddleware every
non-/health route gets. Never returns individual API keys, IPs, or
prompt/argument content -- see get_reliability_stats()''s own
docstring in persistent_logs.py for exactly what is and isn''t queried.'
operationId: admin_reliability_admin_reliability_get
parameters:
- name: hours
in: query
required: false
schema:
type: integer
default: 24
title: Hours
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/project_migration_rehearsal:
post:
summary: Admin Project Migration Rehearsal
description: 'Session 2B-ii mandatory-checkpoint rehearsal -- exercises every
persistent_projects.py function (including the Gap 1 ownership fix)
against REHEARSAL_DATABASE_URL, NEVER the real DATABASE_URL. Refuses
to run at all if REHEARSAL_DATABASE_URL is unset, rather than silently
falling back to production. This process runs on the real Railway
service (inside its private network) specifically because railway run
cannot tunnel *.railway.internal DNS to a local machine -- see
persistent_projects.py''s own docstring on _DATABASE_URL_OVERRIDE.
Returns only pass/fail booleans and small derived facts (counts,
hashes, booleans) -- never a connection string, never full house_json
content, never a raw house_ref/project_id beyond what''s needed to
show one check succeeded.'
operationId: admin_project_migration_rehearsal_admin_project_migration_rehearsal_post
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/gap4_seed_and_rehearse:
post:
summary: Admin Gap4 Seed And Rehearse
description: 'Gap 4: seed a throwaway database with PRODUCTION''S REAL SCHEMA SHAPE
(table definitions only, obtained by the caller via a read-only
`pg_dump --schema-only` against production -- this endpoint never
touches production itself) BEFORE running the additive migration and
the full rehearsal suite against it. Proves the new tables don''t
collide with any real existing table/constraint/index name and that
init_projects_db() behaves identically alongside production''s actual
schema, not just an empty database.
Same REHEARSAL_DATABASE_URL-only safety rule as the sibling rehearsal
endpoint. schema_sql is applied ONCE per call (the caller is expected
to pass a fresh empty throwaway database each time -- this endpoint
does not attempt to make the seed step itself idempotent, since a
schema dump may contain plain CREATE TABLE, not CREATE TABLE IF NOT
EXISTS).'
operationId: admin_gap4_seed_and_rehearse_admin_gap4_seed_and_rehearse_post
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Gap4SeedRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/apply_project_type_migration:
post:
summary: Admin Apply Project Type Migration
description: 'Brand Standard: applies persistent_projects.migrate_widen_project_type_
constraint() to the REAL production DATABASE_URL. The deliberate
mirror-image safety rule of the rehearsal endpoints above (those
refuse to run UNLESS REHEARSAL_DATABASE_URL is set; this one refuses
to run if it IS set, since that would make it ambiguous whether the
call is meant to hit a rehearsal DB or real production -- this
endpoint''s whole purpose is targeting production once rehearsal has
already passed elsewhere).
Purely additive: widens chk_colour_projects_type from (''house'') to
(''house'', ''brand''). Touches zero existing rows -- no house_ref project
changes shape, gets re-validated, or is even read. Idempotent, safe to
call more than once. Rehearsed 39/39 against a throwaway Postgres
(see /admin/project_migration_rehearsal) before this endpoint is ever
invoked against production, per the same two-phase discipline as
Session 2B-ii''s own house_ref migration.'
operationId: admin_apply_project_type_migration_admin_apply_project_type_migration_post
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/apply_deletion_token_migration:
post:
summary: Admin Apply Deletion Token Migration
description: 'Release-hardening pass (2026-08-06): applies persistent_projects.
migrate_add_deletion_capability_token() to the REAL production
DATABASE_URL. Same mirror-image safety rule as
admin_apply_project_type_migration above (refuses to run if
REHEARSAL_DATABASE_URL is set, to avoid ambiguity about which
database is being targeted).
Purely additive: ADD COLUMN IF NOT EXISTS deletion_token_hash TEXT,
nullable. Touches zero existing rows'' data -- every existing project
(anonymous or authenticated) gets deletion_token_hash = NULL, which
can never match any supplied token, so nothing becomes retroactively
deletable by this migration alone. Idempotent, safe to call more than
once. Rehearsed against a throwaway Postgres (see
/admin/project_migration_rehearsal, which now also exercises the full
anonymous deletion-token create/wrong-token/correct-token/pre-
migration-NULL matrix) before this endpoint is ever invoked against
production.'
operationId: admin_apply_deletion_token_migration_admin_apply_deletion_token_migration_post
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/project_performance_rehearsal:
post:
summary: Admin Project Performance Rehearsal
description: 'Step 13: p50/p95 latency for project creation, resolution (both
identifiers), list, version retrieval, and PDF rendering via a
persisted reference -- against REHEARSAL_DATABASE_URL only, same
safety rule as /admin/project_migration_rehearsal. Uses a real
house_specify response (GeorgianPleasures, the same known-good
fixture verify_deploy.py uses) rather than a synthetic stub, so the
render-latency number reflects a genuinely renderable document, not
a trivial one. PROJECT_PERSISTENCE_PHASE stays whatever production
already has it set to (normally "off") throughout -- this measures
persistent_projects.py''s functions directly, never the phase-gated
HTTP endpoints, so it carries no risk of writing to a real customer
project regardless of the live phase value.'
operationId: admin_project_performance_rehearsal_admin_project_performance_rehearsal_post
parameters:
- name: n
in: query
required: false
schema:
type: integer
default: 20
title: N
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/project_cleanup:
post:
summary: Admin Project Cleanup
description: 'Step 9: bounded expiry cleanup for TEMPORARY (anonymous) projects only
-- deliberately NOT an automatic background thread (unlike the image
sweeper above). Manually triggered, admin-gated, batched, and
dry_run=True by default so an accidental call never deletes anything.
Authenticated projects (expires_at=NULL) are structurally unreachable
by this query -- see expire_anonymous_projects''s own docstring.'
operationId: admin_project_cleanup_admin_project_cleanup_post
parameters:
- name: batch_size
in: query
required: false
schema:
type: integer
default: 500
title: Batch Size
- name: dry_run
in: query
required: false
schema:
type: boolean
default: true
title: Dry Run
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/keys:
get:
summary: Admin Keys
description: 'Owner-only: all active keys and usage. Reads from Postgres. Requires X-Admin-Key header.'
operationId: admin_keys_admin_keys_get
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/diagnostics/preflight-negative-test:
post:
summary: Preflight Negative Test
description: 'Deterministically triggers a REAL bounds-check failure through the
actual production renderer (a 60-character unbroken title, which
Session 2A-i.1''s regression suite confirmed reliably exceeds the
page width since titles are character-sliced, not width-checked) --
not a mocked response, not a manifest-mutation shortcut. Confirms the
full pipeline (render -> preflight -> fail closed) behaves exactly
like the public path would on equivalently bad input, and that
_deliver_pdf (and therefore the R2 upload it performs) is never
reached: the early return on a failed preflight is structural, not
conditional, so no upload is attempted here by construction.'
operationId: preflight_negative_test_admin_diagnostics_preflight_negative_test_post
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Admin
/admin/stats:
get:
tags:
- Admin
summary: Get Stats
operationId: get_stats_admin_stats_get
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/mcp:
get:
tags:
- Admin
summary: Get Mcp
operationId: get_mcp_admin_mcp_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
default: 100
title: Limit
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/expire-logs:
get:
tags:
- Admin
summary: Expire Logs
description: 'Security fix (2026-09-02), part 2 -- query_log/mcp_log retention.
dry_run defaults to TRUE: reports what would be deleted, deletes
nothing. Pass dry_run=false to actually delete. Same
report-then-confirm discipline as /admin/expire-anonymous-projects.
The real purge does not depend on this endpoint: main.py''s
_start_retention_job runs expire_old_logs(90, dry_run=False) daily.
Use this for a manual dry-run report.'
operationId: expire_logs_admin_expire_logs_get
parameters:
- name: retention_days
in: query
required: false
schema:
type: integer
default: 90
title: Retention Days
- name: dry_run
in: query
required: false
schema:
type: boolean
default: true
title: Dry Run
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/intelligence:
get:
tags:
- Admin
summary: Get Intelligence
operationId: get_intelligence_admin_intelligence_get
parameters:
- name: x-admin-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Admin-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
Gap4SeedRequest:
properties:
schema_sql:
type: string
title: Schema Sql
type: object
required:
- schema_sql
title: Gap4SeedRequest
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
x-refined-from:
- colourmemory-com-openapi.json
- colourmemory-com-openapi.yml