Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
19-20
8
docs
Commits
31d288e2
Commit
31d288e2
authored
Apr 30, 2020
by
Thomas Frion
Browse files
Update API docu yaml
parent
2618f67c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Project-documentations/api-doc.yaml
View file @
31d288e2
...
...
@@ -17,10 +17,14 @@ consumes:
produces
:
-
application/json
securityDefinitions
:
Basic
:
type
:
basic
Bearer
:
type
:
apiKey
name
:
Authorization
in
:
header
description
:
Authentication uses a JSON Web Token (JWT). To get your JWT you must
use the /token resource.
security
:
-
B
asic
:
[]
-
B
earer
:
[]
paths
:
/token/
:
post
:
...
...
@@ -70,15 +74,26 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
type
:
array
items
:
$ref
:
'
#/definitions/Unit'
tags
:
-
units
post
:
operationId
:
units_create
description
:
'
'
parameters
:
[]
parameters
:
-
name
:
data
in
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/Unit'
responses
:
'
201'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/Unit'
tags
:
-
units
parameters
:
[]
...
...
@@ -90,6 +105,10 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
type
:
array
items
:
$ref
:
'
#/definitions/SettingUnit'
tags
:
-
units
parameters
:
...
...
@@ -105,15 +124,24 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
units
put
:
operationId
:
units_update
description
:
'
'
parameters
:
[]
parameters
:
-
name
:
data
in
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/Unit'
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/Unit'
tags
:
-
units
delete
:
...
...
@@ -122,7 +150,7 @@ paths:
parameters
:
[]
responses
:
'
204'
:
description
:
'
'
description
:
This should not crash (response object with no schema)
tags
:
-
units
parameters
:
...
...
@@ -138,15 +166,24 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
units
put
:
operationId
:
units_update
description
:
'
'
parameters
:
[]
parameters
:
-
name
:
data
in
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/Unit'
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/Unit'
tags
:
-
units
delete
:
...
...
@@ -155,7 +192,7 @@ paths:
parameters
:
[]
responses
:
'
204'
:
description
:
'
'
description
:
This should not crash (response object with no schema)
tags
:
-
units
parameters
:
...
...
@@ -171,15 +208,26 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
type
:
array
items
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
users
post
:
operationId
:
users_create
description
:
'
'
parameters
:
[]
parameters
:
-
name
:
data
in
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/PghmUser'
responses
:
'
201'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
users
parameters
:
[]
...
...
@@ -191,15 +239,24 @@ paths:
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
users
put
:
operationId
:
users_update
description
:
'
'
parameters
:
[]
parameters
:
-
name
:
data
in
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/PghmUser'
responses
:
'
200'
:
description
:
'
'
schema
:
$ref
:
'
#/definitions/PghmUser'
tags
:
-
users
delete
:
...
...
@@ -208,7 +265,7 @@ paths:
parameters
:
[]
responses
:
'
204'
:
description
:
'
'
description
:
This should not crash (response object with no schema)
tags
:
-
users
parameters
:
...
...
@@ -240,3 +297,154 @@ definitions:
title
:
Refresh
type
:
string
minLength
:
1
SettingUnit
:
required
:
-
name
-
value
-
unit
type
:
object
properties
:
id
:
title
:
ID
type
:
integer
readOnly
:
true
name
:
title
:
Name
type
:
string
enum
:
-
Zoom
-
Test
value
:
title
:
Value
type
:
string
maxLength
:
1000
minLength
:
1
unit
:
title
:
Unit
type
:
string
Unit
:
required
:
-
code
-
nom
-
email
type
:
object
properties
:
code
:
title
:
Code
type
:
string
maxLength
:
16
minLength
:
1
nom
:
title
:
Nom
type
:
string
maxLength
:
64
minLength
:
1
email
:
title
:
Email
type
:
string
format
:
email
maxLength
:
64
minLength
:
1
geom
:
title
:
Geom
type
:
string
x-nullable
:
true
dept
:
title
:
Dept
type
:
string
maxLength
:
3
x-nullable
:
true
settings
:
type
:
array
items
:
$ref
:
'
#/definitions/SettingUnit'
readOnly
:
true
User
:
title
:
User
required
:
-
password
-
username
type
:
object
properties
:
id
:
title
:
ID
type
:
integer
readOnly
:
true
password
:
title
:
Password
type
:
string
maxLength
:
128
minLength
:
1
last_login
:
title
:
Last login
type
:
string
format
:
date-time
x-nullable
:
true
is_superuser
:
title
:
Superuser status
description
:
Designates that this user has all permissions without explicitly
assigning them.
type
:
boolean
username
:
title
:
Username
description
:
Required. 150 characters or fewer. Letters, digits and @/./+/-/_
only.
type
:
string
maxLength
:
150
minLength
:
1
first_name
:
title
:
First name
type
:
string
maxLength
:
30
last_name
:
title
:
Last name
type
:
string
maxLength
:
150
email
:
title
:
Email address
type
:
string
format
:
email
maxLength
:
254
is_staff
:
title
:
Staff status
description
:
Designates whether the user can log into this admin site.
type
:
boolean
is_active
:
title
:
Active
description
:
Designates whether this user should be treated as active. Unselect
this instead of deleting accounts.
type
:
boolean
date_joined
:
title
:
Date joined
type
:
string
format
:
date-time
groups
:
description
:
The groups this user belongs to. A user will get all permissions
granted to each of their groups.
type
:
array
items
:
description
:
The groups this user belongs to. A user will get all permissions
granted to each of their groups.
type
:
integer
uniqueItems
:
true
user_permissions
:
description
:
Specific permissions for this user.
type
:
array
items
:
description
:
Specific permissions for this user.
type
:
integer
uniqueItems
:
true
PghmUser
:
required
:
-
unit
-
user
type
:
object
properties
:
id
:
title
:
ID
type
:
integer
readOnly
:
true
unit
:
$ref
:
'
#/definitions/Unit'
user
:
$ref
:
'
#/definitions/User'
Write
Preview
Supports
Markdown
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