Salesforce

Java API endpoint: getAdminTokens

« Go Back
Information
Java API endpoint: getAdminTokens
000008286
Public
Product Selection
aiWare - API
Article Details

AdminGetTokensResponse getAdminTokens(xCorrelationId, offset, limit, direction, startCreatedTime, endCreatedTime, startExpireTime, endExpireTime, tokenID, organizationIDs, hostID, userID, engineInstanceID, type, orderBy, roleIDs, accessAllOrganization)

This provides information about all tokens.

Example

// Import classes:
import com.veritone.aiware.ApiClient;
import com.veritone.aiware.ApiException;
import com.veritone.aiware.Configuration;
import com.veritone.aiware.auth.*;
import com.veritone.aiware.models.*;
import com.veritone.aiware.edge.AdminApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.aiware.com/edge/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    AdminApi apiInstance = new AdminApi(defaultClient);
    String xCorrelationId = "xCorrelationId_example"; // String | Correlation Id that can be passed, traced in the server and will be returned in the response if present in the request
    Long offset = 56L; // Long | the number of data to skip before getting the result set
    Long limit = 10lL; // Long | the number of items to return.
    String direction = "\"DESC\""; // String | the sort order.  ASC or DESC.
    Long startCreatedTime = 56L; // Long | The unix timestamp
    Long endCreatedTime = 56L; // Long | The unix timestamp
    Long startExpireTime = 56L; // Long | The unix timestamp
    Long endExpireTime = 56L; // Long | The unix timestamp
    UUID tokenID = new UUID(); // UUID | Filter by token IDs
    UUID organizationIDs = new UUID(); // UUID | Filter by organization IDs
    UUID hostID = new UUID(); // UUID | Filter by host IDs
    UUID userID = new UUID(); // UUID | Filter by user IDs
    UUID engineInstanceID = new UUID(); // UUID | Filter by engine instance IDs
    TokenTypeEnum type = new TokenTypeEnum(); // TokenTypeEnum | Filter by token type
    String orderBy = "orderBy_example"; // String | It should be in [createdTime, expirationTime, tokenType]
    UUID roleIDs = new UUID(); // UUID | Filters by role
    Boolean accessAllOrganization = true; // Boolean | 
    try {
      AdminGetTokensResponse result = apiInstance.getAdminTokens(xCorrelationId, offset, limit, direction, startCreatedTime, endCreatedTime, startExpireTime, endExpireTime, tokenID, organizationIDs, hostID, userID, engineInstanceID, type, orderBy, roleIDs, accessAllOrganization);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminApi#getAdminTokens");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
xCorrelationIdStringCorrelation Id that can be passed, traced in the server and will be returned in the response if present in the request[optional]
offsetLongthe number of data to skip before getting the result set[optional]
limitLongthe number of items to return.[optional] [default to 10l]
directionStringthe sort order. ASC or DESC.[optional] [default to "DESC"]
startCreatedTimeLongThe unix timestamp[optional]
endCreatedTimeLongThe unix timestamp[optional]
startExpireTimeLongThe unix timestamp[optional]
endExpireTimeLongThe unix timestamp[optional]
tokenIDUUIDFilter by token IDs[optional]
organizationIDsUUIDFilter by organization IDs[optional]
hostIDUUIDFilter by host IDs[optional]
userIDUUIDFilter by user IDs[optional]
engineInstanceIDUUIDFilter by engine instance IDs[optional]
typeTokenTypeEnumFilter by token type[optional] [enum: engine_instance, host, api, user, bootstrap]
orderByStringIt should be in [createdTime, expirationTime, tokenType][optional]
roleIDsUUIDFilters by role[optional]
accessAllOrganizationBoolean[optional]

Return type

AdminGetTokensResponse

Authorization

api_key

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successful operation* X-Aiware-Version -
* X-Correlation-Id -
400Invalid argument. Please see the error response for more information.* X-Aiware-Version -
* X-Correlation-Id -
401Not authorized* X-Aiware-Version -
* X-Correlation-Id -
403Forbidden* X-Aiware-Version -
* X-Correlation-Id -
404Not Found* X-Aiware-Version -
* X-Correlation-Id -
405The request is not allowed.* X-Aiware-Version -
* X-Correlation-Id -
429Too Many Requests* Retry-After -
* X-Aiware-Version -
* X-Correlation-Id -
501Not Implemented* X-Aiware-Version -
* X-Correlation-Id -
503System Unavailable* Retry-After -
* X-Aiware-Version -
* X-Correlation-Id -
Additional Technical Documentation Information
Properties
4/9/2025 6:17 PM
4/9/2025 6:19 PM
4/9/2025 6:19 PM
Documentation
Documentation
000008286
Translation Information
English

Powered by