Overview
Add CLI support for the Entity Relationships API (Beta), which enables custom relationships between entities beyond standard dependencies.
API Endpoints to Implement
Based on analysis of https://docs.cortex.io/api, the following endpoints need CLI commands:
Entity Relationships
POST /api/v1/entity-relationships - Create entity relationship
GET /api/v1/entity-relationships - List entity relationships
GET /api/v1/entity-relationships/{id} - Get entity relationship
PUT /api/v1/entity-relationships/{id} - Update entity relationship
DELETE /api/v1/entity-relationships/{id} - Delete entity relationship
Entity Relationship Types
POST /api/v1/entity-relationship-types - Create relationship type
GET /api/v1/entity-relationship-types - List relationship types
GET /api/v1/entity-relationship-types/{id} - Get relationship type
PUT /api/v1/entity-relationship-types/{id} - Update relationship type
DELETE /api/v1/entity-relationship-types/{id} - Delete relationship type
Proposed CLI Structure
# Entity Relationships
cortex entity-relationships create -f <file>
cortex entity-relationships list [--source-tag <tag>] [--target-tag <tag>]
cortex entity-relationships get --id <id>
cortex entity-relationships update --id <id> -f <file>
cortex entity-relationships delete --id <id>
# Relationship Types
cortex entity-relationship-types create -f <file>
cortex entity-relationship-types list
cortex entity-relationship-types get --id <id>
cortex entity-relationship-types update --id <id> -f <file>
cortex entity-relationship-types delete --id <id>
Implementation Notes
- Create new command module:
cortexapps_cli/commands/entity_relationships.py
- Follow existing patterns from
catalog.py and dependencies.py
- Support both JSON and YAML input formats
- Include list command with filtering options
- Add appropriate test coverage in
tests/test_entity_relationships.py
Priority
High - Strategic feature for advanced architecture modeling
Business Impact
Enables customers to model complex entity-to-entity relationships beyond standard dependencies, supporting advanced use cases like data lineage, ownership chains, and custom architectural patterns.
References
Overview
Add CLI support for the Entity Relationships API (Beta), which enables custom relationships between entities beyond standard dependencies.
API Endpoints to Implement
Based on analysis of https://docs.cortex.io/api, the following endpoints need CLI commands:
Entity Relationships
POST /api/v1/entity-relationships- Create entity relationshipGET /api/v1/entity-relationships- List entity relationshipsGET /api/v1/entity-relationships/{id}- Get entity relationshipPUT /api/v1/entity-relationships/{id}- Update entity relationshipDELETE /api/v1/entity-relationships/{id}- Delete entity relationshipEntity Relationship Types
POST /api/v1/entity-relationship-types- Create relationship typeGET /api/v1/entity-relationship-types- List relationship typesGET /api/v1/entity-relationship-types/{id}- Get relationship typePUT /api/v1/entity-relationship-types/{id}- Update relationship typeDELETE /api/v1/entity-relationship-types/{id}- Delete relationship typeProposed CLI Structure
Implementation Notes
cortexapps_cli/commands/entity_relationships.pycatalog.pyanddependencies.pytests/test_entity_relationships.pyPriority
High - Strategic feature for advanced architecture modeling
Business Impact
Enables customers to model complex entity-to-entity relationships beyond standard dependencies, supporting advanced use cases like data lineage, ownership chains, and custom architectural patterns.
References