All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
createCorpus | POST /cp/corpus | Create corpus |
createUser | POST /cp/user | Create user |
deleteCorpus | DELETE /cp/corpus | Delete corpus |
deleteUser | DELETE /cp/user | Delete user |
Memorize200Response createCorpus(createCorpusRequest)
Create corpus
Create a corpus under a namespace
// Import classes:
import ai.memas.memassdk.invoker.ApiClient;
import ai.memas.memassdk.invoker.ApiException;
import ai.memas.memassdk.invoker.Configuration;
import ai.memas.memassdk.invoker.models.*;
import ai.memas.memassdk.api.CpApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
CpApi apiInstance = new CpApi(defaultClient);
CreateCorpusRequest createCorpusRequest = new CreateCorpusRequest(); // CreateCorpusRequest |
try {
Memorize200Response result = apiInstance.createCorpus(createCorpusRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CpApi#createCorpus");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createCorpusRequest | CreateCorpusRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Operation | - |
400 | Failed operation | - |
Memorize200Response createUser(createUserRequest)
Create user
Create a namespace user
// Import classes:
import ai.memas.memassdk.invoker.ApiClient;
import ai.memas.memassdk.invoker.ApiException;
import ai.memas.memassdk.invoker.Configuration;
import ai.memas.memassdk.invoker.models.*;
import ai.memas.memassdk.api.CpApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
CpApi apiInstance = new CpApi(defaultClient);
CreateUserRequest createUserRequest = new CreateUserRequest(); // CreateUserRequest |
try {
Memorize200Response result = apiInstance.createUser(createUserRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CpApi#createUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createUserRequest | CreateUserRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Operation | - |
400 | Failed operation | - |
Memorize200Response deleteCorpus(deleteCorpusRequest)
Delete corpus
Delete a corpus under a namespace
// Import classes:
import ai.memas.memassdk.invoker.ApiClient;
import ai.memas.memassdk.invoker.ApiException;
import ai.memas.memassdk.invoker.Configuration;
import ai.memas.memassdk.invoker.models.*;
import ai.memas.memassdk.api.CpApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
CpApi apiInstance = new CpApi(defaultClient);
DeleteCorpusRequest deleteCorpusRequest = new DeleteCorpusRequest(); // DeleteCorpusRequest |
try {
Memorize200Response result = apiInstance.deleteCorpus(deleteCorpusRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CpApi#deleteCorpus");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deleteCorpusRequest | DeleteCorpusRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Operation | - |
400 | Failed operation | - |
Memorize200Response deleteUser(createUserRequest)
Delete user
Delete a namespace user
// Import classes:
import ai.memas.memassdk.invoker.ApiClient;
import ai.memas.memassdk.invoker.ApiException;
import ai.memas.memassdk.invoker.Configuration;
import ai.memas.memassdk.invoker.models.*;
import ai.memas.memassdk.api.CpApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
CpApi apiInstance = new CpApi(defaultClient);
CreateUserRequest createUserRequest = new CreateUserRequest(); // CreateUserRequest |
try {
Memorize200Response result = apiInstance.deleteUser(createUserRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CpApi#deleteUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createUserRequest | CreateUserRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Operation | - |
400 | Failed operation | - |