Clinic Videos API
Endpoints for managing video content and sessions within the clinic system.
List Videos
Get a list of videos.
Endpoint: GET /v1/clinic/videos
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination |
page_size | integer | No | Number of items per page |
category | string | No | Filter by video category |
status | string | No | Filter by video status |
patient_id | integer | No | Filter by patient ID |
provider_id | integer | No | Filter by provider ID |
Example Request
GET /v1/clinic/videos?category=therapy_session&status=completed HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereCreate Video
Endpoint: POST /v1/clinic/videos
Authentication: Required
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
video | object | Yes | Video data object |
video.title | string | Yes | Video title |
video.description | string | No | Video description |
video.category | string | Yes | Video category |
video.patient_id | integer | No | Associated patient ID |
video.provider_id | integer | No | Associated provider ID |
video.appointment_id | integer | No | Associated appointment ID |
video.duration_seconds | integer | No | Video duration in seconds |
Example Request
POST /v1/clinic/videos HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_here
{
"video": {
"title": "Therapy Session - October 27, 2023",
"description": "Initial consultation session",
"category": "therapy_session",
"patient_id": 1049,
"provider_id": 456,
"appointment_id": 789,
"duration_seconds": 3600
}
}Get Video Details
Endpoint: GET /v1/clinic/videos/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Video ID |
Example Request
GET /v1/clinic/videos/123 HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereUpdate Video
Endpoint: PUT /v1/clinic/videos/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Video ID |
Request Body Parameters
Same as Create Video endpoint.
Delete Video
Endpoint: DELETE /v1/clinic/videos/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Video ID |
Get Video Status
Get the processing status of a video.
Endpoint: GET /v1/clinic/videos/{id}/status
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Video ID |
Example Request
GET /v1/clinic/videos/123/status HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereResponse Format
Video Response
{
"id": 123,
"title": "Therapy Session - October 27, 2023",
"description": "Initial consultation session",
"category": "therapy_session",
"status": "completed",
"patient_id": 1049,
"provider_id": 456,
"appointment_id": 789,
"duration_seconds": 3600,
"file_url": "https://storage.example.com/videos/123.mp4",
"thumbnail_url": "https://storage.example.com/thumbnails/123.jpg",
"created_at": "2023-10-27T14:30:00.000Z",
"updated_at": "2023-10-27T15:45:00.000Z"
}Video Status Response
{
"id": 123,
"status": "processing",
"progress_percentage": 75,
"estimated_completion": "2023-10-27T16:00:00.000Z",
"error_message": null
}Video Categories
Common video categories include:
therapy_session- Therapy session recordingsconsultation- Consultation recordingsgroup_session- Group therapy session recordingseducational- Educational contentassessment- Assessment session recordingstraining- Training videos for staff
Video Status Values
uploading- Video is being uploadedprocessing- Video is being processed/encodedcompleted- Video processing is complete and ready for viewingfailed- Video processing failedarchived- Video has been archiveddeleted- Video has been marked for deletion
Error Responses
422 Unprocessable Entity
{
"errors": {
"title": ["can't be blank"],
"category": ["is not included in the list"],
"patient_id": ["must exist"]
}
}404 Not Found
{
"errors": "Video not found"
}403 Forbidden
{
"errors": "You are not authorized to access this video"
}Notes
- Video files are typically stored in secure cloud storage with access controls
- Processing time depends on video length and quality
- Thumbnail images are automatically generated during processing
- Videos associated with patient sessions may have additional privacy restrictions
- Large video files may require chunked upload for reliable transmission