SourcesAPI

public class SourcesAPI
  • Declaration

    Swift

    public init(influxDB2API: InfluxDB2API)
  • Delete a source

    Declaration

    Swift

    public func deleteSourcesID(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Delete a source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func deleteSourcesID(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • List all sources

    Declaration

    Swift

    public func getSources(zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Sources?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    zapTraceSpan

    (header) OpenTracing span context (optional)

    org

    (query) The name of the organization. (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • List all sources

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func getSources(zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Sources?

    Parameters

    zapTraceSpan

    (header) OpenTracing span context (optional)

    org

    (query) The name of the organization. (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Retrieve a source

    Declaration

    Swift

    public func getSourcesID(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Source?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Retrieve a source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func getSourcesID(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Source?

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Get buckets in a source

    Declaration

    Swift

    public func getSourcesIDBuckets(sourceID: String, zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Buckets?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    org

    (query) The name of the organization. (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Get buckets in a source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func getSourcesIDBuckets(sourceID: String, zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Buckets?

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    org

    (query) The name of the organization. (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Get the health of a source

    Declaration

    Swift

    public func getSourcesIDHealth(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: HealthCheck?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Get the health of a source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func getSourcesIDHealth(sourceID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> HealthCheck?

    Parameters

    sourceID

    (path) The source ID.

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Update a Source

    Declaration

    Swift

    public func patchSourcesID(sourceID: String, source: Source, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Source?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    sourceID

    (path) The source ID.

    source

    (body) Source update

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Update a Source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func patchSourcesID(sourceID: String, source: Source, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Source?

    Parameters

    sourceID

    (path) The source ID.

    source

    (body) Source update

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Create a source

    Declaration

    Swift

    public func postSources(source: Source, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Source?, _ error: InfluxDBClient.InfluxDBError?) -> Void)

    Parameters

    source

    (body) Source to create

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects

  • Create a source

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    public func postSources(source: Source, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Source?

    Parameters

    source

    (body) Source to create

    zapTraceSpan

    (header) OpenTracing span context (optional)

    apiResponseQueue

    The queue on which api response is dispatched.

    completion

    completion handler to receive the data and the error objects