- /**
- * Gets version details
- * @returns Observable that should yield a String
- */
- getVersion(): Observable<string> {
- const url = this.buildPath('version');
- return this.httpClient.get<ControlpanelSuccessTransport>(url).pipe(
- // Extract the string here
- map(res => res['data'])
- );
+ getPolicyTypes(): Observable<PolicyTypes> {
+ const url = this.buildPath(this.policyTypesPath);
+ return this.httpClient.get<PolicyTypes>(url);
+ }
+
+ getPolicyType(policyTypeId: string): Observable<PolicyType> {
+ const url = this.buildPath(this.policyTypesPath + '/' + policyTypeId);
+ return this.httpClient.get<PolicyType>(url);
+ }
+
+ getPolicyInstancesByType(policyTypeId: string): Observable<PolicyInstances> {
+ const url = this.buildPath(this.policyPath + '?' + 'policytype_id=' + policyTypeId);
+ return this.httpClient.get<PolicyInstances>(url);