confluent-kafka-dotnet
Show / Hide Table of Contents

Class RestService

Inheritance
object
RestService
DekRestService
Implements
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.SchemaRegistry
Assembly: Confluent.SchemaRegistry.dll
Syntax
public class RestService : IDisposable

Constructors

RestService(string, int, IAuthenticationHeaderValueProvider, List<X509Certificate2>, bool, List<X509Certificate2>, IWebProxy, int, int, int, int)

Initializes a new instance of the RestService class.

Declaration
public RestService(string schemaRegistryUrl, int timeoutMs, IAuthenticationHeaderValueProvider authenticationHeaderValueProvider, List<X509Certificate2> certificates, bool enableSslCertificateVerification, List<X509Certificate2> sslCaCertificates = null, IWebProxy proxy = null, int maxRetries = 3, int retriesWaitMs = 1000, int retriesMaxWaitMs = 20000, int maxConnectionsPerServer = 20)
Parameters
Type Name Description
string schemaRegistryUrl
int timeoutMs
IAuthenticationHeaderValueProvider authenticationHeaderValueProvider
List<X509Certificate2> certificates
bool enableSslCertificateVerification
List<X509Certificate2> sslCaCertificates
IWebProxy proxy
int maxRetries
int retriesWaitMs
int retriesMaxWaitMs
int maxConnectionsPerServer

Fields

DefaultMaxConnectionsPerServer

Declaration
public const int DefaultMaxConnectionsPerServer = 20
Field Value
Type Description
int

DefaultMaxRetries

Declaration
public const int DefaultMaxRetries = 3
Field Value
Type Description
int

DefaultRetriesMaxWaitMs

Declaration
public const int DefaultRetriesMaxWaitMs = 20000
Field Value
Type Description
int

DefaultRetriesWaitMs

Declaration
public const int DefaultRetriesWaitMs = 1000
Field Value
Type Description
int

Methods

AuthenticationHeaderValueProvider(IEnumerable<KeyValuePair<string, string>>, IAuthenticationHeaderValueProvider, int, int, int, IWebProxy)

Declaration
protected static IAuthenticationHeaderValueProvider AuthenticationHeaderValueProvider(IEnumerable<KeyValuePair<string, string>> config, IAuthenticationHeaderValueProvider authenticationHeaderValueProvider, int maxRetries, int retriesWaitMs, int retriesMaxWaitMs, IWebProxy proxy = null)
Parameters
Type Name Description
IEnumerable<KeyValuePair<string, string>> config
IAuthenticationHeaderValueProvider authenticationHeaderValueProvider
int maxRetries
int retriesWaitMs
int retriesMaxWaitMs
IWebProxy proxy
Returns
Type Description
IAuthenticationHeaderValueProvider

CreateAssociationAsync(AssociationCreateOrUpdateRequest)

Declaration
public Task<AssociationResponse> CreateAssociationAsync(AssociationCreateOrUpdateRequest request)
Parameters
Type Name Description
AssociationCreateOrUpdateRequest request
Returns
Type Description
Task<AssociationResponse>

DeleteAssociationsAsync(string, string, List<string>, bool)

Declaration
public Task DeleteAssociationsAsync(string resourceId, string resourceType, List<string> associationTypes, bool cascadeLifecycle)
Parameters
Type Name Description
string resourceId
string resourceType
List<string> associationTypes
bool cascadeLifecycle
Returns
Type Description
Task

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Dispose(bool)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

GetAssociationsByResourceNameAsync(string, string, string, List<string>, string, int, int)

Declaration
public Task<List<Association>> GetAssociationsByResourceNameAsync(string resourceName, string resourceNamespace, string resourceType, List<string> associationTypes, string lifecycle, int offset, int limit)
Parameters
Type Name Description
string resourceName
string resourceNamespace
string resourceType
List<string> associationTypes
string lifecycle
int offset
int limit
Returns
Type Description
Task<List<Association>>

GetCompatibilityAsync(string)

Declaration
public Task<Compatibility> GetCompatibilityAsync(string subject)
Parameters
Type Name Description
string subject
Returns
Type Description
Task<Compatibility>

GetLatestSchemaAsync(string)

Declaration
public Task<RegisteredSchema> GetLatestSchemaAsync(string subject)
Parameters
Type Name Description
string subject
Returns
Type Description
Task<RegisteredSchema>

GetLatestWithMetadataAsync(string, IDictionary<string, string>, bool)

