Netter ontology-promotion API
The ontology-promotion API from Netter — 3 operation(s) for ontology-promotion.
The ontology-promotion API from Netter — 3 operation(s) for ontology-promotion.
openapi: 3.1.0
info:
title: DMI Backend actions ontology-promotion API
version: 0.1.0
tags:
- name: ontology-promotion
paths:
/api/v1/ontology/databases/{database_id}/promote:
post:
tags:
- ontology-promotion
summary: Promote Database
description: Promote a Database into an OntologyEntity (creates the writeable surface).
operationId: promote_database_api_v1_ontology_databases__database_id__promote_post
parameters:
- name: database_id
in: path
required: true
schema:
type: string
format: uuid
title: Database Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PromoteBody'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/app__ontology__schemas__EntityRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/ontology/entities/{entity_id}/demote:
post:
tags:
- ontology-promotion
summary: Demote Entity
description: 'Tear down an OntologyEntity, leaving its underlying Database intact.
Refuses with 409 when overlays exist — caller must clear them first.'
operationId: demote_entity_api_v1_ontology_entities__entity_id__demote_post
parameters:
- name: entity_id
in: path
required: true
schema:
type: string
format: uuid
title: Entity Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/ontology/entities/{entity_id}/clear-overlays:
post:
tags:
- ontology-promotion
summary: Clear Overlays
description: Type-to-confirm wipe of every overlay row for an entity.
operationId: clear_overlays_api_v1_ontology_entities__entity_id__clear_overlays_post
parameters:
- name: entity_id
in: path
required: true
schema:
type: string
format: uuid
title: Entity Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClearBody'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ClearResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ClearBody:
properties:
confirm:
type: string
title: Confirm
description: Must be the literal phrase 'clear all overlays'
type: object
required:
- confirm
title: ClearBody
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
EntityRelationshipBrief:
properties:
id:
type: string
format: uuid
title: Id
name:
type: string
title: Name
target_entity_id:
type: string
format: uuid
title: Target Entity Id
target_entity_name:
type: string
title: Target Entity Name
target_entity_display_name:
type: string
title: Target Entity Display Name
relationship_type:
type: string
title: Relationship Type
cardinality:
type: string
title: Cardinality
type: object
required:
- id
- name
- target_entity_id
- target_entity_name
- target_entity_display_name
- relationship_type
- cardinality
title: EntityRelationshipBrief
description: Relationship summary in entity detail.
app__ontology__schemas__EntityRead:
properties:
id:
type: string
format: uuid
title: Id
company_id:
type: string
format: uuid
title: Company Id
name:
type: string
title: Name
display_name:
type: string
title: Display Name
description:
type: string
title: Description
database_id:
type: string
format: uuid
title: Database Id
key_column:
type: string
title: Key Column
record_count:
type: integer
title: Record Count
status:
type: string
title: Status
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
properties:
items:
$ref: '#/components/schemas/EntityPropertyRead'
type: array
title: Properties
default: []
relationships:
items:
$ref: '#/components/schemas/EntityRelationshipBrief'
type: array
title: Relationships
default: []
fed_by:
items:
$ref: '#/components/schemas/FedByProject'
type: array
title: Fed By
default: []
is_editable:
type: boolean
title: Is Editable
default: false
is_file_backed:
type: boolean
title: Is File Backed
default: false
last_synced_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Last Synced At
source_row_count:
type: integer
title: Source Row Count
default: 0
icon:
anyOf:
- type: string
- type: 'null'
title: Icon
type: object
required:
- id
- company_id
- name
- display_name
- description
- database_id
- key_column
- record_count
- status
- created_at
- updated_at
title: EntityRead
description: Full entity for GET endpoints.
EntityPropertyRead:
properties:
id:
type: string
format: uuid
title: Id
column_name:
type: string
title: Column Name
display_name:
type: string
title: Display Name
description:
type: string
title: Description
data_type:
type: string
title: Data Type
is_primary_key:
type: boolean
title: Is Primary Key
order:
type: integer
title: Order
rules:
$ref: '#/components/schemas/FieldRules'
origin:
type: string
title: Origin
default: source
managed_default:
anyOf:
- {}
- type: 'null'
title: Managed Default
file_folder_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: File Folder Id
type: object
required:
- id
- column_name
- display_name
- description
- data_type
- is_primary_key
- order
title: EntityPropertyRead
description: Property in entity listings.
PromoteBody:
properties:
name:
type: string
minLength: 1
title: Name
description: Entity slug
description:
type: string
title: Description
default: ''
display_name:
anyOf:
- type: string
- type: 'null'
title: Display Name
key_columns:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Key Columns
description: Single-element list naming the column whose values become the entity's row identity. Required for file-backed Databases (CSV uploads) whose key_columns is empty; ignored otherwise.
type: object
required:
- name
title: PromoteBody
FieldFormat:
properties:
min:
anyOf:
- type: number
- type: 'null'
title: Min
max:
anyOf:
- type: number
- type: 'null'
title: Max
regex:
anyOf:
- type: string
- type: 'null'
title: Regex
max_length:
anyOf:
- type: integer
- type: 'null'
title: Max Length
date_min:
anyOf:
- type: string
- type: 'null'
title: Date Min
date_max:
anyOf:
- type: string
- type: 'null'
title: Date Max
allowed_mime:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Allowed Mime
max_size_bytes:
anyOf:
- type: integer
- type: 'null'
title: Max Size Bytes
type: object
title: FieldFormat
description: Type-specific value constraints. All optional; only set what applies.
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
FedByProject:
properties:
project_id:
type: string
format: uuid
title: Project Id
project_name:
type: string
title: Project Name
type: object
required:
- project_id
- project_name
title: FedByProject
description: Which project feeds this entity.
FieldRules:
properties:
allowed_values:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Allowed Values
required:
type: boolean
title: Required
default: false
format:
anyOf:
- $ref: '#/components/schemas/FieldFormat'
- type: 'null'
type: object
title: FieldRules
description: Declared value rules for one entity field. Empty instance = no rules.
ClearResponse:
properties:
deleted:
type: integer
title: Deleted
type: object
required:
- deleted
title: ClearResponse