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, 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, X509Certificate2 sslCaCertificate = null, IWebProxy proxy = null, int maxRetries = 3, int retriesWaitMs = 1000, int retriesMaxWaitMs = 20000, int maxConnectionsPerServer = 20)
Parameters
TypeNameDescription
stringschemaRegistryUrl
inttimeoutMs
IAuthenticationHeaderValueProviderauthenticationHeaderValueProvider
List<X509Certificate2>certificates
boolenableSslCertificateVerification
X509Certificate2sslCaCertificate
IWebProxyproxy
intmaxRetries
intretriesWaitMs
intretriesMaxWaitMs
intmaxConnectionsPerServer

Fields

DefaultMaxConnectionsPerServer

Declaration
public const int DefaultMaxConnectionsPerServer = 20
Field Value
TypeDescription
int

DefaultMaxRetries

Declaration
public const int DefaultMaxRetries = 3
Field Value
TypeDescription
int

DefaultRetriesMaxWaitMs

Declaration
public const int DefaultRetriesMaxWaitMs = 20000
Field Value
TypeDescription
int

DefaultRetriesWaitMs

Declaration
public const int DefaultRetriesWaitMs = 1000
Field Value
TypeDescription
int

Methods

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

Declaration
protected static IAuthenticationHeaderValueProvider AuthenticationHeaderValueProvider(IEnumerable<KeyValuePair<string, string>> config, IAuthenticationHeaderValueProvider authenticationHeaderValueProvider, int maxRetries, int retriesWaitMs, int retriesMaxWaitMs)
Parameters
TypeNameDescription
IEnumerable<KeyValuePair<string, string>>config
IAuthenticationHeaderValueProviderauthenticationHeaderValueProvider
intmaxRetries
intretriesWaitMs
intretriesMaxWaitMs
Returns
TypeDescription
IAuthenticationHeaderValueProvider

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
TypeNameDescription
booldisposing

GetCompatibilityAsync(string)

Declaration
public Task<Compatibility> GetCompatibilityAsync(string subject)
Parameters
TypeNameDescription
stringsubject
Returns
TypeDescription
Task<Compatibility>

GetLatestSchemaAsync(string)

Declaration
public Task<RegisteredSchema> GetLatestSchemaAsync(string subject)
Parameters
TypeNameDescription
stringsubject
Returns
TypeDescription
Task<RegisteredSchema>

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

Declaration
public Task<RegisteredSchema> GetLatestWithMetadataAsync(string subject, IDictionary<string, string> metadata, bool ignoreDeletedSchemas)
Parameters
TypeNameDescription
stringsubject
IDictionary<string, string>metadata
boolignoreDeletedSchemas
Returns
TypeDescription
Task<RegisteredSchema>

GetSchemaAsync(int, string)

Declaration
public Task<Schema> GetSchemaAsync(int id, string format)
Parameters
TypeNameDescription
intid
stringformat
Returns
TypeDescription
Task<Schema>

GetSchemaAsync(string, int, bool)

Declaration
public Task<RegisteredSchema> GetSchemaAsync(string subject, int version, bool ignoreDeletedSchemas = true)
Parameters
TypeNameDescription
stringsubject
intversion
boolignoreDeletedSchemas
Returns
TypeDescription
Task<RegisteredSchema>

GetSchemaByGuidAsync(string, string)

Declaration
public Task<Schema> GetSchemaByGuidAsync(string guid, string format)
Parameters
TypeNameDescription
stringguid
stringformat
Returns
TypeDescription
Task<Schema>

GetSchemaBySubjectAndIdAsync(string, int, string)

Declaration
public Task<Schema> GetSchemaBySubjectAndIdAsync(string subject, int id, string format)
Parameters
TypeNameDescription
stringsubject
intid
stringformat
Returns
TypeDescription
Task<Schema>

GetSubjectVersionsAsync(string)

Declaration
public Task<List<int>> GetSubjectVersionsAsync(string subject)
Parameters
TypeNameDescription
stringsubject
Returns
TypeDescription
Task<List<int>>

GetSubjectsAsync()

Declaration
public Task<List<string>> GetSubjectsAsync()
Returns
TypeDescription
Task<List<string>>

LookupSchemaAsync(string, Schema, bool, bool)

Declaration
public Task<RegisteredSchema> LookupSchemaAsync(string subject, Schema schema, bool ignoreDeletedSchemas, bool normalize)
Parameters
TypeNameDescription
stringsubject
Schemaschema
boolignoreDeletedSchemas
boolnormalize
Returns
TypeDescription
Task<RegisteredSchema>

RegisterSchemaAsync(string, Schema, bool)

Declaration
public Task<int> RegisterSchemaAsync(string subject, Schema schema, bool normalize)
Parameters
TypeNameDescription
stringsubject
Schemaschema
boolnormalize
Returns
TypeDescription
Task<int>

RegisterSchemaWithResponseAsync(string, Schema, bool)

Declaration
public Task<RegisteredSchema> RegisterSchemaWithResponseAsync(string subject, Schema schema, bool normalize)
Parameters
TypeNameDescription
stringsubject
Schemaschema
boolnormalize
Returns
TypeDescription
Task<RegisteredSchema>

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

Declaration
protected Task<T> RequestAsync<T>(string endPoint, HttpMethod method, params object[] jsonBody)
Parameters
TypeNameDescription
stringendPoint
HttpMethodmethod
object[]jsonBody
Returns
TypeDescription
Task<T>
Type Parameters
NameDescription
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
TypeNameDescription
stringendPoint
HttpMethodmethod
object[]jsonBody
Returns
TypeDescription
Task<List<T>>
Type Parameters
NameDescription
T
Remarks

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

TestCompatibilityAsync(string, int, Schema)

Declaration
public Task<bool> TestCompatibilityAsync(string subject, int versionId, Schema schema)
Parameters
TypeNameDescription
stringsubject
intversionId
Schemaschema
Returns
TypeDescription
Task<bool>

TestLatestCompatibilityAsync(string, Schema)

Declaration
public Task<bool> TestLatestCompatibilityAsync(string subject, Schema schema)
Parameters
TypeNameDescription
stringsubject
Schemaschema
Returns
TypeDescription
Task<bool>

UpdateCompatibilityAsync(string, Compatibility)

Declaration
public Task<Compatibility> UpdateCompatibilityAsync(string subject, Compatibility compatibility)
Parameters
TypeNameDescription
stringsubject
Compatibilitycompatibility
Returns
TypeDescription
Task<Compatibility>

Implements

IDisposable
In this article