0% found this document useful (0 votes)
19 views6 pages

Apis and Their Data Types

The document outlines various API endpoints and their data types for user authentication, profile management, log time tracking, project evaluations, resource access, and SSH key management. Each section specifies the HTTP method, required parameters, and data structures for requests and responses. Key functionalities include user login, profile updates, project state changes, and evaluation processes.

Uploaded by

tiolupopo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Apis and Their Data Types

The document outlines various API endpoints and their data types for user authentication, profile management, log time tracking, project evaluations, resource access, and SSH key management. Each section specifies the HTTP method, required parameters, and data structures for requests and responses. Key functionalities include user login, profile updates, project state changes, and evaluation processes.

Uploaded by

tiolupopo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Apis and their data types

🔐 Auth

Login

 Method: POST

{
email: string;
password: string;
}

👤 User Profile

Get User Profile

 Method: GET

{
name: string;
email: string;
phoneNumber: string;
occupation: string;
wallet: number;
evp: number;
language: string;
status: string;
level: number;
availability: 'available' | 'unavailable';
skills: [
{
name: string;
level: number; // 0.0 - 1.0
}
];
address: string;
}

Update Availability

 Method: PUT

{
availability: 'available' | 'unavailable';
}
Logtime

Post Logtime (Batch)

 Method: POST

[
{
userId: string;
startTime: string;
endTime: string;
duration: number; // in minutes
date: string; // 'YYYY-MM-DD'
}
]

Get Logtime Summary

 Method: GET

[
{
date: string;
totalDuration: number; // in minutes
}
]

📝 Evaluation

Get Evaluations

 Method: GET

[
{
projectId: string;
evaluator?: string;
reviewee?: string;
dueDate: string; // ISO format
completed: boolean;
type: 'reviewer' | 'reviewee';
profileImageUrl: string;
}
]

📦 Projec

Get Projec
 Method: GET

[
{
id: string;
name: string;
duration: string;
type: 'solo' | 'group';
xp: string;
status: string;
performance?: 'pass' | 'fail';
state: 'not_registered' | 'in_progress' | 'submitted';
category: 'Available' | 'Recommended';
language: string;
skills: string[];
description: string;
repo: string;
graded: boolean;
completion: number; // percentage (0 - 100)
tasks: [
{
task: string;
status: 'Completed' | 'InProgress' | 'Notarted';
}
];
evaluator?: string;
}
]

Update Project State

 Method: PATCH

{
state: 'not_registered' | 'in_progress' | 'submitted';
}

🌍 Languages

Get Languages

 Method: GET

{
languages: string[];
}

📚 Resources

Get Resources
 Method: GET

[
{
name: string;
type: 'video' | 'document';
resourceUrl: string;
coverImageUrl: string;
tags: string; // e.g., "most viewed", "most recent", "recommended"
views: number;
}
]

🛒 Shop

Get Shop Items

 Method: GET

[
{
name: string;
imageUrl: string;
price: number;
quantity: number;
}
]

✏️Profile Update

Post Profile Update

 Method: POST

{
firstName: string;
lastName: string;
dateOfBirth: string; // MM/DD/YYYY
email: string;
phoneNumber: string;
address: string;
}

🔐 SSH Keys

Get SSH Keys


 Method: GET

[
{
id: string;
title: string;
key: string;
usageType: string;
createdAt: string; // ISO Date
lastUsed: string; // ISO Date
expiresAt: string; // ISO Date
}
]

Post SSH Key

 Method: POST

{
title: string;
key: string;
usageType: string;
}

🧾 Evaluation Result

Get Evaluation Result

 Method: GET

{
title: string;
status: 'pending' | 'completed';
score: number; // 0 - 100 (Final Score)
group: string;
gitRepo: string;
type: 'solo' | 'group';
xp: string; // e.g., '20XP'
submissionDate: string; // ISO format

automaticEvaluation: {
score: number;
evaluationDate: string; // ISO format
exercises: [
{
name: string;
status: 'OK' | 'Pending' | 'Failed';
}
];
};
manualEvaluation: [
{
score: number;
evaluator: string;
evaluationDate: string; // ISO format
exercises: [
{
name: string;
status: 'OK' | 'Pending' | 'Failed';
}
];
}
];
}

🧠 Evaluation Process

Get Evaluation Questions

 Method: GET

{
title: string;
description: string;
skills: string[];
gitRepo: string;
questions: {
id: number;
question: string;
description: string;
type: 'boolean' | 'text';
}[];
}

Post Evaluation Answer

 Method: POST

{
questionId: number;
answer: boolean | string;
}

You might also like