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": "a35f745c-370a-45b5-b344-49f1e5b94739",
"guidelines_id": "2d07b450-0e55-457d-a367-535cfcc0a2e7",
"rule_kind": "TYPE",
"rule_value": "string",
"reference_image_url": null,
"reference_image": null,
"shot_type_id": "2038038a-cf3f-4486-b3d0-8507e2559817",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z"
}
],
"count": 0
}
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."
}
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": "TYPE",
"rule_value": "string",
"shot_type_id": "b62605e3-a4a1-4f56-aae1-fda78b028488",
"reference_image_url": null
}
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"
},
"reference_image_url": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
],
"title": "Reference Image Url"
}
},
"type": "object",
"required": [
"rule_kind",
"rule_value",
"shot_type_id"
],
"title": "GuidelinesShotTypeRuleCreate",
"description": "Create a single (kind, value, shot_type) rule row."
}
Responses
{
"id": "465e5dd4-6bb3-46ee-b212-7810c973378b",
"guidelines_id": "19903834-e3ec-44c2-bf66-b60c4414b82a",
"rule_kind": "TYPE",
"rule_value": "string",
"reference_image_url": null,
"reference_image": null,
"shot_type_id": "d532721d-1e91-43cd-bd46-3f0bb3665e9e",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z"
}
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"
},
"reference_image_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reference Image Url"
},
"reference_image": {
"anyOf": [
{
"$ref": "#/components/schemas/MediaResourcePublic"
},
{
"type": "null"
}
]
},
"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."
}
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": "TYPE",
"rule_value": "string",
"shot_types": [
{
"name": "string",
"view_angle": "front",
"framing": null,
"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,
"margins_key": null,
"owner_id": null,
"public": true,
"organization_id": null,
"requires_subject": true,
"id": "372c9329-b64b-47d1-82a5-6792893813d1",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"deleted_at": null,
"reference_image": null,
"custom_ref_image_url": null
}
]
}
],
"count": 0
}
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."
}
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. shot_type_images
rides along as an optional shot_type_id -> image sidecar. The
replace covers the shot-type list only: a shot type that survives it and is
absent from the map keeps the image it already had, so dropping one shot type
from a key does not wipe the evidence images of the others. Map an id to
null to clear its image explicitly.
A map value is a plain HTTP(S) external hot-link or a MediaInput upload
ingested into our own storage as a MediaResource. async for the latter:
ingestion does storage I/O.
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": "TYPE",
"rule_value": "string",
"shot_type_ids": [
"1047412e-5fa1-41a5-b00d-14133c924790"
],
"shot_type_images": {}
}
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"
},
"shot_type_images": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/MediaInput"
},
{
"type": "null"
}
]
},
"propertyNames": {
"format": "uuid"
},
"type": "object",
"title": "Shot Type Images"
}
},
"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``.\n\n``shot_type_images`` is a purely additive sidecar to ``shot_type_ids``:\na ``shot_type_id -> HTTP(S) evidence url`` map carrying the reference photo\nfor each shot type UNDER THIS KEY. A map rather than a list of objects\nbecause the ids already live in ``shot_type_ids`` — a parallel list would\nduplicate them and could drift out of sync, while map keys are unique for\nfree and their relation to ``shot_type_ids`` is one checkable rule\n(``keys ⊆ shot_type_ids``). Partial coverage is the normal case: a shot\ntype with no evidence image is simply absent from the map.\n\nIt is a WIRE shape only — each entry lands on its own rule row's\n``reference_image_url`` column, never as a JSON blob. The rule row already\nIS a ``(guidelines, kind, value, shot_type)`` tuple, exactly the\ngranularity of the map; storing the map itself would be a second,\nun-queryable representation of the same relation, free to drift from the\nrows it describes.\n\nThe bulk-replace replaces the shot-type LIST, not the images. A shot\ntype that survives the replace and is absent from the map KEEPS the url\nit already had — dropping one shot type from a key must not wipe the\nevidence photos of the others. To remove an image, map its id to\n``null`` explicitly. On create there is nothing to keep, so an absent\nid simply has no image.\n\nA map VALUE is either a plain HTTP(S) URL or a ``MediaInput``. A ``str`` is\nan external hot-link to an image we do not own and lands on the row's\n``reference_image_url`` column. A ``MediaInput`` is an upload into our\nstorage and lands in the row's ``reference_image`` media slot as a real\nMediaResource. They are separate to keep external and owned provenance\nexplicit. The slot wins on read."
}
Responses
{
"data": [
{
"id": "114ee2f4-a3c0-413f-a08f-9de4baddcfc9",
"guidelines_id": "840a67b2-bd57-441a-9221-512cc916335d",
"rule_kind": "TYPE",
"rule_value": "string",
"reference_image_url": null,
"reference_image": null,
"shot_type_id": "15977531-5f81-47d0-8098-cbc8512c9550",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z"
}
],
"count": 0
}
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."
}
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
Schemas¶
DefaultShotTypes¶
Type: string
GuidelineShotTypePublic¶
| Name | Type | Description |
|---|---|---|
core_focus |
boolean | |
created_at |
string(date-time) | |
custom_ref_image_url |
||
default_shot_type |
||
deleted_at |
||
file_naming_convention |
||
framing |
||
id |
string(uuid) | |
margins |
||
margins_key |
||
name |
string | |
organization_id |
||
owner_id |
||
prompt |
||
prompt_builder_section |
||
public |
boolean | |
reference_image |
||
reference_image_url |
||
requires_subject |
boolean | |
shot_type_prompt_instruction |
||
shot_type_ref_image_url |
||
updated_at |
string(date-time) | |
view_angle |
ViewAngle |
GuidelinesShotTypeRuleCreate¶
| Name | Type | Description |
|---|---|---|
reference_image_url |
||
rule_kind |
GuidelinesShotTypeRuleKind | |
rule_value |
string | |
shot_type_id |
string(uuid) |
GuidelinesShotTypeRuleGroup¶
| Name | Type | Description |
|---|---|---|
rule_kind |
GuidelinesShotTypeRuleKind | |
rule_value |
string | |
shot_types |
Array<GuidelineShotTypePublic> |
GuidelinesShotTypeRuleGroupInput¶
| Name | Type | Description |
|---|---|---|
rule_kind |
GuidelinesShotTypeRuleKind | |
rule_value |
string | |
shot_type_ids |
Array<string(uuid)> | |
shot_type_images |
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) | |
reference_image |
||
reference_image_url |
||
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
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |
ViewAngle¶
Type: string
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| OAuth2PasswordBearer | oauth2 |