Create metrics endpoints for TMF Resource related information
Create endpoints:
- GET /tmf-api/metrics/totalResources (optional params - state)
- Exp. Resp: { totalResources: 32 }
- GET /tmf-api/metrics/resourcesGroupByState (params - starttime: ISOdatetime and endtime:ISOdatetime e.g. 2025-04-14T11:08:10Z) - allow max 31 days diff / double check the TMF state names
- Exp. Resp:
{
resources: {
total: 10,
aggregations: {
groupByState: {
[{ key:"RESERVED", count: 2 }, { key:"AVAILABLE", count: 2 }, { key:"ALARM", count: 2 }, { key:"UNKNOWN", count: 2 }, { key:"SUSPENDED", count: 2 } ]
}
}
}
}