Skip to content

Guidelines Shot Type Rules Endpoints

Guidelines Shot Type Rules API endpoints.


Overview

Method Endpoint Description
GET /api/v1/guidelines/{guidelines_id}/shot-type-rules/ List Rules
POST /api/v1/guidelines/{guidelines_id}/shot-type-rules/ Create Rule
PUT /api/v1/guidelines/{guidelines_id}/shot-type-rules/bulk-replace Bulk Replace
GET /api/v1/guidelines/{guidelines_id}/shot-type-rules/grouped List Rule Groups
DELETE /api/v1/guidelines/{guidelines_id}/shot-type-rules/{rule_id} Delete Rule

API Reference

Sartiq Backend Server - Guidelines Shot Type Rules 0.1.0

guidelines-shot-type-rules


GET /api/v1/guidelines/{guidelines_id}/shot-type-rules/

List Rules

Description

List all rule rows for the given guideline (flat shape).

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
guidelines_id path string No
organization_id query No

Responses

{
    "data": [
        {
            "id": "195100fc-19e6-40ce-91e7-92a5ea37155a",
            "guidelines_id": "00fc888b-7be9-4c9c-ba62-f090a723a89c",
            "rule_kind": "PLACEMENT",
            "rule_value": "string",
            "shot_type_id": "1f03c111-9446-4ac2-9742-bbe4ca0fa1e6",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z"
        }
    ],
    "count": 0
}
⚠️ 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": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/GuidelinesShotTypeRulePublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "GuidelinesShotTypeRulesPublic",
    "description": "Flat list of rule rows."
}

{
    "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"
}

POST /api/v1/guidelines/{guidelines_id}/shot-type-rules/

Create Rule

Description

Add a single (kind, value, shot_type) rule row.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
guidelines_id path string No
organization_id query No

Request body

{
    "rule_kind": "PLACEMENT",
    "rule_value": "string",
    "shot_type_id": "f8ff9ab0-fb7a-4e45-870b-b1b8461fb495"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "rule_kind": {
            "$ref": "#/components/schemas/GuidelinesShotTypeRuleKind"
        },
        "rule_value": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Rule Value"
        },
        "shot_type_id": {
            "type": "string",
            "format": "uuid",
            "title": "Shot Type Id"
        }
    },
    "type": "object",
    "required": [
        "rule_kind",
        "rule_value",
        "shot_type_id"
    ],
    "title": "GuidelinesShotTypeRuleCreate",
    "description": "Create a single (kind, value, shot_type) rule row."
}

Responses

{
    "id": "484d73b4-d5ec-455b-b989-c889b69d0b56",
    "guidelines_id": "7e881c9d-e76b-4f3d-b78f-ad5296d70c03",
    "rule_kind": "PLACEMENT",
    "rule_value": "string",
    "shot_type_id": "a27ae4ce-ca2a-46ba-b1fb-84ca77044d74",
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z"
}
⚠️ 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": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "guidelines_id": {
            "type": "string",
            "format": "uuid",
            "title": "Guidelines Id"
        },
        "rule_kind": {
            "$ref": "#/components/schemas/GuidelinesShotTypeRuleKind"
        },
        "rule_value": {
            "type": "string",
            "title": "Rule Value"
        },
        "shot_type_id": {
            "type": "string",
            "format": "uuid",
            "title": "Shot Type Id"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        }
    },
    "type": "object",
    "required": [
        "id",
        "guidelines_id",
        "rule_kind",
        "rule_value",
        "shot_type_id",
        "created_at",
        "updated_at"
    ],
    "title": "GuidelinesShotTypeRulePublic",
    "description": "Single rule row as returned by the API."
}

{
    "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/guidelines/{guidelines_id}/shot-type-rules/grouped

List Rule Groups

Description

List rules grouped by (rule_kind, rule_value) with expanded shot types.

Frontend-friendly view: one group per key, with the materialised list of ShotType objects.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
guidelines_id path string No
organization_id query No

Responses

{
    "data": [
        {
            "rule_kind": "PLACEMENT",
            "rule_value": "string",
            "shot_types": [
                {
                    "name": "string",
                    "view_angle": "front",
                    "framing": "full_body",
                    "shot_type_ref_image_url": null,
                    "shot_type_prompt_instruction": null,
                    "file_naming_convention": null,
                    "reference_image_url": null,
                    "prompt": null,
                    "prompt_builder_section": null,
                    "core_focus": true,
                    "default_shot_type": null,
                    "margins": null,
                    "owner_id": null,
                    "public": true,
                    "organization_id": null,
                    "id": "d85b8f63-61b4-4958-9561-4003ce7aa17d",
                    "created_at": "2022-04-13T15:42:05.901Z",
                    "updated_at": "2022-04-13T15:42:05.901Z",
                    "deleted_at": null,
                    "reference_image": null
                }
            ]
        }
    ],
    "count": 0
}
⚠️ 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": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/GuidelinesShotTypeRuleGroup"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "GuidelinesShotTypeRuleGroupsPublic",
    "description": "Collection of grouped rules for a single guideline."
}

