# PicTV Content API Endpoints ## Base URLs - **Studio:** `/studio/v1/contents` - **Admin:** `/admin/v1/contents` --- ## Studio Endpoints > All studio endpoints require **Creator Authorization**. ### Create Content - **Method:** `POST` - **URL:** `/studio/v1/contents` - **Body:** `CreateStudioContentCommand` (JSON) - **Response:** `StudioContentDto` ### Get Content by ID - **Method:** `GET` - **URL:** `/studio/v1/contents/{id}` - **Parameters:** | Parameter | Type | Location | Description | |-----------|--------|----------|-------------| | id | string | path | Content ID | - **Response:** `StudioContentDto` ### List Contents - **Method:** `GET` - **URL:** `/studio/v1/contents` - **Parameters:** | Parameter | Type | Location | Description | |-----------|-------------|----------|--------------------------------------| | q | string | query | Search query (filters by title and description, case-insensitive) | | page | int | query | Page number | | pageSize | int | query | Number of items per page | | type | ContentType | query | Content type filter | - **Response:** `Pagination` - **Notes:** Results are ordered by creation date (newest first). Only returns contents created by the authenticated creator. ### Update Content - **Method:** `PUT` - **URL:** `/studio/v1/contents/{id}` - **Body:** `UpdateStudioContentCommand` (JSON) - **Response:** `StudioContentDto` ### Delete Content - **Method:** `DELETE` - **URL:** `/studio/v1/contents/{id}` - **Parameters:** | Parameter | Type | Location | Description | |-----------|--------|----------|-------------| | id | string | path | Content ID | - **Response:** `boolean` --- ## Admin Endpoints > All admin endpoints require **Admin Authorization**. ### Create Content - **Method:** `POST` - **URL:** `/admin/v1/contents` - **Body:** `CreateAdminContentCommand` (JSON) - **Response:** `AdminContentDto` ### Get Content by ID - **Method:** `GET` - **URL:** `/admin/v1/contents/{id}` - **Parameters:** | Parameter | Type | Location | Description | |-----------|--------|----------|-------------| | id | string | path | Content ID | - **Response:** `AdminContentDto` ### List Contents - **Method:** `GET` - **URL:** `/admin/v1/contents` - **Parameters:** | Parameter | Type | Location | Description | |-----------|-------------|----------|--------------------------------------| | q | string | query | Search query (filters by title and description, case-insensitive) | | page | int | query | Page number | | pageSize | int | query | Number of items per page | | type | ContentType | query | Content type filter | - **Response:** `Pagination` - **Notes:** Results are ordered by creation date (newest first). Returns all contents (not scoped to a specific creator). ### Update Content - **Method:** `PUT` - **URL:** `/admin/v1/contents/{id}` - **Body:** `UpdateAdminContentCommand` (JSON) - **Response:** `AdminContentDto` ### Delete Content - **Method:** `DELETE` - **URL:** `/admin/v1/contents/{id}` - **Parameters:** | Parameter | Type | Location | Description | |-----------|--------|----------|-------------| | id | string | path | Content ID | - **Response:** `boolean` --- ## Key Differences: Studio vs Admin | Feature | Studio | Admin | |--------------------|-------------------------------------|------------------------------| | Authorization | Creator (token-based) | Admin role required | | Content scope | Only creator's own contents | All contents | | Search | Filters by title & description | Filters by title & description |