Interface IDataSourcesApiClient
Interface for API client data source operations.
Inherited Members
Namespace: Tableau.Migration.Api
Assembly: Tableau.Migration.dll
Syntax
public interface IDataSourcesApiClient : IPagedListApiClient<IDataSource>, IPublishApiClient<IPublishableDataSource, IDataSourceDetails>, IPullApiClient<IDataSource, IPublishableDataSource>, IOwnershipApiClient, ITagsContentApiClient, IApiPageAccessor<IDataSource>, IContentApiClient, IPermissionsContentApiClient, IConnectionsApiClient, ILabelsContentApiClient<IDataSource>
Methods
DownloadDataSourceAsync(Guid, CancellationToken)
Downloads the data source file for the given ID.
Declaration
Task<IAsyncDisposableResult<FileDownload>> DownloadDataSourceAsync(Guid dataSourceId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | dataSourceId | The ID to download the data source file for. |
CancellationToken | cancel | A cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IAsyncDisposableResult<FileDownload>> | The file download result. |
GetAllPublishedDataSourcesAsync(int, int, CancellationToken)
Gets all published data sources in the current site.
Declaration
Task<IPagedResult<IDataSource>> GetAllPublishedDataSourcesAsync(int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IDataSource>> | A list of a page of data sources in the current site. |
GetDataSourceAsync(Guid, CancellationToken)
Gets a data source by the given ID.
Declaration
Task<IResult<IDataSourceDetails>> GetDataSourceAsync(Guid dataSourceId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | dataSourceId | The ID to get the data source for. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IDataSourceDetails>> | The data source result. |
PublishDataSourceAsync(IPublishDataSourceOptions, CancellationToken)
Uploads the input data source file.
Declaration
Task<IResult<IDataSourceDetails>> PublishDataSourceAsync(IPublishDataSourceOptions options, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IPublishDataSourceOptions | options | The new data source's details. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IDataSourceDetails>> | The published data source. |
UpdateDataSourceAsync(Guid, CancellationToken, string?, Guid?, Guid?, bool?, string?, bool?)
Updates the data source after publishing.
Declaration
Task<IResult<IUpdateDataSourceResult>> UpdateDataSourceAsync(Guid dataSourceId, CancellationToken cancel, string? newName = null, Guid? newProjectId = null, Guid? newOwnerId = null, bool? newIsCertified = null, string? newCertificationNote = null, bool? newEncryptExtracts = null)
Parameters
Type | Name | Description |
---|---|---|
Guid | dataSourceId | The ID for the data source to update. |
CancellationToken | cancel | The cancellation token to obey. |
string | newName | The new name of a the data source, or null to not update the name. |
Guid? | newProjectId | The LUID of a project to move the data source to, or null to not update the project. |
Guid? | newOwnerId | The LUID of a user to assign the data source to as owner, or null to not update the owner. |
bool? | newIsCertified | Whether or not the data source is certified, or null to not update the flag. |
string | newCertificationNote | The certification note, or null to not update the note. |
bool? | newEncryptExtracts | Whether or not to encrypt extracts, or null to not update the option. |
Returns
Type | Description |
---|---|
Task<IResult<IUpdateDataSourceResult>> | The update result. |