|
| 1 | +# TableApi |
| 2 | + |
| 3 | +All URIs are relative to *http://localhost:2333* |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +|------------- | ------------- | -------------| |
| 7 | +| [**registerTable**](TableApi.md#registerTable) | **POST** /v1/namespaces/{ns}/register | Register a new table in the given namespace. A table represents a lance dataset. In Lance catalog, a table must be hosted in a namespace. | |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## registerTable |
| 12 | + |
| 13 | +> GetTableResponse registerTable(ns, registerTableRequest) |
| 14 | +
|
| 15 | +Register a new table in the given namespace. A table represents a lance dataset. In Lance catalog, a table must be hosted in a namespace. |
| 16 | + |
| 17 | +### Example |
| 18 | + |
| 19 | +```java |
| 20 | +// Import classes: |
| 21 | +import com.lancedb.lance.catalog.client.apache.ApiClient; |
| 22 | +import com.lancedb.lance.catalog.client.apache.ApiException; |
| 23 | +import com.lancedb.lance.catalog.client.apache.Configuration; |
| 24 | +import com.lancedb.lance.catalog.client.apache.models.*; |
| 25 | +import com.lancedb.lance.catalog.client.apache.api.TableApi; |
| 26 | + |
| 27 | +public class Example { |
| 28 | + public static void main(String[] args) { |
| 29 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 30 | + defaultClient.setBasePath("http://localhost:2333"); |
| 31 | + |
| 32 | + TableApi apiInstance = new TableApi(defaultClient); |
| 33 | + String ns = "ns_example"; // String | The name of the namespace. |
| 34 | + RegisterTableRequest registerTableRequest = new RegisterTableRequest(); // RegisterTableRequest | |
| 35 | + try { |
| 36 | + GetTableResponse result = apiInstance.registerTable(ns, registerTableRequest); |
| 37 | + System.out.println(result); |
| 38 | + } catch (ApiException e) { |
| 39 | + System.err.println("Exception when calling TableApi#registerTable"); |
| 40 | + System.err.println("Status code: " + e.getCode()); |
| 41 | + System.err.println("Reason: " + e.getResponseBody()); |
| 42 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 43 | + e.printStackTrace(); |
| 44 | + } |
| 45 | + } |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +### Parameters |
| 50 | + |
| 51 | + |
| 52 | +| Name | Type | Description | Notes | |
| 53 | +|------------- | ------------- | ------------- | -------------| |
| 54 | +| **ns** | **String**| The name of the namespace. | | |
| 55 | +| **registerTableRequest** | [**RegisterTableRequest**](RegisterTableRequest.md)| | | |
| 56 | + |
| 57 | +### Return type |
| 58 | + |
| 59 | +[**GetTableResponse**](GetTableResponse.md) |
| 60 | + |
| 61 | +### Authorization |
| 62 | + |
| 63 | +No authorization required |
| 64 | + |
| 65 | +### HTTP request headers |
| 66 | + |
| 67 | +- **Content-Type**: application/json |
| 68 | +- **Accept**: application/json |
| 69 | + |
| 70 | + |
| 71 | +### HTTP response details |
| 72 | +| Status code | Description | Response headers | |
| 73 | +|-------------|-------------|------------------| |
| 74 | +| **200** | Table properties result when loading a table | - | |
| 75 | +| **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. | - | |
| 76 | +| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - | |
| 77 | +| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - | |
| 78 | +| **406** | Not Acceptable / Unsupported Operation. The server does not support this operation. | - | |
| 79 | +| **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. | - | |
| 80 | +| **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. | - | |
| 81 | + |
0 commit comments