{
    "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"
}

PUT /api/v1/guidelines/{guidelines_id}/shot-type-rules/bulk-replace

Bulk Replace

Description

Replace the shot-type list for a single (rule_kind, rule_value) key.

Empty shot_type_ids clears all rows for that key.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
guidelines_id path string No
organization_id query No

Request body

{
    "rule_kind": "PLACEMENT",
    "rule_value": "string",
    "shot_type_ids": [
        "ed6ee08c-cb97-460f-9bd1-591a10cac33f"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "rule_kind": {
            "$ref": "#/components/schemas/GuidelinesShotTypeRuleKind"
        },
        "rule_value": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Rule Value"
        },
        "shot_type_ids": {
            "items": {
                "type": "string",
                "format": "uuid"
            },
            "type": "array",
            "title": "Shot Type Ids"
        }
    },
    "type": "object",
    "required": [
        "rule_kind",
        "rule_value"
    ],
    "title": "GuidelinesShotTypeRuleGroupInput",
    "description": "One rule = ``(rule_kind, rule_value)`` mapped to a list of shot-type ids.\n\nThis is the natural conceptual shape of a rule (the same shape the\nuser writes on a whiteboard: \"PLACEMENT = upper_body → [a, b, c]\").\nThe DB stores it as multiple rows — one per shot type — but the API\naccepts it grouped so frontends do not have to flatten the list\nbefore sending.\n\nUsed both as the dedicated bulk-replace endpoint payload and as the\nnested-seed entry in ``ShootingGuidelinesCreate`` /\n``ShootingGuidelinesUpdate``.``shot_type_rules``."
}

Responses

{
    "data": [
        {
            "id": "331b31c1-9e66-4031-bd65-fa8e5d1abc6b",
            "guidelines_id": "c021893f-8f59-496c-8807-e3a4d38bc72e",
            "rule_kind": "PLACEMENT",
            "rule_value": "string",
            "shot_type_id": "c71a7229-4e2a-478e-bed2-3cebfe65aa17",
            "created_at": "2022-04-13T15:42:05.901Z",
            "updated_at": "2022-04-13T15:42:05.901Z"
        }
    ],
    "count": 0
}
⚠️ 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": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/GuidelinesShotTypeRulePublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "GuidelinesShotTypeRulesPublic",
    "description": "Flat list of rule rows."
}

{
    "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"
}

DELETE /api/v1/guidelines/{guidelines_id}/shot-type-rules/{rule_id}

Delete Rule

Description

Remove a single rule row by id.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
guidelines_id path string No
organization_id query No
rule_id path string No

Responses

{
    "message": "string"
}
⚠️ 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": {
        "message": {
            "type": "string",
            "title": "Message"
        }
    },
    "type": "object",
    "required": [
        "message"
    ],
    "title": "Message"
}

{
    "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

DefaultShotTypes

Type: string

GuidelinesShotTypeRuleCreate

Name Type Description
rule_kind GuidelinesShotTypeRuleKind
rule_value string
shot_type_id string(uuid)

GuidelinesShotTypeRuleGroup

Name Type Description
rule_kind GuidelinesShotTypeRuleKind
rule_value string
shot_types Array<ShotTypePublic>

GuidelinesShotTypeRuleGroupInput

Name Type Description
rule_kind GuidelinesShotTypeRuleKind
rule_value string
shot_type_ids Array<string(uuid)>

GuidelinesShotTypeRuleGroupsPublic

Name Type Description
count integer
data Array<GuidelinesShotTypeRuleGroup>

GuidelinesShotTypeRuleKind

Type: string

GuidelinesShotTypeRulePublic

Name Type Description
created_at string(date-time)
guidelines_id string(uuid)
id string(uuid)
rule_kind GuidelinesShotTypeRuleKind
rule_value string
shot_type_id string(uuid)
updated_at string(date-time)

GuidelinesShotTypeRulesPublic

Name Type Description
count integer
data Array<GuidelinesShotTypeRulePublic>

HTTPValidationError

Name Type Description
detail Array<ValidationError>

MediaInput

Name Type Description
alt_text
caption
color_profile
dominant_color
duration
height
media_resource_id
protected boolean
url
width

MediaResourcePublic

Name Type Description
alt_text
aspect_ratio
caption
color_profile
content_hash string
created_at string(date-time)
dominant_color
duration
extension string
file_size integer
height
id string(uuid)
orientation
protected boolean
resource_type MediaResourceType
url string
width

MediaResourceType

Type: string

Message

Name Type Description
message string

ShotTypeFraming

Type: string

ShotTypePublic

Name Type Description
core_focus boolean
created_at string(date-time)
default_shot_type
deleted_at
file_naming_convention
framing ShotTypeFraming
id string(uuid)
margins
name string
organization_id
owner_id
prompt
prompt_builder_section
public boolean
reference_image
reference_image_url
shot_type_prompt_instruction
shot_type_ref_image_url
updated_at string(date-time)
view_angle ViewAngle

ValidationError

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

ViewAngle

Type: string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2