List Api Keys
ApiKeyListPage apiKeys().list(ApiKeyListParamsparams = ApiKeyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/beta/api-keys
List API keys.
Name a project_id to list every key on that project, which its members
share; naming one you cannot read is a 404. Omit it to list your own. A
project-scoped key sees only its own project either way.
List Api Keys
package ai.llamaindex.llamacloudadmin.example;
import ai.llamaindex.llamacloudadmin.client.LlamaCloudAdminClient;
import ai.llamaindex.llamacloudadmin.client.okhttp.LlamaCloudAdminOkHttpClient;
import ai.llamaindex.llamacloudadmin.models.apikeys.ApiKeyListPage;
import ai.llamaindex.llamacloudadmin.models.apikeys.ApiKeyListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
LlamaCloudAdminClient client = LlamaCloudAdminOkHttpClient.fromEnv();
ApiKeyListPage page = client.apiKeys().list();
}
}{
"items": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"redacted_api_key": "redacted_api_key",
"user_id": "user_id",
"created_at": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"key_type": "agent",
"metadata": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"role": "admin",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}Returns Examples
{
"items": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"redacted_api_key": "redacted_api_key",
"user_id": "user_id",
"created_at": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"key_type": "agent",
"metadata": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"role": "admin",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}