-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathFabric_Core_details.txt
655 lines (642 loc) · 26.1 KB
/
Fabric_Core_details.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
Python Library Documentation: package simplepbi.fabric.core in simplepbi.fabric
NAME
simplepbi.fabric.core
DESCRIPTION
.
@@@@@@@@@@
@@@@..........@@@@
@@@ . @@@
@@. . . @@
@ . _ . . @
@........| |...................@ *********************************************
@ . | | _____ . @
@ . | | | __ \ . @ La Data Web
@ . | |__| | | |. *** @
@........|____| | | |...* *.@ Copyright © 2024 Ignacio Barrau
@ . . | |__| |. * *@
@ . . |_____/ . * *@ *********************************************
@ . . . * *@
@ . . . *******@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
PACKAGE CONTENTS
CLASSES
builtins.object
Git
Items
LongRunningOperations
Onelake
Scheduler
Workspaces
class Git(builtins.object)
| Git(token)
|
| Simple library to use the api and obtain items from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request fabric item API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| commit_to_git(self, workspace_id, mode, comment, workspaceHead, items=None)
| Commits the changes made in the workspace to the connected remote branch.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| mode: string
| The mode for the commit operation.
| comment: string
| Caller-free comment for this commit. Maximum length is 300 characters. If no comment is provided by the caller, use the default Git provider comment.
| workspaceHead: str
| Full SHA hash that the workspace is synced to. The hash can be retrieved from the Git Status API.
| items: itemsIdentifier[]
| Specific items to commit. This is relevant only for Selective commit mode. The items can be retrieved from the Git Status API.
| Each item it's { "logicalId": str uuid, "objectId": str uud }. You can use one of them or both if you have them.
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| connect_git_repo(self, workspace_id, organization, project, repository, branch, directory_name, git_provider_type)
| Connects the workspace to an Azure DevOps repository.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| organization: string
| The Azure DevOps organization name.
| project: string
| The Azure DevOps project name.
| repository: string
| The Azure DevOps repository name.
| branch: string
| The Azure DevOps branch name.
| directory_name: string
| The Azure DevOps directory name.
| git_provider_type: string
| The Git provider type. Example: AzureDevOps
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| disconnect_git_repo(self, workspace_id)
| Disconnects the workspace from an Azure DevOps repository.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| get_git_connection(self, workspace_id)
| Returns git connection details for the specified workspace.
| ### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing a item in the workspace.
|
| get_git_status(self, workspace_id)
| Returns the Git status of items in the workspace, that can be committed to Git.
| ### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing a item in the workspace.
|
| update_from_git(self, workspace_id, item_id, remoteCommitHash, conflictResolution, allowOverrideItems, workspaceHead)
| Updates the workspace with commits pushed to the connected branch.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| remoteCommitHash: string
| Remote full SHA commit hash.
| conflictResolution: string
| Conflict resolution to be used in the update from Git operation. If items are in conflict and a conflict resolution is not specified, the update operation will not start. Example:
| {"ConflictResolutionPolicy": PreferRemote or PreferWorkspace, "ConflictResolutionType": "Workspace"}
| options: options
| Automatically written by simplepbi. Options to be used in the update from Git operation. For now just overrideitems
| allowOverrideItems: bool
| User consent to override incoming items during the update from Git process. When incoming items are present and the allow override items is not specified or is provided as false, the update operation will not start. Default value is false.
| workspace_head: str
| Full SHA hash that the workspace is synced to. The hash can be retrieved from the Git Status API.
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class Items(builtins.object)
| Items(token)
|
| Simple library to use the api and obtain items from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request fabric item API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| create_item(self, workspace_id, displayName, itemType, description=None, parts=None)
| Creates an item in the specified workspace. Preview request, soon we'll add 'definition' parameter
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| displayName: str
| The item display name. The display name must follow naming rules according to item type.
| itemType: str
| The item type. Example: Dashboard, DataPipeline, Datamart, Eventstream, KQLDataConnection, KQLDatabase, KQLQueryset, Lakehouse, MLExperiment, MLModel, MountedWarehouse, Notebook, PaginatedReport, Report, SQLEndpoint, SemanticModel, SparkJobDefinition
| description: str
| The item description. Max length is 256 characters.
| ### Returns
| ----
| Response object from requests library. 201 or 202 OK
| ### Limitations
| ----
| To create a non-PowerBI Fabric item the workspace must be on a supported Fabric capacity type. For more information see Microsoft Fabric license types.
| To create a PowerBI item, the user must have the appropritate license. For more information see Microsoft Fabric license types.
|
| delete_item(self, workspace_id, item_id)
| Deletes the specified item from the specified workspace.
| ### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| get_item(self, workspace_id, item_id)
| Returns the specified item from the specified workspace.
| ### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing a item in the workspace.
| ### Limitations
| ----
| This API is supported for a number of item types, find the supported item types here.
| https://learn.microsoft.com/en-us/rest/api/fabric/articles/item-management/item-management-overview
|
| get_item_definition(self, workspace_id, item_id)
| Returns the specified item definition.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| ### Returns
| ----
| Response object from requests library. 200 OK
| ### Limitations
| ----
| This API is blocked for an item with an encrypted sensitivity label.
|
| list_items(self, workspace_id)
| Returns a list of items from the specified workspace.
| ### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing all the items in the workspace.
|
| simple_deploy_report(self, report_workspace_id, semantic_model_workspace_id, item_path)
| Deploys the semantic model for the specified item.
| #### Parameters
| ----
| report_workspace_id: str uuid
| The workspace id of the destination of the report deployment. You can take it from Fabric URL
| item_path: str
| The semantic model path until [name].Report folder like C:/Users/user/Desktop/[name].Report
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| simple_deploy_semantic_model(self, workspace_id, item_path)
| Deploys the semantic model for the specified item.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_path: str
| The semantic model path until [name].SemanticModel folder like C:/Users/user/Desktop/[name].SemanticModel
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| update_item(self, workspace_id, item_id, displayName=None, description=None)
| Updates the properties of the specified item.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| displayName: str
| The item display name. The display name must follow naming rules according to item type.
| description: str
| The item description. Max length is 256 characters.
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| update_item_definition(self, workspace_id, item_id, parts, format=None)
| Overrides the definition for the specified item.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| parts: ItemDefinitionPart[]
| A list of definition parts. part, payload and payloadtype description. Read API Docs for more details.
| format: str
| The format of the item definition.
|
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class LongRunningOperations(builtins.object)
| LongRunningOperations(token)
|
| Simple library to use the Long Running Operations api and obtain operation status from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request operations API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| get_operation_result(self, operation_id)
| Returns the result of the long running operation
| #### Parameters
| ----
| operation_id: str uuid
| The operation id from the header of a run operation.
| ### Returns
| ----
| Dict:
| A dictionary containing the state of the operation
|
| get_operation_state(self, operation_id)
| Returns the current state of the long running operation
| #### Parameters
| ----
| operation_id: str uuid
| The operation id from the header of a run operation.
| ### Returns
| ----
| Dict:
| A dictionary containing the state of the operation
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class Onelake(builtins.object)
| Onelake(token)
|
| Simple library to use the onelake api and obtain items from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request onelake API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| create_shortcut(self, workspace_id, item_id, name, path, target, shortcut_conflict_policy=None)
| Creates a shortcut in the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| name: string
| The shortcut name.
| path: string
| The shortcut path.
| target: string
| The shortcut target.
| shortcut_conflict_policy: string
| The shortcut conflict policy. { "Abort", "GenerateUniqueName" }
| ### Returns
| ----
| Response object from requests library. 201 OK
|
| delete_shortcut(self, workspace_id, item_id, shortcut_path, shortcut_name)
| Deletes the specified shortcut from the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| shortcut_path: string
| The shortcut path.
| shortcut_name: string
| The shortcut name.
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| get_shortcut(self, workspace_id, item_id, shortcut_path, shortcut_name)
| Returns the specified shortcut from the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| shortcut_path: string
| The shortcut path.
| shortcut_name: string
| The shortcut name.
| ### Returns
| ----
| Dict:
| A dictionary containing a shortcut in the workspace.
|
| list_data_access_roles(self, workspace_id, item_id, return_pandas=False)
| Returns a list of data access roles for the specified item in the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing all the data access roles in the workspace.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class Scheduler(builtins.object)
| Scheduler(token)
|
| Simple library to use the api and obtain job scheduler from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request fabric job scheduler API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| cancel_item_job_instance(self, workspace_id, item_id, job_instance_id)
| Cancels the specified job instance for the specified item.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| job_instance_id: str uuid
| The job instance id.
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| get_item_job_instance(self, workspace_id, item_id, job_instance_id)
| Returns the specified job instance for the specified item.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| job_instance_id: str uuid
| The job instance id.
| ### Returns
| ----
| Dict:
| A dictionary containing a job instance in the workspace.
|
| run_on_demand_item_job(self, workspace_id, item_id, jobType)
| Run on-demand item job instance.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| item_id: str uuid
| The item id. You can take it from Fabric URL
| jobType: string
| The job type, for now just "DefaultJob"
| executionData: str
| Execution data for the job. Preview parameter, a working progress from the API
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class Workspaces(builtins.object)
| Workspaces(token)
|
| Simple library to use the api and obtain workspaces from it.
|
| Methods defined here:
|
| __init__(self, token)
| Create a simplePBI object to request fabric core workspaces API
| Args:
| token: String
| Bearer Token to use the Rest API
|
| add_workspace_role_assignment(self, workspace_id, principal_id, principal_type, role)
| Adds a role assignment to the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| principal_id: str uuid
| The principal id.
| principal_type: string
| The principal type. { "User", "Group", "ServicePrincipal", "ServicePrincipalProfile" }
| role: string
| The role. Workspace role, like { "Member", "Admin", "Contributor", "Viewer"}
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| assign_workspace_to_capacity(self, workspace_id, capacity_id)
| Assigns the specified workspace to the specified capacity.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| capacity_id: str uuid
| The capacity id.
| ### Returns
| ----
| Response object from requests library. 202 OK
|
| create_workspace(self, displayName, capacity_id=None, description=None)
| Creates a workspace.
| #### Parameters
| ----
| displayName: string
| The workspace display name. The display name must follow naming rules according to item type.
| capacity_id: str uuid
| The capacity id.
| description: string
| The workspace description. Max length is 256 characters.
| ### Returns
| ----
| Response object from requests library. 201 OK
|
| delete_workspace(self, workspace_id)
| Deletes the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| delete_workspace_role_assignment_by_principal_id(self, workspace_id, principal_id)
| Deletes the specified role assignment for the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| principal_id: str uuid
| The principal id.
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| get_workspace(self, workspace_id)
| Returns the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Dict:
| A dictionary containing a workspace.
|
| list_workspaces(self, roles, return_pandas=False)
| Returns a list of workspaces for the specified role.
| #### Parameters
| ----
| roles: string
| The role. Workspace role, like { "Member", "Admin", "Contributor", "Viewer"}
| ### Returns
| ----
| Dict:
| A dictionary containing all the workspaces.
|
| unassign_workspace_from_capacity(self, workspace_id)
| Unassigns the specified workspace from the capacity.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| update_workspace(self, workspace_id, displayName=None, description=None)
| Updates the properties of the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| displayName: string
| The workspace display name. The display name must follow naming rules according to item type.
| description: string
| The workspace description. Max length is 256 characters.
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| update_workspace_role_assignment(self, workspace_id, principal_id, role)
| Updates the specified role assignment for the specified workspace.
| #### Parameters
| ----
| workspace_id: str uuid
| The workspace id. You can take it from Fabric URL
| principal_id: str uuid
| The principal id.
| role: string
| The role. Workspace role, like { "Member", "Admin", "Contributor", "Viewer"}
| ### Returns
| ----
| Response object from requests library. 200 OK
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
FILE
c:\users\ibarrau\documents\github\simplepbi\simplepbi\fabric\core\__init__.py