Skip to content

Admin Outfit Styling Endpoints

Admin Outfit Styling API endpoints.


Overview

Method Endpoint Description
GET /api/v1/admin/outfit-styling/metrics Get Outfit Styling Metrics
GET /api/v1/admin/outfit-styling/production-requests/{production_request_id}/history Get Outfit Styling History

API Reference

Sartiq Backend Server - Admin Outfit Styling 0.1.0

admin-outfit-styling


GET /api/v1/admin/outfit-styling/metrics

Get Outfit Styling Metrics

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
end_at query string No Exclusive aware timestamp
group_by query string none No
limit query integer 50 No
model_id query No
organization_id query No
prompt_version query No
skip query integer 0 No
start_at query string No Inclusive aware timestamp
stylist_id query No

Responses

{
    "window": {
        "start_at": "2022-04-13T15:42:05.901Z",
        "end_at": "2022-04-13T15:42:05.901Z",
        "observed_at": "2022-04-13T15:42:05.901Z"
    },
    "filters": {
        "organization_id": null,
        "stylist_id": null,
        "model_id": null,
        "prompt_version": null
    },
    "group_by": "none",
    "totals": {
        "looks_started": 0,
        "configuration_state": "uniform",
        "initial": {
            "attempts": 0,
            "statuses": {
                "queued": 0,
                "running": 0,
                "succeeded": 0,
                "failed": 0,
                "superseded": 0,
                "unknown": 0
            },
            "failures": {
                "context": 0,
                "embedding": 0,
                "empty_slot": 0,
                "model_contract": 0,
                "provider": 0,
                "invariant": 0,
                "persistence": 0,
                "timeout": 0,
                "rate_limit": 0,
                "superseded": 0,
                "unknown": 0
            },
            "selected_rank_1": 0,
            "selected_rank_2": 0,
            "selected_rank_unknown": 0
        },
        "restyles": {
            "attempts": 0,
            "statuses": null,
            "failures": null,
            "direction_used": 0,
            "direction_not_used": 0,
            "direction_unknown": 0,
            "looks_with_0_attempts": 0,
            "looks_with_1_attempt": 0,
            "looks_with_2_attempts": 0,
            "looks_with_3_plus_attempts": 0,
            "selected_ordinal_1": 0,
            "selected_ordinal_2": 0,
            "selected_ordinal_3": 0,
            "selected_ordinal_4_plus": 0,
            "selected_ordinal_unknown": 0
        },
        "ready": {
            "looks_ready": 0,
            "looks_still_open": 0,
            "source_initial": 0,
            "source_restyle": 0,
            "source_unknown": 0,
            "fully_untouched_ai": 0,
            "exact_ai_composition": 0,
            "exact_ai_composition_with_non_product_edits": 0,
            "ai_derived_human_touched": 0,
            "human_reworked": 0,
            "unknown": 0,
            "edit_distance_0": 0,
            "edit_distance_1": 0,
            "edit_distance_2": 0,
            "edit_distance_3_plus": 0,
            "edit_distance_unknown": 0
        },
        "changes": {
            "replacements_applied": 0,
            "rack_products_added": 0,
            "restyles_transplanted": 0,
            "manual_changes": 0,
            "unattributed_changes": 0,
            "looks_with_replacement": 0,
            "looks_with_rack_addition": 0,
            "looks_with_restyle": 0,
            "looks_with_manual_change": 0,
            "looks_with_unattributed_change": 0
        },
        "rates": {
            "ready": {
                "numerator": 0,
                "denominator": 0,
                "value": null
            },
            "initial_success": null,
            "restyle_success": null,
            "rank_1_selection": null,
            "exact_ai_composition": null,
            "ai_derived_human_touched": null
        }
    },
    "breakdown": {
        "skip": 0,
        "limit": 0,
        "total": 0,
        "has_more": true,
        "items": [
            {
                "key": {
                    "organization_id": null,
                    "stylist_id": null,
                    "model_id": null,
                    "prompt_version": null,
                    "mixed_configuration": true
                },
                "metrics": null
            }
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "window": {
            "$ref": "#/components/schemas/OutfitStylingMetricsWindowPublic"
        },
        "filters": {
            "$ref": "#/components/schemas/OutfitStylingMetricsFiltersPublic"
        },
        "group_by": {
            "type": "string",
            "enum": [
                "none",
                "organization",
                "stylist_configuration"
            ],
            "title": "Group By"
        },
        "totals": {
            "$ref": "#/components/schemas/OutfitStylingMetricSlicePublic"
        },
        "breakdown": {
            "$ref": "#/components/schemas/OutfitStylingBreakdownPagePublic"
        }
    },
    "type": "object",
    "required": [
        "window",
        "filters",
        "group_by",
        "totals",
        "breakdown"
    ],
    "title": "OutfitStylingMetricsPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/admin/outfit-styling/production-requests/{production_request_id}/history

Get Outfit Styling History

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
after_sequence query No
limit query integer 100 No
production_request_id path string No
through_sequence query No

Responses

{
    "production_request_id": "7d9f1efa-f359-4aaa-b3d9-7cf546133e33",
    "summary": {
        "initial_attempts": 0,
        "restyle_attempts": 0,
        "ready_checkpoints": 0,
        "history_events": 0,
        "replacements_applied": 0,
        "rack_products_added": 0,
        "restyles_transplanted": 0,
        "manual_changes": 0,
        "unattributed_changes": 0
    },
    "initial_runs": [
        {
            "run_id": "1e5ccfbc-a46b-4817-9a6b-5996fbbe454c",
            "ordinal": 0,
            "status": null,
            "requested_by_user_id": null,
            "initiation_source": "automatic",
            "created_at": "2022-04-13T15:42:05.901Z",
            "started_at": null,
            "finished_at": null,
            "normalized_failure": null,
            "generated_proposals": [
                {
                    "rank": 1,
                    "outfit_id": "0c32076d-7992-4587-9976-c71786845a72",
                    "product_ids": [
                        "22ca6964-90c1-4a11-8378-98f4fe5120b6"
                    ]
                }
            ]
        }
    ],
    "restyle_attempts": [
        {
            "run_id": "8f6efaf1-4dbb-4cee-a364-b85afd7668cb",
            "ordinal": 0,
            "status": null,
            "requested_by_user_id": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "started_at": null,
            "finished_at": null,
            "normalized_failure": null,
            "direction_used": null,
            "hero_product_id": null,
            "source_outfit_id": null,
            "source_product_ids": null,
            "delivered_outfit_id": null,
            "generated_product_ids": null
        }
    ],
    "ready_checkpoints": [
        {
            "sequence": 0,
            "created_at": "2022-04-13T15:42:05.901Z",
            "selected_outfit_id": null,
            "selected_product_ids": [
                "524a55f0-f39d-4ea9-abbb-d8ffb547b0e6"
            ],
            "source_product_ids": [
                "a9416c31-9400-4160-b2df-cc6ee962d049"
            ],
            "product_edit_distance": null,
            "source_mode": "initial",
            "source_run_id": null,
            "original_initial_rank": null,
            "selected_restyle_ordinal": null,
            "selection_mode": null,
            "exact_ai_composition": null,
            "human_change_categories": [
                "replacement"
            ],
            "replacement_count": 0,
            "rack_addition_count": 0,
            "restyle_count": 0,
            "manual_change_count": 0,
            "unattributed_change_count": 0
        }
    ],
    "events": [
        {
            "sequence": 0,
            "created_at": "2022-04-13T15:42:05.901Z",
            "event_type": null,
            "actor_user_id": null,
            "outfit_id": null,
            "outfit_option_run_id": null,
            "client_action_id": null,
            "from_product_id": null,
            "to_product_id": null,
            "before_product_ids": [
                "34960035-eb04-4eff-9668-50d54b612e0b"
            ],
            "after_product_ids": [
                "7bf58aef-e3cf-4e52-a9fe-ed99016ca19f"
            ],
            "changed_fields": [
                "products"
            ],
            "affected_product_ids": [
                "4d6deb48-7e3f-4d80-b182-93e6bbcf4c5b"
            ]
        }
    ],
    "cursor": {
        "after_sequence": null,
        "through_sequence": null,
        "snapshot_sequence": null,
        "next_sequence": null,
        "has_more": true
    },
    "truncated": {
        "initial_runs": true,
        "restyle_attempts": true,
        "ready_checkpoints": true
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "production_request_id": {
            "type": "string",
            "format": "uuid",
            "title": "Production Request Id"
        },
        "summary": {
            "$ref": "#/components/schemas/OutfitHistorySummaryPublic"
        },
        "initial_runs": {
            "items": {
                "$ref": "#/components/schemas/InitialStylingAttemptPublic"
            },
            "type": "array",
            "title": "Initial Runs"
        },
        "restyle_attempts": {
            "items": {
                "$ref": "#/components/schemas/RestyleAttemptPublic"
            },
            "type": "array",
            "title": "Restyle Attempts"
        },
        "ready_checkpoints": {
            "items": {
                "$ref": "#/components/schemas/OutfitReadyCheckpointPublic"
            },
            "type": "array",
            "title": "Ready Checkpoints"
        },
        "events": {
            "items": {
                "$ref": "#/components/schemas/OutfitHistoryFactPublic"
            },
            "type": "array",
            "title": "Events"
        },
        "cursor": {
            "$ref": "#/components/schemas/OutfitHistoryCursorPublic"
        },
        "truncated": {
            "$ref": "#/components/schemas/OutfitHistoryTruncationPublic"
        }
    },
    "type": "object",
    "required": [
        "production_request_id",
        "summary",
        "initial_runs",
        "restyle_attempts",
        "ready_checkpoints",
        "events",
        "cursor",
        "truncated"
    ],
    "title": "OutfitHistoryPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

HTTPValidationError

Name Type Description
detail Array<ValidationError>

InitialGeneratedProposalPublic

Name Type Description
outfit_id string(uuid)
product_ids Array<string(uuid)>
rank integer

InitialStylingAttemptPublic

Name Type Description
created_at string(date-time)
finished_at
generated_proposals Array<InitialGeneratedProposalPublic>
initiation_source StylingRunInitiationSource
normalized_failure
ordinal integer
requested_by_user_id
run_id string(uuid)
started_at
status

InitialStylingMetricsPublic

Name Type Description
attempts integer
failures OutfitStylingFailureCountsPublic
selected_rank_1 integer
selected_rank_2 integer
selected_rank_unknown integer
statuses OutfitStylingStatusCountsPublic

OutfitChangeMetricsPublic

Name Type Description
looks_with_manual_change integer
looks_with_rack_addition integer
looks_with_replacement integer
looks_with_restyle integer
looks_with_unattributed_change integer
manual_changes integer
rack_products_added integer
replacements_applied integer
restyles_transplanted integer
unattributed_changes integer

OutfitHistoryCursorPublic

Name Type Description
after_sequence
has_more boolean
next_sequence
snapshot_sequence
through_sequence

OutfitHistoryEventType

Type: string

OutfitHistoryFactPublic

Name Type Description
actor_user_id
affected_product_ids Array<string(uuid)>
after_product_ids Array<string(uuid)>
before_product_ids Array<string(uuid)>
changed_fields Array<string>
client_action_id
created_at string(date-time)
event_type
from_product_id
outfit_id
outfit_option_run_id
sequence integer
to_product_id

OutfitHistoryPublic

Name Type Description
cursor OutfitHistoryCursorPublic
events Array<OutfitHistoryFactPublic>
initial_runs Array<InitialStylingAttemptPublic>
production_request_id string(uuid)
ready_checkpoints Array<OutfitReadyCheckpointPublic>
restyle_attempts Array<RestyleAttemptPublic>
summary OutfitHistorySummaryPublic
truncated OutfitHistoryTruncationPublic

OutfitHistorySummaryPublic

Name Type Description
history_events integer
initial_attempts integer
manual_changes integer
rack_products_added integer
ready_checkpoints integer
replacements_applied integer
restyle_attempts integer
restyles_transplanted integer
unattributed_changes integer

OutfitHistoryTruncationPublic

Name Type Description
initial_runs boolean
ready_checkpoints boolean
restyle_attempts boolean

OutfitOptionRunStatus

Type: string

OutfitReadyCheckpointPublic

Name Type Description
created_at string(date-time)
exact_ai_composition
human_change_categories Array<string>
manual_change_count integer
original_initial_rank
product_edit_distance
rack_addition_count integer
replacement_count integer
restyle_count integer
selected_outfit_id
selected_product_ids Array<string(uuid)>
selected_restyle_ordinal
selection_mode
sequence integer
source_mode string
source_product_ids Array<string(uuid)>
source_run_id
unattributed_change_count integer

OutfitStylingBreakdownItemPublic

Name Type Description
key OutfitStylingBreakdownKeyPublic
metrics OutfitStylingMetricSlicePublic

OutfitStylingBreakdownKeyPublic

Name Type Description
mixed_configuration boolean
model_id
organization_id
prompt_version
stylist_id

OutfitStylingBreakdownPagePublic

Name Type Description
has_more boolean
items Array<OutfitStylingBreakdownItemPublic>
limit integer
skip integer
total integer

OutfitStylingFailureCountsPublic

Name Type Description
context integer
embedding integer
empty_slot integer
invariant integer
model_contract integer
persistence integer
provider integer
rate_limit integer
superseded integer
timeout integer
unknown integer

OutfitStylingMetricsFiltersPublic

Name Type Description
model_id
organization_id
prompt_version
stylist_id

OutfitStylingMetricSlicePublic

Name Type Description
changes OutfitChangeMetricsPublic
configuration_state string
initial InitialStylingMetricsPublic
looks_started integer
rates OutfitStylingRatesPublic
ready ReadyMetricsPublic
restyles RestyleMetricsPublic

OutfitStylingMetricsPublic

Name Type Description
breakdown OutfitStylingBreakdownPagePublic
filters OutfitStylingMetricsFiltersPublic
group_by string
totals OutfitStylingMetricSlicePublic
window OutfitStylingMetricsWindowPublic

OutfitStylingMetricsWindowPublic

Name Type Description
end_at string(date-time)
observed_at string(date-time)
start_at string(date-time)

OutfitStylingRatePublic

Name Type Description
denominator integer
numerator integer
value

OutfitStylingRatesPublic

Name Type Description
ai_derived_human_touched OutfitStylingRatePublic
exact_ai_composition OutfitStylingRatePublic
initial_success OutfitStylingRatePublic
rank_1_selection OutfitStylingRatePublic
ready OutfitStylingRatePublic
restyle_success OutfitStylingRatePublic

OutfitStylingStatusCountsPublic

Name Type Description
failed integer
queued integer
running integer
succeeded integer
superseded integer
unknown integer

ReadyMetricsPublic

Name Type Description
ai_derived_human_touched integer
edit_distance_0 integer
edit_distance_1 integer
edit_distance_2 integer
edit_distance_3_plus integer
edit_distance_unknown integer
exact_ai_composition integer
exact_ai_composition_with_non_product_edits integer
fully_untouched_ai integer
human_reworked integer
looks_ready integer
looks_still_open integer
source_initial integer
source_restyle integer
source_unknown integer
unknown integer

RestyleAttemptPublic

Name Type Description
created_at string(date-time)
delivered_outfit_id
direction_used
finished_at
generated_product_ids
hero_product_id
normalized_failure
ordinal integer
requested_by_user_id
run_id string(uuid)
source_outfit_id
source_product_ids
started_at
status

RestyleMetricsPublic

Name Type Description
attempts integer
direction_not_used integer
direction_unknown integer
direction_used integer
failures OutfitStylingFailureCountsPublic
looks_with_0_attempts integer
looks_with_1_attempt integer
looks_with_2_attempts integer
looks_with_3_plus_attempts integer
selected_ordinal_1 integer
selected_ordinal_2 integer
selected_ordinal_3 integer
selected_ordinal_4_plus integer
selected_ordinal_unknown integer
statuses OutfitStylingStatusCountsPublic

StylingRunInitiationSource

Type: string

StylingRunStatus

Type: string

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2