APIs for Review
Create Workflow
http
POST /api/workflow/{workspace_id}/workflowRequest Body
ts
type CreateWorkflowReq = {
type: "video" | "canvas" | "list";
task_name: string;
start_date: string;
};Response
ts
type WorkflowCreateRes = {
success: boolean;
message: string;
data: {
workflow_id: string;
workspace_id: string;
type: string;
task_name: string;
start_date: Date;
created_by: string;
last_updated_at: Date;
};
};Rename Workflow
http
PUT /api/workflow/{workspace_id}/workflow/{workflow_id}Request Body
ts
type RenameWorkflowReq = {
type: "video" | "canvas" | "list";
task_name: string;
start_date: string;
};Response
ts
type WorkflowRenameRes = {
success: boolean;
message: string;
data: {
workflow_id: string;
workspace_id: string;
type: string;
task_name: string;
start_date: Date;
created_by: string;
last_updated_at: Date;
};
};Get All workflow and get workflow by Id
http
GET /api/workflow/{workspace_id}/workflowhttp
GET /api/workflow/{workspace_id}/workflow/{workflow_id}Request Body
No request body is required for this endpoint.
Response
ts
type Workflow = {
success: boolean;
message: string;
data: Data[];
};
type Data = {
workflow_id: string;
workspace_id: string;
type: Type;
task_name: string;
start_date: Date;
created_by: CreatedBy;
last_updated_at: Date;
};
type Type = {
Canvas = "canvas",
List = "list",
Video = "video",
}Delete Workflow
http
DELETE /api/workflow/{workspace_id}/workflow/{workflow_id}Request Body
No request body is required for this endpoint.
Response
ts
type DeleteWorkflow = {
success: boolean;
message: string;
};Update Data(for canavs)/ Path(for video)
http
PUT /api/workflow/{workspace_id}/workflow/{workflow_id}/dataRequst Body
ts
type UpdateDataOrPath = {
type: string;
title: string;
data: string | null; //for canavs
path: string | null; // for video
};Response
ts
type UpdateDataResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
id: string;
workspace_id: string;
workflow_id: string;
type: string;
path: string | null;
data: string | null;
task_id: string | null;
title: string;
created_at: Date;
};Get All Videos of Workflow
http
GET /api/workflow/{workspace_id}/workflow/{workflow_id}/videosRequest Body
No request body is required for this endpoint.
Response
ts
type WorkflowResponse = {
success: boolean;
message: string;
data: WorkflowVideo[];
};
type WorkflowVideo = {
id: string;
workspace_id: string;
workflow_id: string;
type: string;
path: string;
task_id: null;
title: string;
created_at: Date;
data: null;
duration: null;
url: string;
};Add Video
http
POST /api/workflow/{workspace_id}/workflow/{workflow_id}/videosRequest Body
ts
type Video = {
type: string;
title: string;
path: string;
duration: string;
};Response
ts
type VideoResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
id: string;
workspace_id: string;
workflow_id: string;
type: string;
path: string;
data: null;
task_id: null;
title: string;
created_at: Date;
duration: string;
};Update file title
http
PUT /api/workflow/{workspace_id}/workflow/{fileId}/renameRequest Body
ts
type RenameTitle = {
title: string;
};Response
ts
type VideoResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
id: string;
workspace_id: string;
workflow_id: string;
type: string;
path: string;
data: null;
task_id: null;
title: string;
created_at: Date;
};Delete file(video/ canvas)
http
DELETE /api/worflow/{workspace_id}/{workflow_id}/data/{file_id}Request Body
No request body is required for this endpoint.
Response
ts
type DeleteResponse = {
success: boolean;
message: string;
};Export File
http
GET /api/workflow/{workspace_id}/{id}/exportRequest query if file type is canvas or list
format? pdf or doc
Request Body
No request body is required for this endpoint.
Response
A file will be downloaded
Get review files based on type
http
GET /api/review/{workspace_id}/review/{type}/{id}Params
type : project/tasl/event/workflow based on type pass that file_id as id
Response
ts
type FilesResponse = {
success: boolean;
message: string;
data: Data;
url: string; //readSignedUrl
};
type Data = {
file_id: string;
workspace_id: string;
project_id: string;
file_name: string;
file_path: string;
file_type: string;
uploaded_by: string;
uploaded_at: Date;
folder_id: string;
};Review Comments
Add Comments
http
POST /api/review/{file_id}/commentRequest Body
ts
type Comment = {
type: "video" | "document";
content: string;
data: DataForVideo | DataForCanvas;
};
type DataForVideo = {
startTime: number;
duration: number;
drawing: string;
};
type DataForCanvas = {
id?: string;
tab_id?: string;
};Response
ts
type CommentResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
comment_id: string;
file_id: string;
type: string;
content: string;
parent_comment_id: null;
data: VideoData | CanvasData;
commented_by: string;
created_at: Date;
};
type VideoData = {
drawing: string;
duration: number;
startTime: number;
};
type CanvasData = {
id: string;
};Update Comment
http
PUT /api/review/{file_id}/comment/{comment_id}Request Body
ts
type UpdateComment = {
content: string;
data: DataForVideo | DataForCanvas;
};
type DataForVideo = {
startTime: number;
duration: number;
drawing: string;
};
type DataForCanvas = {
id: string;
};Response
ts
type UpdateResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
comment_id: string;
file_id: string;
type: string;
content: string;
parent_comment_id: null;
data: VideoData | CanvasData;
commented_by: string;
created_at: Date;
};
type VideoData = {
drawing: string;
duration: number;
startTime: number;
};
type CanvasData = {
id: string;
};Add Reply to Comment
http
POST /api/review/{file_id}/comment/{parent_comment_id}/replyRequest Body
ts
type Comment = {
type: "video" | "document";
content: string;
data: DataForVideo | DataForCanvas;
};
type DataForVideo = {
startTime: number;
duration: number;
drawing: string;
};
type DataForCanvas = {
id: string;
};Response
ts
type ReplyResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
comment_id: string;
file_id: string;
type: string;
content: string;
parent_comment_id: string;
data: VideoData | CanvasData;
commented_by: string;
created_at: Date;
};
type VideoData = {
drawing: string;
duration: number;
startTime: number;
};
type CanvasData = {
id: string;
};Get all Comments and Replies
http
GET /api/review/{file_id}/commentsRequest Body
No Body Required
Response
ts
type CommentsAndReplies = {
success: boolean;
message: string;
data: Data[];
};
type Data = {
comment_id: string;
file_id: string;
type: string;
content: string;
parent_comment_id: null;
data: VideoData | CanvasData;
commented_by: string;
created_at: Date;
replies: Reply[];
};
type Reply = {
comment_id: string;
file_id: string;
type: string;
content: string;
parent_comment_id: string;
data: VideoData | CanvasData;
commented_by: string;
created_at: Date;
replies: any[];
};
type VideoData = {
drawing: string;
duration: number;
startTime: number;
};
type CanvasData = {
id: string;
};