apim-developer-portal2
Version:
API management developer portal
63 lines (53 loc) • 1.66 kB
text/typescript
import * as ko from "knockout";
/**
* A view model for metrics aggregated by API.
*/
export class ReportRecordByApiViewModel {
/**
* API identifier, e.g. "/apis/httpbin".
*/
public apiId: ko.Observable<string>;
/**
* API name, e.g. "HTTP Bin".
*/
public apiName: ko.Observable<string>;
/**
* Number of successful calls.
*/
public callCountSuccess: ko.Observable<string>;
/**
* Number of calls blocked due to invalid credentials.
*/
public callCountBlocked: ko.Observable<string>;
/**
* Number of calls failed due to gateway or backend errors.
*/
public callCountFailed: ko.Observable<string>;
/**
* Number of calls that didn't fall into any of the previous categories
*/
public callCountOther: ko.Observable<string>;
/**
* Total number of calls during requested period.
*/
public callCountTotal: ko.Observable<string>;
/**
* Total bandwidth consumed (Kb).
*/
public bandwidth: ko.Observable<string>;
/**
* Average time it took to process a request.
*/
public apiTimeAvg: ko.Observable<string>;
constructor() {
this.apiId = ko.observable();
this.apiName = ko.observable();
this.callCountSuccess = ko.observable();
this.callCountBlocked = ko.observable();
this.callCountFailed = ko.observable();
this.callCountOther = ko.observable();
this.callCountTotal = ko.observable();
this.bandwidth = ko.observable();
this.apiTimeAvg = ko.observable();
}
}