forked from FRReinert/PySSRS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListDir.py
More file actions
40 lines (33 loc) · 1.05 KB
/
Copy pathListDir.py
File metadata and controls
40 lines (33 loc) · 1.05 KB
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import connection_data as d
import context
from SSRS import SSRS
RS = SSRS(d._service, d._execution, d._user, d._psw)
BaseDirObjects = RS.ListDirItems()
if BaseDirObjects:
print(
'''
List of Objects in the root container (/)
-> To check other directorys use the <dir> parameter
-> To retrieve the directory and subdirectory's objects use <recursive=True> as a param
Available information:
ID
Name
Path
TypeName
CreationDate
ModifiedDate
CreatedBy
ModifiedBy
ItemMetadata
Examples of usage:
BaseDirObjects = RS.ListDirItems()
BaseDirObjects = RS.ListDirItems(dir='/Customers')
BaseDirObjects = RS.ListDirItems(recursive=True)
'''
)
for key, value in BaseDirObjects.items() :
print('ID:', key)
for key2, value2 in value.items():
print(key2,':', value2)