TrimbleCloud.DataOcean3
TrimbleCloud.DataOcean3
Contents
- AclApplicationIdentity
- AclDeviceIdentity
- AclIdentity
- AclPermission
- AclUserIdentity
- DataOceanClient
- DataOceanExtensions
- Directory
- DirectoryCreate
- DirectoryPage
- DirectoryResponse
- DirectoryUpdate
- File
- FileCopy
- FileCreate
- FileMalwareStatus
- FileNotReadyException
- FileStatus
- IDataOceanClient
- IDataOceanConfiguration
- IDirectoriesAPI
- Copy(id,directory)
- Copy(path,directory)
- Create(directory)
- Delete(id,recursive)
- Delete(path,recursive)
- Delete(id)
- Delete(path)
- DeleteRecursively(id)
- DeleteRecursively(path)
- GetDirectoriesList(parentId)
- GetDirectoriesList(path)
- GetFilesList(parentId,urlDuration)
- GetFilesList(path,urlDuration)
- Read(id)
- Read(path)
- Update(id,directory)
- Update(path,directory)
- IFilesAPI
- Copy(id,file)
- Copy(path,file)
- Create(file,urlDuration)
- Delete(id)
- Delete(path)
- Download(stream,id,version,region,concurrentRequests)
- Download(stream,path,version,region,concurrentRequests)
- GetFilesetManifest(id,version)
- GetFilesetManifest(path,version)
- GetVersionsList(id,urlDuration)
- GetVersionsList(path,urlDuration)
- Read(id,version,region,urlDuration)
- Read(path,version,region,urlDuration)
- RequestScan(id,version)
- RequestScan(path,version)
- SearchFiles(query,next_page_token)
- Update(id,file)
- Update(path,file)
- Upload(id,stream,version,concurrentRequests)
- Upload(path,stream,version,concurrentRequests)
- IJobsAPI
- StatusCodeException
AclApplicationIdentity type
Namespace
TrimbleCloud.DataOcean3.Model
#ctor(applicationId) constructor
Summary
Creates an application identity.
Parameters
| Name | Type | Description |
|---|---|---|
| applicationId | System.Guid | The application id. |
AclDeviceIdentity type
Namespace
TrimbleCloud.DataOcean3.Model
#ctor(deviceId,applicationId) constructor
Summary
Creates a device identity.
Parameters
| Name | Type | Description |
|---|---|---|
| deviceId | System.Guid | The device id; otherwise, AclIdentity.ALL to represent any device. |
| applicationId | System.Guid | The application id; otherwise AclIdentity.ALL to represent any application. |
AclIdentity type
Namespace
TrimbleCloud.DataOcean3.Model
ALL constants
Summary
Use ALL to represent cases where any client is allowed. For example, new AclUserIdentity(userID, AclIdentity.ALL) will allow a particular user from any application.
AclPermission type
Namespace
TrimbleCloud.DataOcean3.Model
ReadOnly constants
Summary
Read-only permission
ReadWrite constants
Summary
Read and write permission. For files, write permission allows users to create new versions of the file.
ReadWriteDelete constants
Summary
Read, write, and delete permission.
AclUserIdentity type
Namespace
TrimbleCloud.DataOcean3.Model
#ctor(userId,applicationId) constructor
Summary
Creates a user identity.
Parameters
| Name | Type | Description |
|---|---|---|
| userId | System.Guid | The user id; otherwise, AclIdentity.ALL to represent any user. |
| applicationId | System.Guid | The application id; otherwise AclIdentity.ALL to represent any application. |
DataOceanClient type
Namespace
TrimbleCloud.DataOcean3
Summary
A client for the Trimble Cloud Platform Data Ocean
Example
const TOKEN = "...";const BASE_URL = "https://cloud.stage.api.trimblecloud.com/dataocean/api/3.0";var tokenProvider = new FixedTokenProvider(TOKEN);var httpClientProvider = new BearerTokenHttpClientProvider(tokenProvider, new Uri(BASE_URL, UriKind.Absolute));var dataOceanClient = new DataOceanClient(httpClientProvider);var directories = await dataOceanClient.Directories.GetDirectoriesList().GetItems();var files = await dataOceanClient.Directories.GetFilesList().GetItems();var file = await dataOceanClient.Files.Create(new File() { ... });using (var stream = File.OpenRead("helloworld.txt")){ await dataOceanClient.Files.Upload(file.id, stream);}#ctor(clientProvider,productName) constructor
Summary
Public constructor for a Data Ocean client
Parameters
| Name | Type | Description |
|---|---|---|
| clientProvider | Trimble.ID.IHttpClientProvider | A provider of a pre-configured HttpClient used for API calls made by this client |
| productName | System.String | The product name of the consuming application |
Configuration constants
Directories property
Summary
Directories API
Files property
Summary
Files API
Jobs property
Summary
Jobs API
Dispose() method
Summary
Inherit from parent.
Parameters
This method has no parameters.
DataOceanExtensions type
Namespace
TrimbleCloud.DataOcean3
Summary
A client for the Trimble Cloud Platform Data Ocean
Example
// Setup const TOKEN = "..."; const BASE_URL = "https://cloud.stage.api.trimblecloud.com/dataocean/api/3.0"; var tokenProvider = new FixedTokenProvider(TOKEN); services.AddDataOcean(tokenProvider, BASE_URL); // Usage public class UseDataOcean(IDirectoriesAPI directoriesAPI, IFilesAPI filesAPI) { private IDirectoriesAPI _directoriesAPI;
public UseDataOcean(IDirectoriesAPI directoriesAPI, IFilesAPI filesAPI) { _directoriesAPI = directoriesAPI; _filesAPI = filesAPI; } public async Task DoWork() { var directories = await _directoriesAPI.GetDirectoriesList().GetItems(); var files = await _directoriesAPI.GetFilesList().GetItems(); var file = await _filesAPI.Create(new File() { ... }); using (var stream = File.OpenRead("helloworld.txt")) { await _filesAPI.Upload(file.id, stream); } } }AddDataOcean(services,tokenProvider,baseAddress,configuration,logger,productName) method
Summary
Adds Data Ocean services.
Parameters
| Name | Type | Description |
|---|---|---|
| services | Microsoft.Extensions.DependencyInjection.IServiceCollection | The service collection to add Data Ocean to. |
| tokenProvider | Trimble.ID.ITokenProvider | The token provider. |
| baseAddress | System.Uri | The base address for the service. |
| configuration | TrimbleCloud.DataOcean3.Utilities.IDataOceanConfiguration | The optional Data Ocean configuration. |
| logger | TrimbleCloud.Common.Logging.ILogger | The optional Data Ocean logger. |
| productName | System.String | The product name of the consuming application |
ReformatApiCloudv1Address(baseAddress) method
Summary
Reformats the base address if we detect it is from API Cloud v1.0
Returns
The unmodified or modified uri.
Parameters
| Name | Type | Description |
|---|---|---|
| baseAddress | System.Uri | The base address. |
Directory type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a directory in the data ocean.
Acl property
Summary
Gets or sets the access control list (ACL) for the directory.
ApplicationId property
Summary
Gets or sets the application identifier associated with the directory.
ContentSize property
Summary
Gets or sets the size of the content in the directory.
ContentUpdatedAt property
Summary
Gets or sets the date and time when the content of the directory was last updated.
CreatedAt property
Summary
Gets or sets the date and time when the directory was created.
Id property
Summary
Gets or sets the unique identifier of the directory.
Metadata property
Summary
Gets or sets the metadata associated with the directory.
OwnerId property
Summary
Gets or sets the owner identifier of the directory.
Path property
Summary
Gets or sets the path of the directory.
UpdatedAt property
Summary
Gets or sets the date and time when the directory was last updated.
DirectoryCreate type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a directory creation request.
Acl property
Summary
Gets or sets the access control list (ACL) for the directory.
Metadata property
Summary
Gets or sets the metadata associated with the directory.
Path property
Summary
Gets or sets the path of the directory.
DirectoryPage type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a page of directories.
Directories property
Summary
Gets or sets the list of directories.
NextPageToken property
Summary
Gets or sets the token for the next page.
DirectoryResponse type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a response containing directory information.
Directory property
Summary
Gets or sets the directory information.
JobId property
Summary
Gets or sets the job ID associated with the directory response.
DirectoryUpdate type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a directory update in the data ocean.
Acl property
Summary
Gets or sets the access control list (ACL) for the directory.
Metadata property
Summary
Gets or sets the metadata for the directory update. The type of the metadata is dynamic, allowing for flexibility in the data structure.
Path property
Summary
Gets or sets the path of the directory update.
File type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a file.
Acl property
Summary
Gets or sets the access control list (ACL) of the file.
ApplicationId property
Summary
Gets or sets the application identifier associated with the file.
CreatedAt property
Summary
Gets or sets the date and time when the file was created.
Download property
Summary
Gets or sets the download information of the file.
ExpiresAt property
Summary
Gets or sets the expiration date and time of the file.
Fileset property
Summary
Gets or sets a value indicating whether the file is part of a fileset.
FirstVersionCreatedAt property
Summary
Gets or sets the date and time when the first version of the file was created.
Id property
Summary
Gets or sets the unique identifier of the file.
LastScannedAt property
Summary
Gets or sets the date and time when the file was last scanned for malware.
MalwareStatus property
Summary
Gets or sets the malware status of the file.
MasterId property
Summary
Gets or sets the master identifier of the file.
Md5 property
Summary
Gets or sets the MD5 hash of the file.
Metadata property
Summary
Gets or sets the metadata of the file.
Multipart property
Summary
Gets or sets a value indicating whether the file is multipart.
OwnerId property
Summary
Gets or sets the owner identifier of the file.
Path property
Summary
Gets or sets the path of the file.
PathTemplate property
Summary
Gets or sets the path template of the file.
RegionPreferences property
Summary
Gets or sets the region preferences for the file.
Regions property
Summary
Gets or sets the regions associated with the file.
RestrictedAccess property
Summary
Gets or sets a value indicating whether the file has restricted access.
Size property
Summary
Gets or sets the size of the file in bytes.
Status property
Summary
Gets or sets the status of the file.
UpdatedAt property
Summary
Gets or sets the date and time when the file was last updated.
Upload property
Summary
Gets or sets the upload information of the file.
Version property
Summary
Gets or sets the version of the file.
FileCopy type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents a file copy operation.
ExpiresAt property
Summary
Gets or sets the expiration date and time of the file.
Metadata property
Summary
Gets or sets the metadata associated with the file.
Path property
Summary
Gets or sets the path of the file.
Regions property
Summary
Gets or sets the regions where the file is available.
RestrictedAccess property
Summary
Gets or sets a value indicating whether the file has restricted access.
FileCreate type
Namespace
TrimbleCloud.DataOcean3.Model
Summary
Represents the information required to create a file.
Acl property
Summary
Gets or sets the access control list (ACL) of the file.
ExpiresAt property
Summary
Gets or sets the expiration date and time of the file.
Fileset property
Summary
Gets or sets a value indicating whether the file is part of a fileset.
MasterId property
Summary
Gets or sets the master ID of the file.
Metadata property
Summary
Gets or sets the metadata associated with the file.
Multipart property
Summary
Gets or sets a value indicating whether the file is multipart.
Path property
Summary
Gets or sets the path of the file.
PathTemplate property
Summary
Gets or sets the path template of the file.
Regions property
Summary
Gets or sets the regions associated with the file.
RestrictedAccess property
Summary
Gets or sets a value indicating whether the file has restricted access.
FileMalwareStatus type
Namespace
TrimbleCloud.DataOcean3.Model
CannotScan constants
Summary
File cannot be scanned automatically due to its size
Clean constants
Summary
File has been scanned and no issues were detected
Deleting constants
Summary
File has been scanned and has been found to contain malware
ScanFailed constants
Summary
File scan was attempted but could not be completed
Unscanned constants
Summary
File has not been scanned yet
FileNotReadyException type
Namespace
TrimbleCloud.DataOcean3.Exceptions
FileState property
Summary
Current state of file.
FileStatus type
Namespace
TrimbleCloud.DataOcean3.Model
ArchiveProcessing constants
Summary
Archive has been uploaded and is now being processed
ArchiveProcessingFailed constants
Summary
Archive processing failed, e.g. if it’s a bad zip file
Available constants
Summary
File is available
Deleting constants
Summary
File content is in the process of being deleted
Finalizing constants
Summary
File is completing a multi-part assemble request or is in the process of being copied
UploadFailed constants
Summary
File is not accessible due to a failure during upload
Uploadable constants
Summary
File is awaiting an upload
IDataOceanClient type
Namespace
TrimbleCloud.DataOcean3
Summary
Interface for the Trimble Cloud Platform Data Ocean
Directories property
Summary
Directories API
Returns
Files property
Summary
Files API
Returns
Jobs property
Summary
Jobs API
Returns
IDataOceanConfiguration type
Namespace
TrimbleCloud.DataOcean3.Utilities
ChunkSize property
Summary
Download and upload chunk size.
HttpTimeout property
Summary
Timeout used for Http calls.
MaxConcurrentRequests property
Summary
The maximum number of concurrent requests allowed.
PageLimit property
Summary
Page size to retrieve.
Retries property
Summary
Number of retries for HTTP calls with a retry-able response.
RetryInterval property
Summary
Time to wait between retries.
IDirectoriesAPI type
Namespace
TrimbleCloud.DataOcean3
Copy(id,directory) method
Summary
Copies a directory
Returns
A Task that resolves to a JobResponseBrief on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
| directory | TrimbleCloud.DataOcean3.Model.DirectoryCreate | The directory information to copy |
Copy(path,directory) method
Summary
Copies a file
Returns
A Task that resolves to a JobResponseBrief on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The directory path |
| directory | TrimbleCloud.DataOcean3.Model.DirectoryCreate | The directory information to copy |
Create(directory) method
Summary
Create a directory
Returns
A Task that resolves to the created Directory on completion
Parameters
| Name | Type | Description |
|---|---|---|
| directory | TrimbleCloud.DataOcean3.Model.DirectoryCreate | The information of the directory to create |
Delete(id,recursive) method
Summary
Delete a directory given the directory ID
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
| recursive | System.Boolean | Delete descendant files and directories |
Remarks
This method has been deprecated. Use Delete(Guid id) or DeleteRecursively(Guid id) instead.
Delete(path,recursive) method
Summary
Delete a directory given the directory path
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The directory path |
| recursive | System.Boolean | Delete descendant files and directories |
Remarks
This method has been deprecated. Use Delete(string path) or DeleteRecursively(string path) instead.
Delete(id) method
Summary
Delete an empty directory given the directory ID
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
Remarks
Use DeleteRecursively(Guid id) to delete a non-empty directory
Delete(path) method
Summary
Delete an empty directory given the directory path
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The directory path |
Remarks
Use DeleteRecursively(string path) to delete a non-empty directory
DeleteRecursively(id) method
Summary
Delete a directory given the directory ID
Returns
A Task that resolves to a JobResponseBrief on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
DeleteRecursively(path) method
Summary
Delete a directory given the directory path
Returns
A Task that resolves to a JobResponseBrief on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The directory path |
GetDirectoriesList(parentId) method
Summary
Get a list of directories in the given parent directory
Returns
An asynchronous list of directories
Parameters
| Name | Type | Description |
|---|---|---|
| parentId | System.Guid | The ID of the parent directory |
GetDirectoriesList(path) method
Summary
Get a list of directories in the given parent directory
Returns
An asynchronous list of directories
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The optional path of the parent directory, root directory is used if this parameter is omitted or null |
GetFilesList(parentId,urlDuration) method
Summary
Get a list of directories in the given parent directory
Returns
An asynchronous list of directories
Parameters
| Name | Type | Description |
|---|---|---|
| parentId | System.Guid | The ID of the parent directory |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
GetFilesList(path,urlDuration) method
Summary
Get a list of directories in the given parent directory
Returns
An asynchronous list of directories
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The optional path of the parent directory, root directory is used if this parameter is omitted or null |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
Read(id) method
Summary
Get a directory given the directory ID
Returns
A Task that resolves to the Directory on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
Read(path) method
Summary
Get a directory given the directory path
Returns
A Task that resolves to the Directory on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The optional path of the directory, root directory is used if this parameter is omitted or null |
Update(id,directory) method
Summary
Update a directory given the directory ID
Returns
A Task that resolves to a ValueTuple of Directory Directory and possible JobId Guid on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The directory ID |
| directory | TrimbleCloud.DataOcean3.Model.DirectoryUpdate | DirectoryUpdate |
Update(path,directory) method
Summary
Update a directory given the directory path
Returns
A Task that resolves to the a Tuple of Directory and possible JobId Guid on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | |
| directory | TrimbleCloud.DataOcean3.Model.DirectoryUpdate | DirectoryUpdate |
IFilesAPI type
Namespace
TrimbleCloud.DataOcean3
Copy(id,file) method
Summary
Copies a file
Returns
A Task that resolves to the copied File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| file | TrimbleCloud.DataOcean3.Model.FileCopy | The file information to copy |
Copy(path,file) method
Summary
Copies a file
Returns
A Task that resolves to the copied File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| file | TrimbleCloud.DataOcean3.Model.FileCopy | The file information to copy |
Create(file,urlDuration) method
Summary
Create a file or a new version of a file if it already exists
Returns
A Task that resolves to the created File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| file | TrimbleCloud.DataOcean3.Model.FileCreate | The information of the file to create |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
Delete(id) method
Summary
Delete a file given the file ID
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
Delete(path) method
Summary
Delete a file given the file path
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
Download(stream,id,version,region,concurrentRequests) method
Summary
Downloads a file given the file ID
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| stream | System.IO.Stream | The stream to write content to |
| id | System.Guid | The file ID |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| region | System.String | The specific region if provided; otherwise the default region will be used |
| concurrentRequests | System.Int32 | The number of concurrent download tasks if provided; otherwise 8 tasks are used |
Exceptions
| Name | Description |
|---|---|
| TrimbleCloud.DataOcean3.Exceptions.FileNotReadyException | Thrown if the file is not in the Available state |
Download(stream,path,version,region,concurrentRequests) method
Summary
Downloads a file given the file path
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| stream | System.IO.Stream | The stream to write content to |
| path | System.String | The file path |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| region | System.String | The specific region if provided; otherwise the default region will be used |
| concurrentRequests | System.Int32 | The number of concurrent download tasks if provided; otherwise 8 tasks are used |
Exceptions
| Name | Description |
|---|---|
| TrimbleCloud.DataOcean3.Exceptions.FileNotReadyException | Thrown if the file is not in the Available state |
GetFilesetManifest(id,version) method
Summary
Get a fileset manifest given the file ID
Returns
An asynchronous list of files in the fileset
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
GetFilesetManifest(path,version) method
Summary
Get a fileset manifest given the file path
Returns
An asynchronous list of files in the fileset
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
GetVersionsList(id,urlDuration) method
Summary
Get a list of versions for a file given the file ID
Returns
An asynchronous list of files versions
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
GetVersionsList(path,urlDuration) method
Summary
Get a list of versions for a file given the file path
Returns
An asynchronous list of files versions
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
Read(id,version,region,urlDuration) method
Summary
Get a file given the file ID
Returns
A Task that resolves to the file on completion or null if the file does not exist
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| region | System.String | The specific region if provided; otherwise the default region will be used |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
Read(path,version,region,urlDuration) method
Summary
Get a file given the file path
Returns
A Task that resolves to the file on completion or null if the file does not exist
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The path of the file |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| region | System.String | The specific region if provided; otherwise the default region will be used |
| urlDuration | System.Nullable{System.TimeSpan} | The duration of time for which the file download/upload URL for the file will be valid if provided between 5 minutes and 30 days. Default is 1 hour. |
RequestScan(id,version) method
Summary
Requests a file to be scanned
Returns
A Task that resolves to the File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
RequestScan(path,version) method
Summary
Requests a file to be scanned
Returns
A Task that resolves to the File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
SearchFiles(query,next_page_token) method
Summary
Get a list of files found by next page token
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| query | TrimbleCloud.DataOcean3.Model.SearchQuery | The information to search |
| next_page_token | System.String | The token provided by search |
Update(id,file) method
Summary
Update a file given the file ID
Returns
A Task that resolves to the updated File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| file | TrimbleCloud.DataOcean3.Model.FileUpdate | The file information to update |
Update(path,file) method
Summary
Update a file given the file path
Returns
A Task that resolves to the updated File on completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| file | TrimbleCloud.DataOcean3.Model.FileUpdate | The file information to update |
Upload(id,stream,version,concurrentRequests) method
Summary
Uploads a file given the file ID and Stream
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The file ID |
| stream | System.IO.Stream | The file Stream |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| concurrentRequests | System.Int32 | The number of concurrent upload tasks if provided; otherwise 8 tasks are used |
Upload(path,stream,version,concurrentRequests) method
Summary
Uploads a file given the file path and Stream
Returns
A Task that resolves to completion
Parameters
| Name | Type | Description |
|---|---|---|
| path | System.String | The file path |
| stream | System.IO.Stream | The file Stream |
| version | System.Nullable{System.Int32} | The file version if provided; otherwise the current version is used if null |
| concurrentRequests | System.Int32 | The number of concurrent upload tasks if provided; otherwise 8 tasks are used |
IJobsAPI type
Namespace
TrimbleCloud.DataOcean3
Read(id) method
Summary
Get a job given the job id
Returns
A Task that resolves to the job on completion or null if the job does not exist
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The id of the job |
WaitForJob(id,timeout,timeDelay,callback) method
Summary
Waits for job to finish and returns job’s status
Returns
A Task that resolves to the job on completion or null if the job does not exist. TimeoutException after a set time of polling.
Parameters
| Name | Type | Description |
|---|---|---|
| id | System.Guid | The id of the job |
| timeout | System.Nullable{System.TimeSpan} | Time limit for job to finish before Timeout Exception. |
| timeDelay | System.Nullable{System.TimeSpan} | Time delay before the function calls the Job api, timeDelay has a minimum of 1 second. |
| callback | System.Action{TrimbleCloud.DataOcean3.Model.Job} | Callback function which is called after every Job api call, the function must be void |
StatusCodeException type
Namespace
TrimbleCloud.DataOcean3.Exceptions
StatusCode property
Summary
Status code returned from Data Ocean