Interface IInvokableScriptsApi
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public interface IInvokableScriptsApi
Methods
CreateScriptAsync(ScriptCreateRequest, CancellationToken)
Create a script.
Declaration
Task<Script> CreateScriptAsync(ScriptCreateRequest createRequest, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ScriptCreateRequest | createRequest | The script to create. |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Script> | The created script. |
DeleteScriptAsync(String, CancellationToken)
Delete a script.
Declaration
Task DeleteScriptAsync(string scriptId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to delete. (required) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | delete has been accepted |
FindScriptsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)
List scripts.
Declaration
Task<List<Script>> FindScriptsAsync(int? offset = null, int? limit = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | offset | The offset for pagination. |
System.Nullable<System.Int32> | limit | The number of scripts to return. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<Script>> | [Script] |
InvokeScriptAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a [FluxTable].
Declaration
Task<List<FluxTable>> InvokeScriptAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<FluxTable>> | [FluxTable] |
InvokeScriptEnumerableAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a stream of FluxRecord.
Declaration
IAsyncEnumerable<FluxRecord> InvokeScriptEnumerableAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
IAsyncEnumerable<FluxRecord> | stream of FluxRecord |
InvokeScriptMeasurementsAsync<T>(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a [T].
Declaration
Task<List<T>> InvokeScriptMeasurementsAsync<T>(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<T>> | [T] |
Type Parameters
Name | Description |
---|---|
T |
InvokeScriptMeasurementsEnumerableAsync<T>(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a stream of Measurement.
Declaration
IAsyncEnumerable<T> InvokeScriptMeasurementsEnumerableAsync<T>(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
IAsyncEnumerable<T> | stream of Measurement |
Type Parameters
Name | Description |
---|---|
T |
InvokeScriptRawAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a raw string.
Declaration
Task<string> InvokeScriptRawAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<System.String> | String |
UpdateScriptAsync(String, ScriptUpdateRequest, CancellationToken)
Update a script.
Declaration
Task<Script> UpdateScriptAsync(string scriptId, ScriptUpdateRequest updateRequest, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to update. (required) |
ScriptUpdateRequest | updateRequest | Script updates to apply (required) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Script> | The updated script. |