Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WIE_202021_CSBillero11
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bernard Roland (Student Com20)
WIE_202021_CSBillero11
Commits
d013306c
Commit
d013306c
authored
3 years ago
by
Bernard Roland (Student Com20)
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation for the user api
parent
f655b2a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/api/users.md
+164
-0
164 additions, 0 deletions
docs/api/users.md
with
164 additions
and
0 deletions
docs/api/users.md
+
164
−
0
View file @
d013306c
## Users
### GET `/user/name/:username`
Request a users id based on his username. This will return 404 if the user does not exist in the
service.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
user
:
{
id
:
string
;
username
:
string
;
};
}
```
### GET `/user/:uuid/image`
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`
.
### GET `/user/` [requires authentication]
Get information on the user that is authenticated in the request.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
user
:
{
id
:
string
;
username
:
string
;
email
:
string
;
realname
:
string
;
};
}
```
### GET `/user/tasks` [requires authentication]
Get all the tasks that the authenticated user is assigned to and are not yet finished.
#### Response body
```
typescript
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
;
}[];
}
```
### GET `/user/work?since=X&to=X` [requires authentication]
Get all the work items created by the authenticated user.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
work
:
{
id
:
string
;
task
:
string
;
user
:
string
;
started
:
number
;
finished
:
number
;
}[];
}
```
### GET `/user/activity?since=X&to=X` [requires authentication]
Get the activity for the authenticated user.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
activity
:
{
day
:
string
;
time
:
number
;
}[];
}
```
### GET `/user/completion?since=X&to=X` [requires authentication]
Get the completion data for all tasks the user is assigned to.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
completion
:
{
open
:
number
;
closed
:
number
;
suspended
:
number
;
overdue
:
number
;
};
}
```
### PUT `/user/` [requires authentication]
Request an update to the authenticated users information.
#### Request body
```
typescript
interface
Body
{
realname
?:
string
;
email
?:
string
;
}
```
### PUT `/user/image` [requires authentication]
Update the image of the authenticated user. The image should be submitted as a file element in a
FormData object called
`image`
.
### GET `/user/:uuid` [requires authentication]
Get information on the user with the given uuid.
#### Response body
```
typescript
interface
Body
{
status
:
string
;
user
:
{
id
:
string
;
username
:
string
;
email
:
string
;
realname
:
string
;
};
}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment