Table of Contents

Class DeliveryRepositoriesClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class DeliveryRepositoriesClient
Inheritance
DeliveryRepositoriesClient
Inherited Members

Constructors

DeliveryRepositoriesClient(string, HttpClient)

public DeliveryRepositoriesClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

Methods

DeleteAsync(long, CancellationToken)

Deletes the repository with the supplied id.

public virtual Task DeleteAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long
cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

The delete Repository request was accepted.

Exceptions

NfieldSdkException

A server side error occurred.

GetActivityLogsAsync(long, CancellationToken)

Gets repository activity logs.
Returns first 100. This list can be filtered, sorted and supports paging using standard OData syntax.

public virtual Task<ICollection<RepositoryActivityLogModel>> GetActivityLogsAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<RepositoryActivityLogModel>>

Returns the activity logs

Exceptions

NfieldSdkException

A server side error occurred.

GetAllAsync(CancellationToken)

Gets a list of repositories for the domain.

public virtual Task<ICollection<RepositoryModel>> GetAllAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<RepositoryModel>>

Returns the list of repositories

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(long, CancellationToken)

Gets a repository for the domain by specified id.

public virtual Task<RepositoryModel> GetAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<RepositoryModel>

Returns the repository

Exceptions

NfieldSdkException

A server side error occurred.

GetCredentialsAsync(long, CancellationToken)

Returns the credentials (including server information) to connect to a repository database.

public virtual Task<RepositoryConnectionInfo> GetCredentialsAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<RepositoryConnectionInfo>

Returns the repository credentials

Exceptions

NfieldSdkException

A server side error occurred.

GetMetricsAsync(long, int, CancellationToken)

Gets repository metrics.

public virtual Task<RepositoryMetricsModel> GetMetricsAsync(long repositoryId, int interval, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

interval int

The time interval type.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<RepositoryMetricsModel>

Returns the repository metrics

Exceptions

NfieldSdkException

A server side error occurred.

GetSubscriptionsLogsAsync(long, CancellationToken)

Gets repository subscription logs.
Returns first 100. This list can be filtered, sorted and supports paging using standard OData syntax.

public virtual Task<ICollection<RepositorySubscriptionLogModel>> GetSubscriptionsLogsAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<RepositorySubscriptionLogModel>>

Returns the repository subscription logs

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(CreateRepositoryModel, CancellationToken)

Creates a new data repository based on the given data.

public virtual Task PostAsync(CreateRepositoryModel model, CancellationToken cancellationToken = default)

Parameters

model CreateRepositoryModel

The repository info which will be used in the creation process

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Returns a repository id

Exceptions

NfieldSdkException

A server side error occurred.

PostRepositorySubscriptionAsync(long, CreateRepositorySubscriptionModel, CancellationToken)

Changes the subscription plan of a repository.

public virtual Task PostRepositorySubscriptionAsync(long repositoryId, CreateRepositorySubscriptionModel model, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository Id.

model CreateRepositorySubscriptionModel

The details for the new Subscription.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

The selected subscription change has been accepted.

Exceptions

NfieldSdkException

A server side error occurred.

PostSyncAsync(long, CancellationToken)

Triggers a repository sync.

public virtual Task PostSyncAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

The sync Repository request was triggered

Exceptions

NfieldSdkException

A server side error occurred.

ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)

protected virtual Task<DeliveryRepositoriesClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)

Parameters

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<DeliveryRepositoriesClient.ObjectResponseResult<T>>

Type Parameters

T