Declaration
public Task<RegisteredSchema> GetLatestWithMetadataAsync(string subject, IDictionary<string, string> metadata, bool ignoreDeletedSchemas)
Parameters
Type Name Description
string subject
IDictionary<string, string> metadata
bool ignoreDeletedSchemas
Returns
Type Description
Task<RegisteredSchema>

GetSchemaAsync(int, string)

Declaration
public Task<Schema> GetSchemaAsync(int id, string format)
Parameters
Type Name Description
int id
string format
Returns
Type Description
Task<Schema>

GetSchemaAsync(string, int, bool)

Declaration
public Task<RegisteredSchema> GetSchemaAsync(string subject, int version, bool ignoreDeletedSchemas = true)
Parameters
Type Name Description
string subject
int version
bool ignoreDeletedSchemas
Returns
Type Description
Task<RegisteredSchema>

GetSchemaByGuidAsync(string, string)

Declaration
public Task<Schema> GetSchemaByGuidAsync(string guid, string format)
Parameters
Type Name Description
string guid
string format
Returns
Type Description
Task<Schema>

GetSchemaBySubjectAndIdAsync(string, int, string)

Declaration
public Task<Schema> GetSchemaBySubjectAndIdAsync(string subject, int id, string format)
Parameters
Type Name Description
string subject
int id
string format
Returns
Type Description
Task<Schema>

GetSubjectVersionsAsync(string)

Declaration
public Task<List<int>> GetSubjectVersionsAsync(string subject)
Parameters
Type Name Description
string subject
Returns
Type Description
Task<List<int>>

GetSubjectsAsync()

Declaration
public Task<List<string>> GetSubjectsAsync()
Returns
Type Description
Task<List<string>>

LookupSchemaAsync(string, Schema, bool, bool)

Declaration
public Task<RegisteredSchema> LookupSchemaAsync(string subject, Schema schema, bool ignoreDeletedSchemas, bool normalize)
Parameters
Type Name Description
string subject
Schema schema
bool ignoreDeletedSchemas
bool normalize
Returns
Type Description
Task<RegisteredSchema>

RegisterSchemaAsync(string, Schema, bool)

Declaration
public Task<int> RegisterSchemaAsync(string subject, Schema schema, bool normalize)
Parameters
Type Name Description
string subject
Schema schema
bool normalize
Returns
Type Description
Task<int>

RegisterSchemaWithResponseAsync(string, Schema, bool)

Declaration
public Task<RegisteredSchema> RegisterSchemaWithResponseAsync(string subject, Schema schema, bool normalize)
Parameters
Type Name Description
string subject
Schema schema
bool normalize
Returns
Type Description
Task<RegisteredSchema>

RequestAsync<T>(string, HttpMethod, params object[])

Declaration
protected Task<T> RequestAsync<T>(string endPoint, HttpMethod method, params object[] jsonBody)
Parameters
Type Name Description
string endPoint
HttpMethod method
object[] jsonBody
Returns
Type Description
Task<T>
Type Parameters
Name Description
T
Remarks

Used for end points that return a json object { ... }

RequestListOfAsync<T>(string, HttpMethod, params object[])

Declaration
protected Task<List<T>> RequestListOfAsync<T>(string endPoint, HttpMethod method, params object[] jsonBody)
Parameters
Type Name Description
string endPoint
HttpMethod method
object[] jsonBody
Returns
Type Description
Task<List<T>>
Type Parameters
Name Description
T
Remarks

Used for end points that return a json array [ ... ]

RequestVoidAsync(string, HttpMethod, params object[])

Declaration
protected Task RequestVoidAsync(string endPoint, HttpMethod method, params object[] jsonBody)
Parameters
Type Name Description
string endPoint
HttpMethod method
object[] jsonBody
Returns
Type Description
Task
Remarks

Used for end points that return no content (void response)

TestCompatibilityAsync(string, int, Schema)

Declaration
public Task<bool> TestCompatibilityAsync(string subject, int versionId, Schema schema)
Parameters
Type Name Description
string subject
int versionId
Schema schema
Returns
Type Description
Task<bool>

TestLatestCompatibilityAsync(string, Schema)

Declaration
public Task<bool> TestLatestCompatibilityAsync(string subject, Schema schema)
Parameters
Type Name Description
string subject
Schema schema
Returns
Type Description
Task<bool>

UpdateCompatibilityAsync(string, Compatibility)

Declaration
public Task<Compatibility> UpdateCompatibilityAsync(string subject, Compatibility compatibility)
Parameters
Type Name Description
string subject
Compatibility compatibility
Returns
Type Description
Task<Compatibility>

Implements

IDisposable
In this article