-
Bernard Roland (Student Com20) authoredBernard Roland (Student Com20) authored
users.md 3.05 KiB
Users
/user/name/:username
GET Request a users id based on his username. This will return 404 if the user does not exist in the service.
Response body
interface Body {
status: string;
user: {
id: string;
username: string;
};
}
/user/:uuid/image
GET Get the image avatar for the user with the given uuid. If the user does not exist or the user has
not set a avatar 404 will be returned. The returned image has the Content-Type
set to image/png
.
/user/
[requires authentication]
GET Get information on the user that is authenticated in the request.
Response body
interface Body {
status: string;
user: {
id: string;
username: string;
email: string;
realname: string;
};
}
/user/tasks
[requires authentication]
GET Get all the tasks that the authenticated user is assigned to and are not yet finished.
Response body
interface Body {
status: string;
tasks: {
id: string;
project: string;
name: string;
text: string;
icon: string;
priority: string;
status: string;
dependencies: string[];
requirements: {
role: string;
time: number;
}[];
assigned: {
user: string;
time: number;
finished: boolean;
}[];
created: number;
edited: number;
color: string;
}[];
}
/user/work?since=X&to=X
[requires authentication]
GET Get all the work items created by the authenticated user.
Response body
interface Body {
status: string;
work: {
id: string;
task: string;
user: string;
started: number;
finished: number;
}[];
}
/user/activity?since=X&to=X
[requires authentication]
GET Get the activity for the authenticated user.
Response body
interface Body {
status: string;
activity: {
day: string;
time: number;
}[];
}
/user/completion?since=X&to=X
[requires authentication]
GET Get the completion data for all tasks the user is assigned to.
Response body
interface Body {
status: string;
completion: {
open: number;
closed: number;
suspended: number;
overdue: number;
};
}
/user/
[requires authentication]
PUT Request an update to the authenticated users information.