Add New Analyst
Changed onAdd a new user of the role Analyst to the database. Requires a logged in analyst or an admin.
Args: user: Annotated[User, Depends(get_current_user)]: Logged in user with the role "analyst" or "admin". form_data: (Annotated[OAuth2PasswordRequestForm, Depends()]): The user credentials to add to the database. session: (Annotated[Session, Depends(get_session)]): the database session.
Returns: JSONResponse: A JSON response
Raises: HTTPException: if the logged in user is not an analyst or an admin or if username is already in use or if saving to the database fails for some reason.
post/add_new_analyst
Request
- The document declares no server URL.
- Auth
- OAuth 2PasswordToken URLlogin
- or API key in cookie access_token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body application/x-www-form-urlencoded
Response
Successful Response
unknown required
Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking