md-docs/UdfApi.md

UdfApi

All URIs are relative to http://localhost/v1

Method | HTTP request | Description ------------- | ------------- | ------------- DeleteUDFInfo | DELETE /udf/{namespace}/{name} | GetUDFInfo | GET /udf/{namespace}/{name} | GetUDFInfoSharingPolicies | GET /udf/{namespace}/{name}/share | RegisterUDFInfo | POST /udf/{namespace}/{name} | ShareUDFInfo | PATCH /udf/{namespace}/{name}/share | SubmitGenericUDF | POST /udfs/generic/{namespace} | SubmitUDF | POST /arrays/{namespace}/{array}/udf/submit | UpdateUDFInfo | PATCH /udf/{namespace}/{name} |

DeleteUDFInfo

DeleteUDFInfo(namespace, name)

delete a registerd UDF, this will remove all sharing and can not be undone

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name to register udf under

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
api.instance$DeleteUDFInfo(var.namespace, var.name)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name to register udf under |

Return type

void (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 202 | UDF delete successfully | - | | 0 | error response | - |

GetUDFInfo

UDFInfo GetUDFInfo(namespace, name)

get a specific UDF in the given namespace

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name to register udf under

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
result <- api.instance$GetUDFInfo(var.namespace, var.name)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name to register udf under |

Return type

UDFInfo

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | UDFInfo was retrieved successfully | - | | 404 | udf not found | - | | 0 | error response | - |

GetUDFInfoSharingPolicies

array[UDFSharing] GetUDFInfoSharingPolicies(namespace, name)

Get all sharing details of the udf

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name of UDFInfo

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
result <- api.instance$GetUDFInfoSharingPolicies(var.namespace, var.name)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name of UDFInfo |

Return type

array[UDFSharing]

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | List of all specific sharing policies | - | | 404 | UDF does not exist or user does not have permissions to view array sharing policies | - | | 0 | error response | - |

RegisterUDFInfo

RegisterUDFInfo(namespace, name, udf)

register a UDF in the given namespace

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name to register udf under
var.udf <- UDFInfoUpdate$new("name_example", UDFLanguage$new(), "version_example", "image_name_example", UDFType$new(), "exec_example", "exec_raw_example", "readme_example", "license_id_example", "license_text_example", list("tags_example")) # UDFInfoUpdate | udf to register

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
api.instance$RegisterUDFInfo(var.namespace, var.name, var.udf)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name to register udf under | udf | UDFInfoUpdate| udf to register |

Return type

void (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 204 | udf registered successfully | - | | 0 | error response | - |

ShareUDFInfo

ShareUDFInfo(namespace, name, udf.sharing)

Share a UDF with a user

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name of UDFInfo
var.udf.sharing <- UDFSharing$new(list(UDFActions$new()), "namespace_example", "namespace_type_example") # UDFSharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace, if permissions already exist they will be deleted then new ones added. In the event of a failure, the new polcies will be rolled back to prevent partial policies, and its likely the udf will not be shared with the namespace at all

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
api.instance$ShareUDFInfo(var.namespace, var.name, var.udf.sharing)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name of UDFInfo | udf.sharing | UDFSharing| Namespace and list of permissions to share with. An empty list of permissions will remove the namespace, if permissions already exist they will be deleted then new ones added. In the event of a failure, the new polcies will be rolled back to prevent partial policies, and its likely the udf will not be shared with the namespace at all |

Return type

void (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 204 | UDF shared successfully | - | | 404 | UDF does not exist or user does not have permissions to share udf | - | | 0 | error response | - |

SubmitGenericUDF

data.frame SubmitGenericUDF(namespace, udf, accept.encoding=var.accept.encoding)

submit a generic UDF in the given namespace

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.udf <- GenericUDF$new("udf_info_name_example", UDFLanguage$new(), "version_example", "image_name_example", "exec_example", "exec_raw_example", "argument_example", UDFResultType$new(), "task_name_example") # GenericUDF | udf to run
var.accept.encoding <- 'accept.encoding_example' # character | Encoding to use

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
result <- api.instance$SubmitGenericUDF(var.namespace, var.udf, accept.encoding=var.accept.encoding)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | udf | GenericUDF| udf to run | accept.encoding | character| Encoding to use | [optional]

Return type

data.frame

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | udf completed and the udf-type specific result is returned | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request | | 0 | error response | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request |

SubmitUDF

data.frame SubmitUDF(namespace, array, udf, x.payer=var.x.payer, accept.encoding=var.accept.encoding, v2=var.v2)

send a UDF to run against a specified array/URI registered to a group/project

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.array <- 'array_example' # character | name/uri of array that is url-encoded
var.udf <- UDF$new("udf_info_name_example", UDFLanguage$new(), "version_example", "image_name_example", QueryRanges$new(Layout$new(), list(list(123))), UDFSubarray$new(Layout$new(), list(UDFSubarrayRange$new(123, DimensionCoordinate$new(123, 123, 123, 123, 123, 123, 123, 123, 123, 123), DimensionCoordinate$new(123, 123, 123, 123, 123, 123, 123, 123, 123, 123)))), "exec_example", "exec_raw_example", list("buffers_example"), UDFResultType$new(), "task_name_example", "argument_example") # UDF | udf to run
var.x.payer <- 'x.payer_example' # character | Name of organization or user who should be charged for this request
var.accept.encoding <- 'accept.encoding_example' # character | Encoding to use
var.v2 <- 'v2_example' # character | flag to indicate if v2 array udfs should be used, currently in beta testing. Setting any value will enable v2 array udfs

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
result <- api.instance$SubmitUDF(var.namespace, var.array, var.udf, x.payer=var.x.payer, accept.encoding=var.accept.encoding, v2=var.v2)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | array | character| name/uri of array that is url-encoded | udf | UDF| udf to run | x.payer | character| Name of organization or user who should be charged for this request | [optional] accept.encoding | character| Encoding to use | [optional] v2 | character| flag to indicate if v2 array udfs should be used, currently in beta testing. Setting any value will enable v2 array udfs | [optional]

Return type

data.frame

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | udf completed and the udf-type specific result is returned | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request | | 0 | error response | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request |

UpdateUDFInfo

UpdateUDFInfo(namespace, name, udf)

updated an existing registerd UDF in the given namespace

Example

library(tiledbcloud)

var.namespace <- 'namespace_example' # character | namespace array is in (an organization name or user's username)
var.name <- 'name_example' # character | name to register udf under
var.udf <- UDFInfoUpdate$new("name_example", UDFLanguage$new(), "version_example", "image_name_example", UDFType$new(), "exec_example", "exec_raw_example", "readme_example", "license_id_example", "license_text_example", list("tags_example")) # UDFInfoUpdate | udf to update

api.instance <- UdfApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-TILEDB-REST-API-KEY'] <- 'TODO_YOUR_API_KEY';
# Configure HTTP basic authorization: BasicAuth
api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
api.instance$UpdateUDFInfo(var.namespace, var.name, var.udf)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- namespace | character| namespace array is in (an organization name or user's username) | name | character| name to register udf under | udf | UDFInfoUpdate| udf to update |

Return type

void (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 204 | udf updated successfully | - | | 0 | error response | - |



TileDB-Inc/TileDB-Cloud-R documentation built on July 18, 2024, 3:33 p.m.