Governance

List customers

GET/api/governance/customers

Returns a list of all customers.

Query Parameters

from_memory?boolean

If true, returns customers from in-memory cache instead of database

Defaultfalse

Response Body

application/json

application/json

curl -X GET "http://localhost:8080/api/governance/customers"
{
  "customers": [
    {
      "id": "string",
      "name": "string",
      "budget_id": "string",
      "budget": {
        "id": "string",
        "max_limit": 0,
        "reset_duration": "string",
        "calendar_aligned": false,
        "last_reset": "2019-08-24T14:15:22Z",
        "current_usage": 0,
        "config_hash": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      },
      "teams": [
        {
          "id": "string",
          "name": "string",
          "customer_id": "string",
          "budget_id": "string",
          "customer": {
            "id": "string",
            "name": "string",
            "budget_id": "string",
            "budget": {
              "id": "string",
              "max_limit": 0,
              "reset_duration": "string",
              "calendar_aligned": false,
              "last_reset": "2019-08-24T14:15:22Z",
              "current_usage": 0,
              "config_hash": "string",
              "created_at": "2019-08-24T14:15:22Z",
              "updated_at": "2019-08-24T14:15:22Z"
            },
            "teams": [
              {
                "id": "string",
                "name": "string",
                "customer_id": "string",
                "budget_id": "string",
                "customer": {},
                "budget": {
                  "id": "string",
                  "max_limit": 0,
                  "reset_duration": "string",
                  "calendar_aligned": false,
                  "last_reset": "2019-08-24T14:15:22Z",
                  "current_usage": 0,
                  "config_hash": "string",
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z"
                },
                "virtual_keys": [
                  {
                    "id": "string",
                    "name": "string",
                    "value": "string",
                    "description": "string",
                    "is_active": true,
                    "provider_configs": [
                      {
                        "id": 0,
                        "virtual_key_id": "string",
                        "provider": "string",
                        "weight": 0,
                        "allowed_models": [
                          "string"
                        ],
                        "budget_id": "string",
                        "rate_limit_id": "string",
                        "budget": {
                          "id": "string",
                          "max_limit": 0,
                          "reset_duration": "string",
                          "calendar_aligned": false,
                          "last_reset": "2019-08-24T14:15:22Z",
                          "current_usage": 0,
                          "config_hash": "string",
                          "created_at": "2019-08-24T14:15:22Z",
                          "updated_at": "2019-08-24T14:15:22Z"
                        },
                        "rate_limit": {
                          "id": "string",
                          "token_max_limit": 0,
                          "token_reset_duration": "string",
                          "token_current_usage": 0,
                          "token_last_reset": "2019-08-24T14:15:22Z",
                          "request_max_limit": 0,
                          "request_reset_duration": "string",
                          "request_current_usage": 0,
                          "request_last_reset": "2019-08-24T14:15:22Z",
                          "config_hash": "string",
                          "created_at": "2019-08-24T14:15:22Z",
                          "updated_at": "2019-08-24T14:15:22Z"
                        },
                        "keys": [
                          {
                            "id": 0,
                            "name": "string",
                            "provider_id": 0,
                            "provider": "string",
                            "key_id": "string",
                            "value": {},
                            "models": [
                              null
                            ],
                            "weight": 0,
                            "enabled": true,
                            "use_for_batch_api": false,
                            "created_at": "2019-08-24T14:15:22Z",
                            "updated_at": "2019-08-24T14:15:22Z",
                            "config_hash": "string",
                            "azure_endpoint": {},
                            "azure_api_version": {},
                            "azure_client_id": {},
                            "azure_client_secret": {},
                            "azure_tenant_id": {},
                            "vertex_project_id": {},
                            "vertex_project_number": {},
                            "vertex_region": {},
                            "vertex_auth_credentials": {},
                            "bedrock_access_key": {},
                            "bedrock_secret_key": {},
                            "bedrock_session_token": {},
                            "bedrock_region": {},
                            "bedrock_arn": {}
                          }
                        ]
                      }
                    ],
                    "mcp_configs": [
                      {
                        "id": 0,
                        "mcp_client_name": "string",
                        "tools_to_execute": [
                          "string"
                        ]
                      }
                    ]
                  }
                ],
                "profile": {},
                "config": {},
                "claims": {},
                "config_hash": "string",
                "created_at": "2019-08-24T14:15:22Z",
                "updated_at": "2019-08-24T14:15:22Z"
              }
            ],
            "virtual_keys": [
              {
                "id": "string",
                "name": "string",
                "value": "string",
                "description": "string",
                "is_active": true,
                "provider_configs": [
                  {
                    "id": 0,
                    "virtual_key_id": "string",
                    "provider": "string",
                    "weight": 0,
                    "allowed_models": [
                      "string"
                    ],
                    "budget_id": "string",
                    "rate_limit_id": "string",
                    "budget": {
                      "id": "string",
                      "max_limit": 0,
                      "reset_duration": "string",
                      "calendar_aligned": false,
                      "last_reset": "2019-08-24T14:15:22Z",
                      "current_usage": 0,
                      "config_hash": "string",
                      "created_at": "2019-08-24T14:15:22Z",
                      "updated_at": "2019-08-24T14:15:22Z"
                    },
                    "rate_limit": {
                      "id": "string",
                      "token_max_limit": 0,
                      "token_reset_duration": "string",
                      "token_current_usage": 0,
                      "token_last_reset": "2019-08-24T14:15:22Z",
                      "request_max_limit": 0,
                      "request_reset_duration": "string",
                      "request_current_usage": 0,
                      "request_last_reset": "2019-08-24T14:15:22Z",
                      "config_hash": "string",
                      "created_at": "2019-08-24T14:15:22Z",
                      "updated_at": "2019-08-24T14:15:22Z"
                    },
                    "keys": [
                      {
                        "id": 0,
                        "name": "string",
                        "provider_id": 0,
                        "provider": "string",
                        "key_id": "string",
                        "value": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "models": [
                          "string"
                        ],
                        "weight": 0,
                        "enabled": true,
                        "use_for_batch_api": false,
                        "created_at": "2019-08-24T14:15:22Z",
                        "updated_at": "2019-08-24T14:15:22Z",
                        "config_hash": "string",
                        "azure_endpoint": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "azure_api_version": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "azure_client_id": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "azure_client_secret": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "azure_tenant_id": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "vertex_project_id": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "vertex_project_number": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "vertex_region": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "vertex_auth_credentials": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "bedrock_access_key": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "bedrock_secret_key": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "bedrock_session_token": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "bedrock_region": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        },
                        "bedrock_arn": {
                          "value": "string",
                          "env_var": "string",
                          "from_env": true
                        }
                      }
                    ]
                  }
                ],
                "mcp_configs": [
                  {
                    "id": 0,
                    "mcp_client_name": "string",
                    "tools_to_execute": [
                      "string"
                    ]
                  }
                ]
              }
            ],
            "config_hash": "string",
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "budget": {
            "id": "string",
            "max_limit": 0,
            "reset_duration": "string",
            "calendar_aligned": false,
            "last_reset": "2019-08-24T14:15:22Z",
            "current_usage": 0,
            "config_hash": "string",
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "virtual_keys": [
            {
              "id": "string",
              "name": "string",
              "value": "string",
              "description": "string",
              "is_active": true,
              "provider_configs": [
                {
                  "id": 0,
                  "virtual_key_id": "string",
                  "provider": "string",
                  "weight": 0,
                  "allowed_models": [
                    "string"
                  ],
                  "budget_id": "string",
                  "rate_limit_id": "string",
                  "budget": {
                    "id": "string",
                    "max_limit": 0,
                    "reset_duration": "string",
                    "calendar_aligned": false,
                    "last_reset": "2019-08-24T14:15:22Z",
                    "current_usage": 0,
                    "config_hash": "string",
                    "created_at": "2019-08-24T14:15:22Z",
                    "updated_at": "2019-08-24T14:15:22Z"
                  },
                  "rate_limit": {
                    "id": "string",
                    "token_max_limit": 0,
                    "token_reset_duration": "string",
                    "token_current_usage": 0,
                    "token_last_reset": "2019-08-24T14:15:22Z",
                    "request_max_limit": 0,
                    "request_reset_duration": "string",
                    "request_current_usage": 0,
                    "request_last_reset": "2019-08-24T14:15:22Z",
                    "config_hash": "string",
                    "created_at": "2019-08-24T14:15:22Z",
                    "updated_at": "2019-08-24T14:15:22Z"
                  },
                  "keys": [
                    {
                      "id": 0,
                      "name": "string",
                      "provider_id": 0,
                      "provider": "string",
                      "key_id": "string",
                      "value": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "models": [
                        "string"
                      ],
                      "weight": 0,
                      "enabled": true,
                      "use_for_batch_api": false,
                      "created_at": "2019-08-24T14:15:22Z",
                      "updated_at": "2019-08-24T14:15:22Z",
                      "config_hash": "string",
                      "azure_endpoint": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "azure_api_version": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "azure_client_id": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "azure_client_secret": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "azure_tenant_id": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "vertex_project_id": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "vertex_project_number": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "vertex_region": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "vertex_auth_credentials": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "bedrock_access_key": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "bedrock_secret_key": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "bedrock_session_token": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "bedrock_region": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      },
                      "bedrock_arn": {
                        "value": "string",
                        "env_var": "string",
                        "from_env": true
                      }
                    }
                  ]
                }
              ],
              "mcp_configs": [
                {
                  "id": 0,
                  "mcp_client_name": "string",
                  "tools_to_execute": [
                    "string"
                  ]
                }
              ]
            }
          ],
          "profile": {},
          "config": {},
          "claims": {},
          "config_hash": "string",
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z"
        }
      ],
      "virtual_keys": [
        {
          "id": "string",
          "name": "string",
          "value": "string",
          "description": "string",
          "is_active": true,
          "provider_configs": [
            {
              "id": 0,
              "virtual_key_id": "string",
              "provider": "string",
              "weight": 0,
              "allowed_models": [
                "string"
              ],
              "budget_id": "string",
              "rate_limit_id": "string",
              "budget": {
                "id": "string",
                "max_limit": 0,
                "reset_duration": "string",
                "calendar_aligned": false,
                "last_reset": "2019-08-24T14:15:22Z",
                "current_usage": 0,
                "config_hash": "string",
                "created_at": "2019-08-24T14:15:22Z",
                "updated_at": "2019-08-24T14:15:22Z"
              },
              "rate_limit": {
                "id": "string",
                "token_max_limit": 0,
                "token_reset_duration": "string",
                "token_current_usage": 0,
                "token_last_reset": "2019-08-24T14:15:22Z",
                "request_max_limit": 0,
                "request_reset_duration": "string",
                "request_current_usage": 0,
                "request_last_reset": "2019-08-24T14:15:22Z",
                "config_hash": "string",
                "created_at": "2019-08-24T14:15:22Z",
                "updated_at": "2019-08-24T14:15:22Z"
              },
              "keys": [
                {
                  "id": 0,
                  "name": "string",
                  "provider_id": 0,
                  "provider": "string",
                  "key_id": "string",
                  "value": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "models": [
                    "string"
                  ],
                  "weight": 0,
                  "enabled": true,
                  "use_for_batch_api": false,
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z",
                  "config_hash": "string",
                  "azure_endpoint": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "azure_api_version": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "azure_client_id": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "azure_client_secret": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "azure_tenant_id": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "vertex_project_id": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "vertex_project_number": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "vertex_region": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "vertex_auth_credentials": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "bedrock_access_key": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "bedrock_secret_key": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "bedrock_session_token": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "bedrock_region": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  },
                  "bedrock_arn": {
                    "value": "string",
                    "env_var": "string",
                    "from_env": true
                  }
                }
              ]
            }
          ],
          "mcp_configs": [
            {
              "id": 0,
              "mcp_client_name": "string",
              "tools_to_execute": [
                "string"
              ]
            }
          ]
        }
      ],
      "config_hash": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "count": 0
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}