get_redfish_endpoints

Function get_redfish_endpoints 

Source
pub async fn get_redfish_endpoints(
    infra: &InfraContext<'_>,
    token: &str,
    params: &GetRedfishEndpointsParams,
) -> Result<RedfishEndpointArray, Error>
Expand description

List Redfish endpoint registrations, applying any caller-supplied filters (id / fqdn / uuid / macaddr / ipaddress).

Authorization rules:

  • Admin tokens (carrying crate::service::authorization::PA_ADMIN) may list every endpoint, with or without filters.
  • Non-admin callers MUST scope the request by id. The xname is then validated against the caller’s accessible groups; without an id, the response could leak every BMC’s identity and credentials. The non-admin broad listing returns BadRequest.

§Errors

  • [Error::BadRequest] when a non-admin caller omits params.id, or names an xname outside their accessible groups.
  • [Error::NetError] / [Error::CsmError] from the backend get_redfish_endpoints call.