space.py
Space (CelonisApiObject)
¶
Space object to interact with Celonis Studio API.
url: str
property
readonly
¶
API
/package-manager/api/spaces/{space_id}
packages: CelonisCollection[Package]
property
readonly
¶
Get all Packages of the Space.
API
GET: /package-manager/api/nodes/tree?spaceId={self.id}
Returns:
Type | Description |
---|---|
CelonisCollection[Package] |
Collection of Packages. |
name: str
inherited
property
writable
¶
Name of the object via data['name']
if available.
data
inherited
property
writable
¶
Response data from the Celonis API.
If static
is set to False
, every time you set the data
property will execute a POST
request to
the resource API endpoint to update the remote resource in Celonis EMS.
Examples:
o = celonis.<api-service>.find("<name or ID")
# This will execute a `POST` request to '<celonis_url>/<api-service>/api/...'
o.data["name"] = "New Name"
key: str
inherited
property
writable
¶
Key of the object via data['key']
if available.
create_package(self, name, key=None, package_type='APP')
¶
Creates a new Package.
!!! api "API"
- `POST: /package-manager/api/nodes`
```json
{
"key": key or name,
"name": name,
"nodeType": "PACKAGE",
"serializedContent": f"packageType: {package_type}
variables: [] dependencies: [] ", "spaceId": self.id, } ```
!!! args
name: Name of the package.
key: Key of the package, if left blank defaults to name of the Package.
package_type: Package type. One of [`APP`, `LIBRARY`, `INSTRUMENT`].
!!! returns
The newly created Package object.
delete(self)
¶
Deletes the Space and all child objects.
API
POST: /package-manager/api/spaces/delete/{space_id}
json { "id": self.id, "name": self.name, }
reset_state(self)
inherited
¶
Resets data = None
.
This will force a reload of the remote resource from Celonis EMS on the next property access.