getSourcesIDBucketsWithHttpInfo method

Future<Response> getSourcesIDBucketsWithHttpInfo(
  1. String sourceID, {
  2. String? zapTraceSpan,
  3. String? org,
})

Get buckets in a source

Note: This method returns the HTTP Response.

Parameters:

  • String sourceID (required): The source ID.

  • String zapTraceSpan: OpenTracing span context

  • String org: The name of the organization.

Implementation

Future<Response> getSourcesIDBucketsWithHttpInfo(
  String sourceID, {
  String? zapTraceSpan,
  String? org,
}) async {
  final path =
      r'/sources/{sourceID}/buckets'.replaceAll('{sourceID}', sourceID);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (org != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', 'org', org));
  }

  if (zapTraceSpan != null) {
    headerParams[r'Zap-Trace-Span'] = parameterToString(zapTraceSpan);
  }

  const authNames = <String>[
    'BasicAuthentication',
    'QuerystringAuthentication',
    'TokenAuthentication'
  ];
  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes[0],
    authNames,
  );
}