getWorkflows method
Retrieve all workflows
Implementation
Future<Response> getWorkflows({
bool? active,
String? tags,
String? name,
String? projectId,
bool? excludePinnedData,
int? limit,
String? cursor,
}) async {
try {
final response = await _dio.get(
'/workflows',
queryParameters: {
if (active != null) 'active': active,
if (tags != null) 'tags': tags,
if (name != null) 'name': name,
if (projectId != null) 'projectId': projectId,
if (excludePinnedData != null) 'excludePinnedData': excludePinnedData,
if (limit != null) 'limit': limit,
if (cursor != null) 'cursor': cursor,
},
);
return response;
} on DioException catch (e) {
throw Exception('Failed to retrieve workflows: ${e.message}');
}
}