Configurations

Upsert

post

Upsert a configuration entry.

Creates a new configuration if the provided id does not exist, or updates the existing configuration with the given id.

Args: request (Configuration): The configuration data to insert or update. db (AsyncSession): The database session dependency.

Returns: JSONResponse: A JSON response containing the configuration data that was upserted.

Raises: HTTPException: If the operation encounters an unexpected error (not currently implemented, but can be added for error handling).

Notes: - Uses FastCRUD for abstracted DB operations. - Relies on the id field to determine insert vs update.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Body

Configuration model.

idintegerRequired
namestringRequired
titleany ofRequired
stringOptional
or
nullOptional
valueany ofRequired
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
Responseany
post
/configurations/upsert

No content

Get

get

Read multiple ConfigurationModel rows from the database.

  • Use page & itemsPerPage for paginated results

  • Use offset & limit for specific ranges

  • Returns paginated response when using page/itemsPerPage

  • Returns simple list response when using offset/limit

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Query parameters
offsetany ofOptional

Offset for unpaginated queries

integerOptional
or
nullOptional
limitany ofOptional

Limit for unpaginated queries

integerOptional
or
nullOptional
pageany ofOptional

Page number

integerOptional
or
nullOptional
itemsPerPageany ofOptional

Number of items per page

integerOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
Responseany of
or
get
/configurations

Create

post

Create a new ConfigurationModel row in the database.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Body

Create Configuration model.

namestringRequired
titlestringRequired
valuestringRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
post
/configurations

No content

Get

get

Read a single ConfigurationModel row from the database by its primary keys: ['id'].

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
idintegerRequired
Responses
chevron-right
200

Successful Response

application/json
get
/configurations/{id}

Delete

delete

Delete a ConfigurationModel row from the database by its primary keys: ['id'].

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
idintegerRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
delete
/configurations/{id}

No content

Update

patch

Update an existing ConfigurationModel row in the database by its primary keys: ['id'].

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Read Permissions
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
idintegerRequired
Body

Create Configuration model.

namestringRequired
titlestringRequired
valuestringRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
patch
/configurations/{id}

No content

Last updated