Admin
Use the API to managing users, keys, and access as PDAP staff
Last updated
Use the API to managing users, keys, and access as PDAP staff
Last updated
POST
[base-url]/user
Users can sign up for an account through the post function in resources/User.py. The user's password is hashed using werkzeug.security’s generate_pasword_hash function. The user's email and hashed password is stored in the users table in the Data Sources database.
Name | Type | Description |
---|---|---|
PUT
[base-url]/user
Users can update their password through the put function in resources/User.py. The user's password is hashed using werkzeug.security’s generate_pasword_hash function. The user's email and hashed password is stored in the users table in the Data Sources database.
POST
[base-url]/login
The login function can be found through the get function in resources/Login.py. If the email and password match a row in the database, "Successfully logged in" will be returned.
POST
[base-url]/refresh-session
The logic can be found in the post function in resources/RefreshSession.py. If the old session token matches a row in the database, "Successfully refreshed session token" will be returned.
POST
[base-url]/request-reset-password
This functionality can be found in the get function in resources/RequestResetPassword.py. If the email and password match a row in the database, "Successfully logged in" will be returned.
POST
[base-url]/request-reset-password
This functionality can be found in the get function in resources/RequestResetPassword.py. If the email and password match a row in the database, "Successfully logged in" will be returned.
POST
[base-url]/reset-token-validation
This functionality can be found in the get function in resources/ResetTokenValidation.py. If the token matches a row in the database, "Token is valid" will be returned.
GET
[base-url]/api_key
The key generation function can be found through the get function in resources/ApiKey. If the email and password match a row in the database, a new API key is created using uuid.uuid4().hex, updated in for the matching user in the users table, and the API key is sent to the user.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
email*
String
User's email - must be unique
password*
String
User's password
email*
String
User's email - must be unique
password*
String
User's password
email*
String
Matches exactly with the "email" property in user's table
password*
String
Checked against the password_digest for the user with the matching "email" property using werkzeug.security’s check_password_hash function
email*
String
Matches exactly with the "email" property in user's table
password*
String
Checked against the password_digest for the user with the matching "email" property using werkzeug.security’s check_password_hash function
email*
String
Matches exactly with the "email" property in user's table
email*
String
Matches exactly with the "email" property in user's table
token*
String
Reset password token
email*
String
Matches exactly with the "email" property in user's table
password*
String
Checked against the password_digest for the user with the matching "email" property using werkzeug.security’s check_password_hash function