Skip to content

Latest commit

 

History

History
72 lines (62 loc) · 2.98 KB

API_DOCUMENTATION.md

File metadata and controls

72 lines (62 loc) · 2.98 KB

Sure, here's a casual and concise API documentation for the provided API:

Screen Recording API Documentation

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.

Initialize a New Screen 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}

Add Video Chunk to a Recording

  • 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'}

Get Video of a Recording

  • 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.

Get All Recordings of a User

  • 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, and time fields.

Get All Recordings

  • 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, and time fields.

Update Recording Title

  • 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'}

Delete a Recording

  • 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!