@@ -83,13 +83,15 @@ def get_all(
83
83
filter : Optional [Dict [str , Any ]] = None ,
84
84
limit : Optional [int ] = None ,
85
85
offset : Optional [int ] = None ,
86
+ workflow_name : Optional [str ] = None ,
86
87
) -> CredentialListResponse :
87
88
"""
88
89
Retrieves all credentials.
89
90
90
91
:param filter: (optional) dictionary specifying the filter criteria.
91
92
:param limit: (optional) maximum number of credentials to retrieve.
92
93
:param offset: (optional) number of credentials to skip before starting retrieval.
94
+ :param workflow_name: (optional) name of the workflow to retrieve credentials for.
93
95
:returns: CredentialListResponse instance.
94
96
:raises: AtlanError on any error during API invocation.
95
97
"""
@@ -101,6 +103,17 @@ def get_all(
101
103
if offset is not None :
102
104
params ["offset" ] = offset
103
105
106
+ if workflow_name is not None :
107
+ if filter is None :
108
+ filter = {}
109
+
110
+ if workflow_name .startswith ("atlan-" ):
111
+ workflow_name = "default-" + workflow_name [len ("atlan-" ) :]
112
+
113
+ filter ["name" ] = f"{ workflow_name } -0"
114
+
115
+ params ["filter" ] = dumps (filter )
116
+
104
117
raw_json = self ._client ._call_api (
105
118
GET_ALL_CREDENTIALS .format_path_with_params (), query_params = params
106
119
)
0 commit comments