Skip to content

Latest commit

 

History

History
1717 lines (1278 loc) · 53.5 KB

UserApi.md

File metadata and controls

1717 lines (1278 loc) · 53.5 KB

UserApi

All URIs are relative to /v1

Method HTTP request Description
addAWSAccessCredentials POST /credentials/{namespace}/aws
addUserToOrganization POST /organizations/{organization}/user
checkAWSAccessCredentials GET /credentials/{namespace}/aws
checkAWSAccessCredentialsByName GET /credentials/{namespace}/aws/{name}
confirmEmail POST /user/confirm_email
createUser POST /user
deleteAWSAccessCredentials DELETE /credentials/{namespace}/aws/{name}
deleteUser DELETE /users/{username}
deleteUserFromOrganization DELETE /organizations/{organization}/{username}
getOrganizationUser GET /organizations/{organization}/{username}
getSession GET /session
getTokenScopes GET /tokens/scopes
getUser GET /user
getUserWithUsername GET /users/{username}
requestToken POST /token
resetUserPassword POST /user/password_reset
revokeToken DELETE /tokens/{token}
tokensGet GET /tokens
tokensSessionGet GET /tokens/session
updateAWSAccessCredentials PATCH /credentials/{namespace}/aws/{name}
updateUser PATCH /users/{username}
updateUserInOrganization PATCH /organizations/{organization}/{username}

addAWSAccessCredentials

addAWSAccessCredentials(namespace, awsAccessCredentials)

