Sure, here's a casual and concise API documentation for the provided API:
This API allows you to manage screen recordings. It provides endpoints to initialize a new screen recording, add video in chunks to a recording, get the video of a recording, get all recordings of a user, get all recordings, update the title of a recording, and delete a recording.
- Endpoint:
/api/recording
(POST) - Description: Start a new screen recording.
- Parameters:
user_id
(string, required): The user ID associated with the recording.
- Response:
- Status Code: 201 (Created)
- JSON Response:
{'recording_id': id}
- Endpoint:
/api/recording/<id>
(POST) - Description: Add video data in chunks to an existing recording.
- Parameters:
id
(string, path parameter, required): The ID of the recording to update.
- Request Body:
video
(file, required): The video chunk to add.
- Response:
- Status Code: 201 (Created)
- JSON Response:
{'message': 'video added successfully'}
- Endpoint:
/api/recording/<id>
(GET) - Description: Get the video of a specific recording.
- Parameters:
id
(string, path parameter, required): The ID of the recording to retrieve.
- Response:
- Status Code: 200 (OK)
- Video Response: The video file as an attachment.
- Endpoint:
/api/recording/user/<user_id>
(GET) - Description: Get all recordings associated with a specific user.
- Parameters:
user_id
(string, path parameter, required): The user ID to retrieve recordings for.
- Response:
- Status Code: 200 (OK)
- JSON Response: A list of recordings, each containing
title
,id
,user_id
, andtime
fields.
- Endpoint:
/api/recording
(GET) - Description: Get all recorded screen sessions.
- Response:
- Status Code: 200 (OK)
- JSON Response: A list of recordings, each containing
title
,id
,user_id
, andtime
fields.
- Endpoint:
/api/recording/<id>
(PUT) - Description: Update the title of a specific recording.
- Parameters:
id
(string, path parameter, required): The ID of the recording to update.
- Request Body:
title
(string, required): The new title for the recording.
- Response:
- Status Code: 200 (OK)
- JSON Response:
{'message': 'title updated successfully'}
- Endpoint:
/api/recording/<id>
(DELETE) - Description: Delete a specific recording.
- Parameters:
id
(string, path parameter, required): The ID of the recording to delete.
- Response:
- Status Code: 200 (OK)
- JSON Response:
{'message': 'recording deleted successfully'}
Feel free to use these endpoints to manage screen recordings in your application. If you have any questions or need further assistance, don't hesitate to ask, Destiny!