Skip to content

Serialise segment API responses from JSON, drop rule and condition IDs #7817

@khvn26

Description

@khvn26

Migrate the management API read path onto Segment.rules_data.

Scope

  1. Serialise segment API responses from Segment.rules_data instead of the nested rule and condition row serializers.
  2. Drop rule and condition id from responses.
  3. Remove the rules / rules__conditions / rules__rules__conditions prefetch chain from segments/views.py.
  4. Make sure the OpenAPI spec no longer includes rule and condition IDs.

Acceptance criteria

  • Segment responses contain no id on rules or conditions; conditions expose operator, property, value, description.
  • The segment list and retrieve endpoints no longer issue rule or condition queries (assert query counts drop).
  • OpenAPI spec and Postman collection no longer include segment rule and condition IDs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssue related to the REST API

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions