Skip to main content

create_api_key

Function create_api_key 

Source
pub async fn create_api_key(
    client: &HttpClient,
    request: CreateApiKeyRequest,
) -> Result<CreateApiKeyResponse, HttpError>
Expand description

Creates a new API key.

§Arguments

  • client - The HTTP client to use for the request.
  • request - The request containing the key name, description, and expiration.

§Returns

The newly created API key with its metadata.

§Errors

Returns an HttpError if the request fails or the server returns an error.