Skip to content

Latest commit

 

History

History
397 lines (293 loc) · 21.4 KB

File metadata and controls

397 lines (293 loc) · 21.4 KB

NamespaceApi

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

Method HTTP request Description
createNamespace POST /v1/namespace/{id}/create Create a new namespace
describeNamespace POST /v1/namespace/{id}/describe Describe information about a namespace
dropNamespace POST /v1/namespace/{id}/drop Drop a namespace
listNamespaces POST /v1/namespace/{id}/list List namespaces
namespaceExists POST /v1/namespace/{id}/exists Check if a namespace exists

createNamespace

CreateNamespaceResponse createNamespace(id, createNamespaceRequest, delimiter)

Create a new namespace

Create a new namespace. A namespace can manage either a collection of child namespaces, or a collection of tables. There are three modes when trying to create a namespace, to differentiate the behavior when a namespace of the same name already exists: * CREATE: the operation fails with 400. * EXIST_OK: the operation succeeds and the existing namespace is kept. * OVERWRITE: the existing namespace is dropped and a new empty namespace with this name is created.

Example

// Import classes:
import com.lancedb.lance.namespace.client.apache.ApiClient;
import com.lancedb.lance.namespace.client.apache.ApiException;
import com.lancedb.lance.namespace.client.apache.Configuration;
import com.lancedb.lance.namespace.client.apache.models.*;
import com.lancedb.lance.namespace.client.apache.api.NamespaceApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");

        NamespaceApi apiInstance = new NamespaceApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        CreateNamespaceRequest createNamespaceRequest = new CreateNamespaceRequest(); // CreateNamespaceRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            CreateNamespaceResponse result = apiInstance.createNamespace(id, createNamespaceRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NamespaceApi#createNamespace");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace.
createNamespaceRequest CreateNamespaceRequest
delimiter String An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. [optional]

Return type

CreateNamespaceResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Result of creating a namespace -
400 Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. -
401 Unauthorized. The request lacks valid authentication credentials for the operation. -
403 Forbidden. Authenticated user does not have the necessary permissions. -
404 A server-side problem that means can not find the specified resource. -
406 Not Acceptable / Unsupported Operation. The server does not support this operation. -
409 The request conflicts with the current state of the target resource. -
503 The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. -
5XX A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. -

describeNamespace

DescribeNamespaceResponse describeNamespace(id, describeNamespaceRequest, delimiter)

Describe information about a namespace

Return the detailed information for a given namespace

Example

// Import classes:
import com.lancedb.lance.namespace.client.apache.ApiClient;
import com.lancedb.lance.namespace.client.apache.ApiException;
import com.lancedb.lance.namespace.client.apache.Configuration;
import com.lancedb.lance.namespace.client.apache.models.*;
import com.lancedb.lance.namespace.client.apache.api.NamespaceApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");

        NamespaceApi apiInstance = new NamespaceApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        DescribeNamespaceRequest describeNamespaceRequest = new DescribeNamespaceRequest(); // DescribeNamespaceRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            DescribeNamespaceResponse result = apiInstance.describeNamespace(id, describeNamespaceRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NamespaceApi#describeNamespace");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace.
describeNamespaceRequest DescribeNamespaceRequest
delimiter String An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. [optional]

Return type

DescribeNamespaceResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns a namespace, as well as any properties stored on the namespace if namespace properties are supported by the server. -
400 Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. -
401 Unauthorized. The request lacks valid authentication credentials for the operation. -
403 Forbidden. Authenticated user does not have the necessary permissions. -
404 A server-side problem that means can not find the specified resource. -
503 The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. -
5XX A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. -

dropNamespace

DropNamespaceResponse dropNamespace(id, dropNamespaceRequest, delimiter)

Drop a namespace

Drop a namespace. The namespace must be empty.

Example

// Import classes:
import com.lancedb.lance.namespace.client.apache.ApiClient;
import com.lancedb.lance.namespace.client.apache.ApiException;
import com.lancedb.lance.namespace.client.apache.Configuration;
import com.lancedb.lance.namespace.client.apache.models.*;
import com.lancedb.lance.namespace.client.apache.api.NamespaceApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");

        NamespaceApi apiInstance = new NamespaceApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        DropNamespaceRequest dropNamespaceRequest = new DropNamespaceRequest(); // DropNamespaceRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            DropNamespaceResponse result = apiInstance.dropNamespace(id, dropNamespaceRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NamespaceApi#dropNamespace");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace.
dropNamespaceRequest DropNamespaceRequest
delimiter String An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. [optional]

Return type

DropNamespaceResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Result of dropping a namespace -
400 Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. -
401 Unauthorized. The request lacks valid authentication credentials for the operation. -
403 Forbidden. Authenticated user does not have the necessary permissions. -
404 A server-side problem that means can not find the specified resource. -
409 The request conflicts with the current state of the target resource. -
503 The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. -
5XX A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. -

listNamespaces

ListNamespacesResponse listNamespaces(id, listNamespacesRequest, delimiter)

List namespaces

List all child namespace names of the root namespace or a given parent namespace.

Example

// Import classes:
import com.lancedb.lance.namespace.client.apache.ApiClient;
import com.lancedb.lance.namespace.client.apache.ApiException;
import com.lancedb.lance.namespace.client.apache.Configuration;
import com.lancedb.lance.namespace.client.apache.models.*;
import com.lancedb.lance.namespace.client.apache.api.NamespaceApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");

        NamespaceApi apiInstance = new NamespaceApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        ListNamespacesRequest listNamespacesRequest = new ListNamespacesRequest(); // ListNamespacesRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            ListNamespacesResponse result = apiInstance.listNamespaces(id, listNamespacesRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NamespaceApi#listNamespaces");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace.
listNamespacesRequest ListNamespacesRequest
delimiter String An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. [optional]

Return type

ListNamespacesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A list of namespaces -
400 Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. -
401 Unauthorized. The request lacks valid authentication credentials for the operation. -
403 Forbidden. Authenticated user does not have the necessary permissions. -
404 A server-side problem that means can not find the specified resource. -
406 Not Acceptable / Unsupported Operation. The server does not support this operation. -
503 The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. -
5XX A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. -

namespaceExists

NamespaceExistsResponse namespaceExists(id, namespaceExistsRequest, delimiter)

Check if a namespace exists

Check if a namespace exists.

Example

// Import classes:
import com.lancedb.lance.namespace.client.apache.ApiClient;
import com.lancedb.lance.namespace.client.apache.ApiException;
import com.lancedb.lance.namespace.client.apache.Configuration;
import com.lancedb.lance.namespace.client.apache.models.*;
import com.lancedb.lance.namespace.client.apache.api.NamespaceApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");

        NamespaceApi apiInstance = new NamespaceApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        NamespaceExistsRequest namespaceExistsRequest = new NamespaceExistsRequest(); // NamespaceExistsRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            NamespaceExistsResponse result = apiInstance.namespaceExists(id, namespaceExistsRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NamespaceApi#namespaceExists");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace.
namespaceExistsRequest NamespaceExistsRequest
delimiter String An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. [optional]

Return type

NamespaceExistsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Result of checking if a namespace exists -
400 Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. -
401 Unauthorized. The request lacks valid authentication credentials for the operation. -
403 Forbidden. Authenticated user does not have the necessary permissions. -
404 A server-side problem that means can not find the specified resource. -
503 The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. -
5XX A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. -