API methods and descriptions#
api.portal
#
Get the Plone portal object out of thin air. |
|
|
Get the navigation root object for the context. |
|
Get a portal tool in a simple way. |
|
Display a date/time in a user-friendly way. |
|
Send an email. |
|
Display a status message. |
|
Get a record value from |
api.content
#
|
Get an object. |
|
Create a new content item. |
|
Delete the object(s). |
|
Copy the object to the target container. |
|
Move the object to the target container. |
|
Rename the object. |
|
Get the object's Universally Unique IDentifier (UUID). |
|
Get the current workflow state of the object. |
|
Perform a workflow transition. |
|
Get a BrowserView object. |
api.user
#
|
Get a user. |
|
Create a user. |
|
Delete a user. |
Get the currently logged-in user. |
|
Check if the currently logged-in user is anonymous. |
|
|
Get all users or all users filtered by group. |
|
Get user's site-wide or local roles. |
|
Get user's site-wide or local permissions. |
|
Grant roles to a user. |
|
Revoke roles from a user. |
api.group
#
|
Get a group. |
|
Create a group. |
|
Delete a group. |
|
Add the user to a group. |
|
Remove the user from a group. |
|
Get all groups or all groups filtered by user. |
|
Get group's site-wide or local roles. |
|
Grant roles to a group. |
|
Revoke roles from a group. |
api.env
#
|
Context manager for temporarily switching roles. |
|
Context manager for temporarily switching user inside a block. |
Return True if your zope instance is running in debug mode. |
|
Returns True if you are running the zope test runner. |
api.relation
#
|
Get specific relations given a source/target/relationship. |
|
Create a relation from source to target using zc.relation. |
|
Delete relation or relations. |
Exceptions and errors#
Base exception class for plone.api errors. |
|
Raised when a parameter is missing. |
|
Raised when a parameter is invalid. |
|
Raised when the portal object cannot be retrieved. |