Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thibaut Felten
projet-cdaw
Commits
680771c2
Commit
680771c2
authored
Nov 22, 2020
by
thibaut-felten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc maj
parent
ae807c23
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
4 deletions
+60
-4
README.md
backend/MVC/README.md
+2
-2
get_user.md
backend/MVC/doc/get_user.md
+28
-0
get_users.md
backend/MVC/doc/get_users.md
+20
-0
login.md
backend/MVC/doc/login.md
+10
-2
No files found.
backend/MVC/README.md
View file @
680771c2
...
...
@@ -5,8 +5,8 @@
Open endpoints require no Authentication.
*
[
Login
](
doc/login.md
)
:
`POST /api/login/`
*
Get all users data
:
`GET /api.php/users/`
*
Show data of a user
:
`GET /api.php/user/{id}`
*
[
Get all users data
](
doc/get_users.md
)
:
`GET /api.php/users/`
*
[
Show data of a user
](
doc/get_user.md
)
:
`GET /api.php/user/{id}`
*
Create a new user :
`POST /api.php/user/{id}`
*
Delete a user :
`DELETE /api.php/user/{id}`
Should be a closed endpoint.
...
...
backend/MVC/doc/get_user.md
0 → 100644
View file @
680771c2
# User
Used to retrieve the information of one user
**URL**
:
`/api.php/user/{id}`
**Method**
:
`GET`
**Auth required**
: NO
## Success Response
**Code**
:
`200 OK`
**Content example**
```
json
{
"USER_ID"
:
"1"
,
"USER_LOGIN"
:
"loginRoot3"
,
"USER_EMAIL"
:
"toto@gmail.com"
,
"USER_PASSWORD"
:
"$2y$12$d.e18TWr661D9/spQRbE/u5HwK1yNUCDSyAlQwVGZLckBZAOofCmy"
,
"USER_FIRSTNAME"
:
"root"
,
"USER_LASTNAME"
:
"root"
,
"USER_ROLE"
:
"1"
}
```
backend/MVC/doc/get_users.md
0 → 100644
View file @
680771c2
# Users
Used to retrieve the information of all users.
**URL**
:
`/api.php/users/`
**Method**
:
`GET`
**Auth required**
: NO
## Success Response
**Code**
:
`200 OK`
**Content example**
```
json
{
"USER_ID"
:
"1"
,
"USER_LOGIN"
:
"loginRoot3"
,
"USER_EMAIL"
:
"toto@gmail.com"
,
"USER_PASSWORD"
:
"$2y$12$d.e18TWr661D9
\/
spQRbE
\/
u5HwK1yNUCDSyAlQwVGZLckBZAOofCmy"
,
"USER_FIRSTNAME"
:
"root"
,
"USER_LASTNAME"
:
"root"
,
"USER_ROLE"
:
"1"
},{
"USER_ID"
:
"3"
,
"USER_LOGIN"
:
"cunlogin"
,
"USER_EMAIL"
:
"emailtest@test.com"
,
"USER_PASSWORD"
:
"test"
,
"USER_FIRSTNAME"
:
"test"
,
"USER_LASTNAME"
:
"test"
,
"USER_ROLE"
:
"1"
}
```
backend/MVC/doc/login.md
View file @
680771c2
<!-- LOGIN -->
# Login
Used to collect a Token for a registered User.
...
...
@@ -42,9 +40,19 @@ Used to collect a Token for a registered User.
## Error Response
### Missing field
**Condition**
: Missing field pwd or login.
**Code**
:
`422`
**Content**
:
`login and pwd fields are mandatory`
### Wrong password or login
**Condition**
: Wrong combination login/password.
**Code**
:
`422`
**Content**
:
`wrong credentials`
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment