Bases: object
Abstract handler for API requests.
Handle a REST request.
Return true iff handler supports the request.
Bases: congress.api.webservice.AbstractApiHandler
API handler for REST collection resources.
REST collections represent collections of entities in the data model, and often support the following operations:
- List elements in the collection
- Create new element in the collection
Handle a REST request.
Bases: exceptions.Exception
Congress API Data Model Exception
Custom exception raised by API Data Model methods to communicate errors to the API framework.
Generate a DataModelException from an existing CongressException.
:param error has a ‘name’ field corresponding to an error_codes error-name. It may also have a ‘data’ field. Returns a DataModelException properly populated.
Bases: congress.api.webservice.AbstractApiHandler
API handler for REST element resources.
REST elements represent individual entities in the data model, and often support the following operations:
- Read a representation of the element
- Update (replace) the entire element with a new version
- Update (patch) parts of the element with new values
- Delete the element
Elements may also exhibit ‘controller’ semantics for RPC-style method invocation, however this is not currently supported.
Handle a REST request.
Bases: object
A container providing access to a single type of data.
Add item to model.
item: The item to add to the model params: A dict-like object containing parameters
from the request query string and body.
id_: The ID of the item, or None if an ID should be generated context: Key-values providing frame of reference of request
Remove item from model.
Get items in model.
context: Key-values providing frame of reference of request
Update item with id_ with new data.
id_: The ID of the item to be updated item: The new item params: A dict-like object containing parameters
from the request query string and body.
context: Key-values providing frame of reference of request
Update items in the model.
Construct and return an error response.
Undo oslo-messaging added traceback to return original exception msg