-
Notifications
You must be signed in to change notification settings - Fork 45
Generate Password API
Marius David Wieschollek edited this page Feb 4, 2024
·
2 revisions
The password endpoint uses the service defined in the app settings andthe users settings to generate a new password which is not in the breached passwords database.
[[TOC]]
App Version | Change |
---|---|
2018.1.0 | Initial introduction of the API |
2018.12.0 | The "strength" limit of 4 is enforced |
This API endpoint generates a new password with the users default settings
Path | Method |
---|---|
/api/1.0/service/password |
GET |
- Nextcloud Authentication required
- Authenticated API Session required
The success status code is 200 Ok
Status | MIME | Type | Description |
---|---|---|---|
200 | application/json | object | An object with generated password |
503 | application/json | object | Error object. |
502 | application/json | object | Error object. |
Property | Type | Description |
---|---|---|
password | string | The generated password |
words | string | The words used in the password |
strength | int | The strength setting used |
numbers | bool | Whether or not numbers were used in the password |
special | bool | Whether or not special characters were used in the password |
{
"password": "FutureReleaseDrawRed",
"words": [
"Future",
"Release",
"Draw",
"Red"
],
"strength": 1,
"numbers": false,
"special": false
}
Code | Message | Description |
---|---|---|
74b8fcb3 | Unable to generate password | The service could not create a password for the given settings. |
43486931 | Internal Words API Error | The configured random words service failed. |
- Generated passwords are checked against the breached passwords database automatically
Generate a password with the settings provided in the request and use the users default setting for any not provided setting.
Path | Method |
---|---|
/api/1.0/service/password |
POST |
This endpoint accepts a JSON formatted request body with an object with the following properties.
Arguments | Type | Default | Required | Description |
---|---|---|---|---|
strength | int | 1 | no | A value from 0 to 4. (>=0 && <=4 ) A higher value creates a longer and more complex password |
numbers | bool | false | no | Whether or not numbers should be used in the password |
special | bool | false | no | Whether or not special characters should be used in the password |
- Nextcloud Authentication required
- Authenticated API Session required
The success status code is 200 Ok
Status | MIME | Type | Description |
---|---|---|---|
200 | application/json | object | An object with generated password |
503 | application/json | object | Error object. |
502 | application/json | object | Error object. |
Property | Type | Description |
---|---|---|
password | string | The generated password |
words | string | The words used in the password |
strength | int | The strength setting used |
numbers | bool | Whether or not numbers were used in the password |
special | bool | Whether or not special characters were used in the password |
{
"password": "FutureReleaseDrawRed",
"words": [
"Future",
"Release",
"Draw",
"Red"
],
"strength": 1,
"numbers": false,
"special": false
}
Code | Message | Description |
---|---|---|
74b8fcb3 | Unable to generate password | The service could not create a password for the given settings. |
43486931 | Internal Words API Error | The configured random words service failed. |
- Generated passwords are checked against the breached passwords database automatically