mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
fix(api_key): fix api key list and update endpoints for v2 (#5980)
This commit is contained in:
@ -183,6 +183,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::api_keys::api_key_retrieve,
|
||||
routes::api_keys::api_key_update,
|
||||
routes::api_keys::api_key_revoke,
|
||||
routes::api_keys::api_key_list,
|
||||
|
||||
// Routes for events
|
||||
routes::webhook_events::list_initial_webhook_delivery_attempts,
|
||||
|
||||
@ -109,6 +109,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::api_keys::api_key_retrieve,
|
||||
routes::api_keys::api_key_update,
|
||||
routes::api_keys::api_key_revoke,
|
||||
routes::api_keys::api_key_list,
|
||||
|
||||
//Routes for customers
|
||||
routes::customers::customers_create,
|
||||
|
||||
@ -163,3 +163,44 @@ pub async fn api_key_revoke() {}
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn api_key_revoke() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// API Key - List
|
||||
///
|
||||
/// List all the API Keys associated to a merchant account.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/api_keys/{merchant_id}/list",
|
||||
params(
|
||||
("merchant_id" = String, Path, description = "The unique identifier for the merchant account"),
|
||||
("limit" = Option<i64>, Query, description = "The maximum number of API Keys to include in the response"),
|
||||
("skip" = Option<i64>, Query, description = "The number of API Keys to skip when retrieving the list of API keys."),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "List of API Keys retrieved successfully", body = Vec<RetrieveApiKeyResponse>),
|
||||
),
|
||||
tag = "API Key",
|
||||
operation_id = "List all API Keys associated with a merchant account",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn api_key_list() {}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
/// API Key - List
|
||||
///
|
||||
/// List all the API Keys associated to a merchant account.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v2/api_keys/list",
|
||||
params(
|
||||
("limit" = Option<i64>, Query, description = "The maximum number of API Keys to include in the response"),
|
||||
("skip" = Option<i64>, Query, description = "The number of API Keys to skip when retrieving the list of API keys."),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "List of API Keys retrieved successfully", body = Vec<RetrieveApiKeyResponse>),
|
||||
),
|
||||
tag = "API Key",
|
||||
operation_id = "List all API Keys associated with a merchant account",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn api_key_list() {}
|
||||
|
||||
Reference in New Issue
Block a user