GetApiKeys

Get List of API Keys.

rpc GetApiKeys

user_api.v1.GetApiKeys

Get List of API Keys.

requests GetApiKeysRequest

user_api.v1.GetApiKeysRequest

resp, _ := apiKeyManagerService.GetApiKeys(ctx, &v1.GetApiKeysRequest{})
fmt.Println(resp)
const getapikeysrequest = new GetApiKeysRequest();

service.getApiKeys(getapikeysrequest, (err, value:GetApiKeysResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using UserApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new ApiKeyManagerService.ApiKeyManagerServiceClient(channel); 
      var headers = new Metadata();
      var getApiKeysRequest = new GetApiKeysRequest{};
      var reply = client.GetApiKeys(getApiKeysRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import user_api.v1.ApiKeyManagerServiceGrpc;
import user_api.v1.User.GetApiKeysRequest;
import user_api.v1.User.GetApiKeysResponse;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    ApiKeyManagerServiceGrpc.ApiKeyManagerServiceBlockingStub blockStub =
        ApiKeyManagerServiceGrpc.newBlockingStub(channel);
    
    GetApiKeysRequest req_GetApiKeysRequest =
        GetApiKeysRequest.newBuilder()
          .build();
    GetApiKeysResponse resp = blockStub.getApiKeys(req_GetApiKeysRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const getapikeysrequest = new GetApiKeysRequest();

service.getApiKeys(getapikeysrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::user_api::v1::api_key_manager_service_client::ApiKeyManagerServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let channel = Channel::from_static("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io")
    .connect()
    .await?;
  let mut client = ApiKeyManagerServiceClient::new(channel); 

  let request = tonic::Request::new(
    ());
// sending request and waiting for response
  let response = client.get_api_keys(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import user_api.v1.ApiKeyManagerServiceGrpc
import user_api.v1.User.GetApiKeysRequest
import user_api.v1.User.GetApiKeysResponse

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = ApiKeyManagerServiceGrpc.newBlockingStub(channel)
    
    val req_GetApiKeysRequest = GetApiKeysRequest.newBuilder()
          .build()
    val resp = blockStub.getApiKeys(req_GetApiKeysRequest)
    println(resp)
    channel.shutdown()
}


returns GetApiKeysResponse

user_api.v1.GetApiKeysResponse

FieldTypeDescription
api_key_entitiesApiKeyEntity repeatedList of API Keys.
{
  "api_key_entities": [
    {
      "client_id": "CLIENT_ID1",
      "client_name": "CLIENT_NAME1",
      "api_key": "API_KEY",
      "status": 0,
      "expiry_date": {
        "seconds": 0,
        "nanos": 0
      }
    },
    {
      "client_id": "CLIENT_ID2",
      "client_name": "CLIENT_NAME2",
      "api_key": "API_KEY",
      "status": 0,
      "expiry_date": {
        "seconds": 0,
        "nanos": 0
      }
    }
  ]
}