ApplicationService
ApplicationService(tm1_rest)
Bases: ObjectService
Service to Read and Write TM1 Applications
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tm1_rest
|
RestService
|
|
required |
Source code in TM1py/Services/ApplicationService.py
create(application, private=False, use_cache=False, **kwargs)
Create Planning Analytics application
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
application
|
Union[Application, DocumentApplication]
|
instance of Application |
required |
private
|
bool
|
boolean |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
|
Source code in TM1py/Services/ApplicationService.py
create_document_from_file(path_to_file, application_path, application_name, private=False, use_cache=False, **kwargs)
Create DocumentApplication in TM1 from local file
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path_to_file
|
str
|
|
required |
application_path
|
str
|
|
required |
application_name
|
str
|
|
required |
private
|
bool
|
|
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
|
Source code in TM1py/Services/ApplicationService.py
delete(path, application_type, application_name, private=False, use_cache=False, **kwargs)
Delete Planning Analytics application reference
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path through folder structure to delete the applications entry. For instance: "Finance/Reports" |
required |
application_type
|
Union[str, ApplicationTypes]
|
type of the to be deleted application entry |
required |
application_name
|
str
|
name of the to be deleted application entry |
required |
private
|
bool
|
Access level of the to be deleted object |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
|
Source code in TM1py/Services/ApplicationService.py
discover(path='', include_private=False, recursive=False, flat=False, **kwargs)
Discover applications in the Applications folder.
Traverses the application hierarchy and returns information about all discovered items including folders, documents, views, and other references.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
starting path (empty string = root 'Applications' folder) |
''
|
include_private
|
bool
|
whether to include private assets in the results |
False
|
recursive
|
bool
|
whether to recurse into subfolders |
False
|
flat
|
bool
|
if True, returns a flat list; if False (default), returns nested structure |
False
|
Returns:
| Type | Description |
|---|---|
List[Dict]
|
list of dictionaries with keys: @odata.type, type, id, name, path, is_private - @odata.type: full OData type (e.g., '#ibm.tm1.api.v1.Folder') - type: simplified type name (e.g., 'Folder') For nested mode, folders also have a 'children' key when recursive=True |
Source code in TM1py/Services/ApplicationService.py
exists(path, application_type, name, private=False, use_cache=False, **kwargs)
Check if application exists
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
|
required |
application_type
|
Union[str, ApplicationTypes]
|
|
required |
name
|
str
|
|
required |
private
|
bool
|
|
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in TM1py/Services/ApplicationService.py
get(path, application_type, name, private=False, use_cache=False, **kwargs)
Retrieve Planning Analytics Application
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path with forward slashes |
required |
application_type
|
Union[str, ApplicationTypes]
|
str or ApplicationType from Enum |
required |
name
|
str
|
|
required |
private
|
bool
|
|
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Application
|
|
Source code in TM1py/Services/ApplicationService.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
get_all_private_root_names(**kwargs)
Retrieve all private root application names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Additional arguments for the REST request. |
{}
|
Returns:
| Type | Description |
|---|---|
|
List of private root application names. |
Source code in TM1py/Services/ApplicationService.py
get_all_public_root_names(**kwargs)
Retrieve all public root application names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Additional arguments for the REST request. |
{}
|
Returns:
| Type | Description |
|---|---|
|
List of public root application names. |
Source code in TM1py/Services/ApplicationService.py
get_document(path, name, private=False, use_cache=False, **kwargs)
Get Excel Application from TM1 Server in binary format. Can be dumped to file.
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path through folder structure to application. For instance: "Finance/P&L.xlsx" |
required |
name
|
str
|
name of the application |
required |
private
|
bool
|
boolean |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
DocumentApplication
|
Return DocumentApplication |
Source code in TM1py/Services/ApplicationService.py
get_names(path, private=False, use_cache=False, **kwargs)
Retrieve Planning Analytics Application names in given path
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path with forward slashes |
required |
private
|
bool
|
boolean - whether to retrieve private or public contents at the leaf |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
|
list of application names |
Source code in TM1py/Services/ApplicationService.py
rename(path, application_type, application_name, new_application_name, private=False, use_cache=False, **kwargs)
Rename a Planning Analytics application.
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path through folder structure |
required |
application_type
|
Union[str, ApplicationTypes]
|
type of the application |
required |
application_name
|
str
|
current name of the application |
required |
new_application_name
|
str
|
new name for the application |
required |
private
|
bool
|
Access level of the object |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
|
|
Source code in TM1py/Services/ApplicationService.py
update(application, private=False, use_cache=False, **kwargs)
Update Planning Analytics application
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
application
|
Union[Application, DocumentApplication]
|
instance of Application |
required |
private
|
bool
|
boolean |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
|
Source code in TM1py/Services/ApplicationService.py
update_document_from_file(path_to_file, application_path, application_name, private=False, use_cache=False, **kwargs)
Update DocumentApplication in TM1 from local file
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path_to_file
|
str
|
|
required |
application_path
|
str
|
|
required |
application_name
|
str
|
|
required |
private
|
bool
|
|
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
|
Source code in TM1py/Services/ApplicationService.py
update_or_create(application, private=False, use_cache=False, **kwargs)
Update or create Planning Analytics application
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
application
|
Union[Application, DocumentApplication]
|
instance of Application |
required |
private
|
bool
|
boolean |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
Response |
Source code in TM1py/Services/ApplicationService.py
update_or_create_document_from_file(path, name, path_to_file, private=False, use_cache=False, **kwargs)
Update or create application from file
Automatically handles mixed public/private folder hierarchies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
application path on server, i.e. 'Finance/Reports' |
required |
name
|
str
|
name of the application on server, i.e. 'Flash.xlsx' |
required |
path_to_file
|
str
|
full local file path of file, i.e. 'C:\Users\User\Flash.xslx' |
required |
private
|
bool
|
access level of the object |
False
|
use_cache
|
bool
|
boolean - whether to cache discovered private boundaries |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
Response |