Skip to main content
GET
/
api
/
governance
/
customers
Get All Customers
curl --request GET \
  --url http://localhost:8080/api/governance/customers
{
  "customers": [
    {
      "id": "<string>",
      "name": "<string>",
      "budget_id": "<string>",
      "budget": {
        "id": "<string>",
        "max_limit": 123,
        "reset_duration": "<string>",
        "last_reset": "2023-11-07T05:31:56Z",
        "current_usage": 123
      },
      "teams": [
        {
          "id": "<string>",
          "name": "<string>",
          "customer_id": "<string>",
          "budget_id": "<string>",
          "customer": "<unknown>",
          "budget": {
            "id": "<string>",
            "max_limit": 123,
            "reset_duration": "<string>",
            "last_reset": "2023-11-07T05:31:56Z",
            "current_usage": 123
          },
          "virtual_keys": [
            {
              "id": "<string>",
              "name": "<string>",
              "value": "<string>",
              "description": "<string>",
              "team_id": "<string>",
              "customer_id": "<string>",
              "budget_id": "<string>",
              "rate_limit_id": "<string>",
              "is_active": true,
              "keys": [
                {
                  "name": "openai-key-1",
                  "value": "env.OPENAI_API_KEY",
                  "weight": 1,
                  "models": [
                    "gpt-4o",
                    "gpt-4o-mini"
                  ],
                  "azure_key_config": {
                    "endpoint": "https://your-resource.openai.azure.com",
                    "deployments": {
                      "gpt-4o": "gpt-4o-deployment"
                    },
                    "api_version": "2024-02-15-preview"
                  },
                  "vertex_key_config": {
                    "project_id": "your-project-id",
                    "region": "us-central1",
                    "auth_credentials": "env.VERTEX_AUTH_CREDENTIALS"
                  },
                  "bedrock_key_config": {
                    "access_key": "env.AWS_ACCESS_KEY_ID",
                    "secret_key": "env.AWS_SECRET_ACCESS_KEY",
                    "session_token": "env.AWS_SESSION_TOKEN",
                    "region": "us-east-1",
                    "arn": "arn:aws:iam::123456789012:role/BedrockRole",
                    "deployments": {
                      "gpt-4o": "gpt-4o-deployment"
                    }
                  }
                }
              ],
              "budget": {
                "id": "<string>",
                "max_limit": 123,
                "reset_duration": "<string>",
                "last_reset": "2023-11-07T05:31:56Z",
                "current_usage": 123
              },
              "rate_limit": {
                "id": "<string>",
                "token_max_limit": 123,
                "token_reset_duration": "<string>",
                "request_max_limit": 123,
                "request_reset_duration": "<string>",
                "token_last_reset": "2023-11-07T05:31:56Z",
                "request_last_reset": "2023-11-07T05:31:56Z"
              },
              "team": "<unknown>",
              "customer": "<unknown>",
              "provider_configs": [
                {
                  "id": 123,
                  "provider": "<string>",
                  "weight": 123,
                  "allowed_models": [
                    "<string>"
                  ]
                }
              ],
              "mcp_configs": [
                {
                  "mcp_client_name": "<string>",
                  "tools_to_execute": [
                    "<string>"
                  ],
                  "id": 123
                }
              ],
              "config_hash": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z"
            }
          ],
          "profile": {},
          "config": {},
          "claims": {},
          "config_hash": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ],
      "virtual_keys": [
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<string>",
          "description": "<string>",
          "team_id": "<string>",
          "customer_id": "<string>",
          "budget_id": "<string>",
          "rate_limit_id": "<string>",
          "is_active": true,
          "keys": [
            {
              "name": "openai-key-1",
              "value": "env.OPENAI_API_KEY",
              "weight": 1,
              "models": [
                "gpt-4o",
                "gpt-4o-mini"
              ],
              "azure_key_config": {
                "endpoint": "https://your-resource.openai.azure.com",
                "deployments": {
                  "gpt-4o": "gpt-4o-deployment"
                },
                "api_version": "2024-02-15-preview"
              },
              "vertex_key_config": {
                "project_id": "your-project-id",
                "region": "us-central1",
                "auth_credentials": "env.VERTEX_AUTH_CREDENTIALS"
              },
              "bedrock_key_config": {
                "access_key": "env.AWS_ACCESS_KEY_ID",
                "secret_key": "env.AWS_SECRET_ACCESS_KEY",
                "session_token": "env.AWS_SESSION_TOKEN",
                "region": "us-east-1",
                "arn": "arn:aws:iam::123456789012:role/BedrockRole",
                "deployments": {
                  "gpt-4o": "gpt-4o-deployment"
                }
              }
            }
          ],
          "budget": {
            "id": "<string>",
            "max_limit": 123,
            "reset_duration": "<string>",
            "last_reset": "2023-11-07T05:31:56Z",
            "current_usage": 123
          },
          "rate_limit": {
            "id": "<string>",
            "token_max_limit": 123,
            "token_reset_duration": "<string>",
            "request_max_limit": 123,
            "request_reset_duration": "<string>",
            "token_last_reset": "2023-11-07T05:31:56Z",
            "request_last_reset": "2023-11-07T05:31:56Z"
          },
          "team": "<unknown>",
          "customer": "<unknown>",
          "provider_configs": [
            {
              "id": 123,
              "provider": "<string>",
              "weight": 123,
              "allowed_models": [
                "<string>"
              ]
            }
          ],
          "mcp_configs": [
            {
              "mcp_client_name": "<string>",
              "tools_to_execute": [
                "<string>"
              ],
              "id": 123
            }
          ],
          "config_hash": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ],
      "config_hash": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "count": 123
}

Response

200 - application/json

Successful response

customers
object[]
count
integer