Extension object
The Extension object comes with CRUD methods and extension-specific methods.
CRUD methods
Crud methods are used to interact with the entity object in the backend or locally.
save(): Save or update the entity into the backend.export(): Export the entity locally as yaml file.refresh(): Refresh (read) the entity from the backend.
save
Save or update the entity into the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update
|
bool
|
Flag to indicate update. |
False
|
Returns:
| Type | Description |
|---|---|
ContextEntity
|
Entity saved. |
export
Export object as a YAML file in the context folder.
Returns:
| Type | Description |
|---|---|
str
|
Exported filepath. |
refresh
Refresh object from backend.
Returns:
| Type | Description |
|---|---|
ContextEntity
|
Entity refreshed. |
Extension specific methods
The extension object exposes the following method:
get_schema(): Get the JSON schema of the extension.
get_schema
Get the JSON schema of the extension.
Returns: str | dict: The JSON schema of the extension.