ICD (/infra) API Parameter Review

Source: services/config_app/src/web/infra.py + services/config_app/src/model/pModel.py. Gateway prefix: /config/infra/*.
Pass — Client should send this value in the request.
Internal — Server should derive / default / generate this; client should not send.
Auth-derived — Comes from the JWT (tenant context); never client-controlled.
Mark each field, add notes in the last column, then Print/Save PDF.

/infra/company  — Company (tenant) records

GET /infra/company

List companies. DORI_ADMIN sees all; other roles see only their own tenant.
No parameters.

POST /infra/company

Create a company; optionally also create its first DORI_ADMIN user in the same transaction (ICD onboarding flow). Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_idstroptionalHandler slugifies from name when omitted.
namestrrequired—
display_namestroptional—
last_runintoptional—
ux_configstroptional—
service_bundle_idsint[]optionalAccepted but not persisted (no company↔service_bundle junction yet).
admin_emailEmailStroptionalICD onboarding: triggers DORI_ADMIN user creation.
admin_passwordstrconditionalRequired when admin_email is set.
admin_first_namestroptional—
admin_last_namestroptional—
admin_phonestroptional—

DELETE /infra/company/{company_id}

Delete a company. Path param only. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (path)intrequired—

/infra/user  — Platform-wide user management

GET /infra/user?company_id=

List users across every company; ?company_id= filters to one tenant. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (query)intoptionalFilter.

POST /infra/user

Create a user under any company. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_idintrequiredTarget company.
emailEmailStrrequiredAlso used as user_id server-side.
passwordstrrequiredHashed server-side.
first_namestroptional—
last_namestroptional—
phonestroptional—
user_rolestroptionaldefault = "DORI_ADMIN"
is_activebool—Hard-coded True server-side. — server-set —
is_confirmedbool—Hard-coded True server-side. — server-set —

DELETE /infra/user/{user_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
user_id (path)intrequired—

/infra/credentials  — AWS credentials (per company)

GET /infra/credentials?company_id=

Auth: ADMIN. company_id only usable by DORI_ADMIN; tenant admin's is auth-derived.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (query)intoptional (DORI_ADMIN only)Tenant admin — server derives from JWT.

POST /infra/credentials?company_id=

Upsert. Auth: ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (query)intoptional (DORI_ADMIN only)Tenant admin — auth-derived.
access_key_idstroptional—
secret_access_keystroptional—
regionstroptional—
bucketstroptional—
file_pathstroptional—

/infra/mlc  — MLC (the compute node entity)

GET /infra/mlc

List all MLCs with attached configs. No parameters.

POST /infra/mlc

Create an MLC. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
namestrrequired—
urlstrrequired—
statusstroptional—
callback_urlstroptional—
mount_pointstroptional—
auth_tokenstroptional—
deployment_idstroptional—
sort_orderintoptional—
model_classstroptional—
instance_typestroptional—
is_activebooloptionaldefault = True
service_bundle_idintoptionalFK
max_capacityintoptionaldefault = 10
current_capacityintoptionaldefault = 0
is_deployedbooloptionaldefault = False
is_configuredbooloptionaldefault = False
poll_countintoptionaldefault = 0
media_server_urlstroptional—

DELETE /infra/mlc/{mlc_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
mlc_id (path)intrequired—

/infra/mlc_config  — MLC tuning knobs (platform-level)

GET /infra/mlc_config?mlc_id=&company_id=

List configs; optional filters.
FieldTypeReq/OptDefault / Notes PassInternalNotes
mlc_id (query)intoptionalFilter to one MLC.
company_id (query)intoptionalFilter to one company (via junction).

POST /infra/mlc_config

Create. Auth: DORI_ADMIN. Every field optional; server auto-names config-{id} if name omitted.
FieldTypeReq/OptDefault / Notes PassInternalNotes
mlc_idintoptionalFK; must exist if supplied.
namestroptionalServer-generates config-{id} if empty.
predictdb_urlstroptional—
predictdb_portstroptional—
predictdb_namestroptional—
predictdb_userstroptional—
predictdb_passwordstroptional—
eventdb_urlstroptional—
eventdb_portstroptional—
eventdb_namestroptional—
eventdb_userstroptional—
eventdb_passwordstroptional—
frame_windowintoptionaldefault = 0
max_queue_depthintoptionaldefault = 0
queue_upper_boundintoptionaldefault = 0
queue_lower_boundintoptionaldefault = 0
is_benchmarkbooloptionaldefault = True
is_postgresbooloptionaldefault = True
skip_countintoptionaldefault = 1
scaleintoptionaldefault = 100
fpsintoptionaldefault = 1
non_max_suppression_conffloatoptionaldefault = 0.25
non_max_suppression_ioufloatoptionaldefault = 0.45
second_model_def_statebooloptionaldefault = False
inference_processesintoptionaldefault = 3

PATCH /infra/mlc_config/{config_id}

Partial update — every field optional; only send what you want to change.
FieldTypeReq/OptDefault / Notes PassInternalNotes
config_id (path)intrequired—
Body: same field set as POST /mlc_config, all optional.

DELETE /infra/mlc_config/{config_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
config_id (path)intrequiredJunction rows cascade.

/infra/mlc_config/{id}/companies  — Junction: which companies a config applies to

GET /infra/mlc_config/{config_id}/companies

Returns an array of company_id ints.
FieldTypeReq/OptDefault / Notes PassInternalNotes
config_id (path)intrequired—

POST /infra/mlc_config/{config_id}/companies

Assign one or more companies to a config. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
config_id (path)intrequired—
company_idsint[]requiredEach must exist.
mergebooloptionaldefault = True (append). False = replace membership set.

DELETE /infra/mlc_config/{config_id}/companies/{company_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
config_id (path)intrequired—
company_id (path)intrequired—

/infra/client  — Downstream Dori deployments

GET /infra/client

List clients with attached user ids.

POST /infra/client

Create a client; optional user_id also creates the client_user junction row. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
namestroptional—
app_server_urlstrrequired—
dashboard_urlstroptional—
is_activebooloptionaldefault = True
user_idintoptionalCreates junction row when supplied.

DELETE /infra/client/{client_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
client_id (path)intrequired—

/infra/company_config  — Key/value company config

GET /infra/company_config?company_id=

Returns {key: value} map. Auth: tenant.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (query)intoptional (DORI_ADMIN only)Tenant admin — auth-derived.

POST /infra/company_config?company_id=

Upsert key/value pairs. Body is a raw {key: value} dict. Auth: ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
company_id (query)intoptional (DORI_ADMIN only)Tenant admin — auth-derived.
body {key: value, ...}dictrequiredFree-form key/value.

/infra/service_bundle  — Service bundle definitions

GET /infra/service_bundle

List service bundles.

POST /infra/service_bundle

Create a service bundle. Auth: DORI_ADMIN.
FieldTypeReq/OptDefault / Notes PassInternalNotes
namestrrequired—
versionstroptional—
descriptionstroptional—
service_bundle_urlstroptional—
service_bundle_configstroptional—

DELETE /infra/service_bundle/{bundle_id}

FieldTypeReq/OptDefault / Notes PassInternalNotes
bundle_id (path)intrequired—

/infra/system_event  — Stub (501 by design)

POST /infra/system_event

Pending — see /monitor/system_event/ for the wired version. Returns 501.
No parameters currently.
Generated from services/config_app/src/web/infra.py and services/config_app/src/model/pModel.py on the feat/icd-platform-admin-and-mlc-config branch.