Add aws keys

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String namespace = "namespace_example"; // String | namespace
        AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws access credentials to store for a namespace
        try {
            apiInstance.addAWSAccessCredentials(namespace, awsAccessCredentials);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#addAWSAccessCredentials");
            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
namespace String namespace
awsAccessCredentials AWSAccessCredentials aws access credentials to store for a namespace

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 AWS keys added successfully -
502 Bad Gateway -
0 error response -

addUserToOrganization

addUserToOrganization(organization, user)

add a user to an organization

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String organization = "organization_example"; // String | organization name
        OrganizationUser user = new OrganizationUser(); // OrganizationUser | user to add
        try {
            apiInstance.addUserToOrganization(organization, user);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#addUserToOrganization");
            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
organization String organization name
user OrganizationUser user to add

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user added to organization successfully -
502 Bad Gateway -
0 error response -

checkAWSAccessCredentials

List<AWSAccessCredentials> checkAWSAccessCredentials(namespace)

Check if aws keys are set

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String namespace = "namespace_example"; // String | namespace
        try {
            List<AWSAccessCredentials> result = apiInstance.checkAWSAccessCredentials(namespace);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#checkAWSAccessCredentials");
            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
namespace String namespace

Return type

List<AWSAccessCredentials>

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 AWS keys are set -
502 Bad Gateway -
0 error response -

checkAWSAccessCredentialsByName

AWSAccessCredentials checkAWSAccessCredentialsByName(namespace, name)

Check if aws keys are set by name

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String namespace = "namespace_example"; // String | namespace
        String name = "name_example"; // String | name
        try {
            AWSAccessCredentials result = apiInstance.checkAWSAccessCredentialsByName(namespace, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#checkAWSAccessCredentialsByName");
            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
namespace String namespace
name String name

Return type

AWSAccessCredentials

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 AWS keys are set -
502 Bad Gateway -
0 error response -

confirmEmail

confirmEmail()

confirm user email

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        try {
            apiInstance.confirmEmail();
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#confirmEmail");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 User email confirmed successfully -
502 Bad Gateway -
0 error response -

createUser

createUser(user)

create a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        User user = new User(); // User | user to create
        try {
            apiInstance.createUser(user);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#createUser");
            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
user User user to create

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user created successfully -
502 Bad Gateway -
0 error response -

deleteAWSAccessCredentials

deleteAWSAccessCredentials(namespace, name)

delete a AWS Access credentials in a namespace. This will likely cause arrays to become unreachable

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String namespace = "namespace_example"; // String | namespace
        String name = "name_example"; // String | name
        try {
            apiInstance.deleteAWSAccessCredentials(namespace, name);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#deleteAWSAccessCredentials");
            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
namespace String namespace
name String name

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 AWS credentials deleted -
502 Bad Gateway -
0 error response -

deleteUser

deleteUser(username)

delete a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String username = "username_example"; // String | username or ID
        try {
            apiInstance.deleteUser(username);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#deleteUser");
            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
username String username or ID

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user deleted -
502 Bad Gateway -
0 error response -

deleteUserFromOrganization

deleteUserFromOrganization(organization, username)

delete a user from an organization

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String organization = "organization_example"; // String | organization name
        String username = "username_example"; // String | username to manipulate
        try {
            apiInstance.deleteUserFromOrganization(organization, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#deleteUserFromOrganization");
            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
organization String organization name
username String username to manipulate

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user delete from organization successfully -
502 Bad Gateway -
0 error response -

getOrganizationUser

OrganizationUser getOrganizationUser(organization, username)

get a user from an organization

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String organization = "organization_example"; // String | organization name
        String username = "username_example"; // String | username to manipulate
        try {
            OrganizationUser result = apiInstance.getOrganizationUser(organization, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getOrganizationUser");
            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
organization String organization name
username String username to manipulate

Return type

OrganizationUser

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 user from organization -
404 User is not in organization -
502 Bad Gateway -
0 error response -

getSession

Token getSession(rememberMe)

Get session token for user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String rememberMe = "rememberMe_example"; // String | flag to create a token with expiration of 30 days, default is false
        try {
            Token result = apiInstance.getSession(rememberMe);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getSession");
            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
rememberMe String flag to create a token with expiration of 30 days, default is false [optional]

Return type

Token

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Session token -
502 Bad Gateway -
0 error response -

getTokenScopes

List<TokenScope> getTokenScopes()

retrieves available token scopes for a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        try {
            List<TokenScope> result = apiInstance.getTokenScopes();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getTokenScopes");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<TokenScope>

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 available token scopes -
502 Bad Gateway -
0 error response -

getUser

User getUser()

get a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        try {
            User result = apiInstance.getUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUser");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 user details -
502 Bad Gateway -
0 error response -

getUserWithUsername

User getUserWithUsername(username)

get a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String username = "username_example"; // String | username or ID
        try {
            User result = apiInstance.getUserWithUsername(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUserWithUsername");
            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
username String username or ID

Return type

User

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 user details -
404 User does not exist -
502 Bad Gateway -
0 error response -

requestToken

Token requestToken(tokenRequest)

Request an authorization token, optionally taken a TokenRequest object to set parameters on the token

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        TokenRequest tokenRequest = new TokenRequest(); // TokenRequest | token request object
        try {
            Token result = apiInstance.requestToken(tokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#requestToken");
            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
tokenRequest TokenRequest token request object [optional]

Return type

Token

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 token -
502 Bad Gateway -
0 error response -

resetUserPassword

resetUserPassword(user)

reset user password

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        ResetUserPasswordRequest user = new ResetUserPasswordRequest(); // ResetUserPasswordRequest | password to update for user requesting update
        try {
            apiInstance.resetUserPassword(user);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#resetUserPassword");
            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
user ResetUserPasswordRequest password to update for user requesting update

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 User password updated successfully -
404 User not found -
502 Bad Gateway -
0 error response -

revokeToken

revokeToken(token)

revoke an authorization token

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String token = "token_example"; // String | token name or token itself
        try {
            apiInstance.revokeToken(token);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#revokeToken");
            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
token String token name or token itself

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 revokation successfully -
502 Bad Gateway -
0 error response -

tokensGet

List<Token> tokensGet()

Fetch a list of user tokens

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        try {
            List<Token> result = apiInstance.tokensGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#tokensGet");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<Token>

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Array of user created non-session tokens -
502 Bad Gateway -
0 error response -

tokensSessionGet

List<Token> tokensSessionGet()

Fetch a list of user session tokens

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        try {
            List<Token> result = apiInstance.tokensSessionGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#tokensSessionGet");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<Token>

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Array of user created session tokens -
502 Bad Gateway -
0 error response -

updateAWSAccessCredentials

updateAWSAccessCredentials(namespace, name, awsAccessCredentials)

Update aws keys or associated buckets. This will update the key associations for each array in the namespace

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String namespace = "namespace_example"; // String | namespace
        String name = "name_example"; // String | name
        AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws credentials to update
        try {
            apiInstance.updateAWSAccessCredentials(namespace, name, awsAccessCredentials);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateAWSAccessCredentials");
            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
namespace String namespace
name String name
awsAccessCredentials AWSAccessCredentials aws credentials to update

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 AWS keys updated successfully -
502 Bad Gateway -
0 error response -

updateUser

updateUser(username, user)

update a user

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String username = "username_example"; // String | username or ID
        User user = new User(); // User | user details to update
        try {
            apiInstance.updateUser(username, user);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUser");
            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
username String username or ID
user User user details to update

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user updated successfully -
502 Bad Gateway -
0 error response -

updateUserInOrganization

updateUserInOrganization(organization, username, user)

update a user in an organization

Example

// Import classes:

import ApiClient;
import ApiException;
import Configuration;
import io.tiledb.cloud.rest_api.models.*;
import UserApi;

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

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        UserApi apiInstance = new UserApi(defaultClient);
        String organization = "organization_example"; // String | organization name
        String username = "username_example"; // String | username to manipulate
        OrganizationUser user = new OrganizationUser(); // OrganizationUser | user details to update
        try {
            apiInstance.updateUserInOrganization(organization, username, user);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUserInOrganization");
            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
organization String organization name
username String username to manipulate
user OrganizationUser user details to update

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 user update in organization successfully -
502 Bad Gateway -
0 error response -