Skip to content

Create metrics endpoints for TMF Service Order related information

Create endpoints:

  • GET /tmf-api/metrics/totalServiceOrders (optional params - state)
    • Exp. Resp: { totalServiceOrders: 123 }
  • GET /tmf-api/metrics/activeServiceOrders (Tip: Return INPROGRESS | COMPLETED Service Orders with requestedStartDate < currentDate < requestedCompletionDate)
    • Exp. Resp: { activeServiceOrders: 123 }
  • GET /tmf-api/metrics/serviceOrdersGroupByDay (params - starttime: ISOdatetime and endtime:ISOdatetime e.g. 2025-04-14T11:08:10Z) - allow max 31 days diff
    • Exp. Resp:
{ 
 serviceOrders: {
   total: 23, 
   aggregations: {
     groupByDay: {  
       [{ key:"2025-04-14T00:00:00.000Z", count: 2 }, { key:"2025-04-13T00:00:00.000Z", count: 3 }, ...]
     }
   }
 }
}
  • GET /tmf-api/metrics/serviceOrdersGroupByState (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:
{ 
 serviceOrders: {
   total: 10, 
   aggregations: {
     groupByState: {  
       [{ key:"INITIAL", count: 2 }, { key:"ACKNOWLEDGED", count: 2 }, { key:"INPROGRESS", count: 2 }, { key:"COMPLETED", count: 2 }, { key:"FAILED", count: 2 } ]
     }
   }
 }
}
Edited by Kostis Trantzas