{"type":"api","title":"Fetches all existing performance policies","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/f117fa98-ad23-3ca8-adf8-21349b86b3ff","info":{"title":"Crosswork Performance APIs","description":"Performance APIs allow the user to perform CRUD operations on performance service","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/EMF/performance-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"http://localhost:8080/crosswork/performance","description":"Generated server url"}]},"spec":{"tags":["monitoring-policy-controller"],"summary":"Fetches all existing performance policies.","description":"Response contain policy metrics, units and TCA if enabled, status, interval periods and port group if supported.","operationId":"getPolicies","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"monitoringPolicy":{"type":"object","properties":{"id":{"type":"number","description":"Policy ID, generated by the system.","example":1},"policyTemplate":{"type":"string","description":"policyTemplate can be retrieved by monitoring-policy-controller/getPolicyTemplates query","example":"deviceHealth"},"name":{"type":"string","description":"Policy name"},"description":{"type":"string","description":"Policy description"},"schemasInterval":{"type":"object","additionalProperties":{"type":"integer","description":"Polling frequency for each schema in the policy. The key is the schema name and the value is the polling interval in seconds.","format":"int32"},"description":"Polling frequency for each schema in the policy. The key is the schema name and the value is the polling interval in seconds.","example":{"MEMORY":300}},"devices":{"type":"string","description":"List of device UUIDs separated by comma."},"deviceGroups":{"type":"string","description":"List of device group UUIDs or names separated by comma."},"portGroups":{"type":"string","description":"List of port group UUIDs or names separated by comma."},"tag":{"type":"string","description":"Contact information","example":"{contact:admin@domain.com}"},"thresholds":{"type":"object","additionalProperties":{"type":"array","description":"Thresholds for each field in the policy. The key is the metric name and the value is a list of TCACondition objects. Can be retrieved by monitoring-policy-controller/getPolicyTemplates query","items":{"type":"object","properties":{"conditionID":{"type":"integer","description":"Unique ID of the TCA per metric (this is sequential)","format":"int32","example":1},"relation":{"type":"string","description":"Relation of the condition. Can be GT, GE, LT, LE, EQ","example":"GT"},"value":{"type":"string","description":"Value of the condition","example":"100"},"count":{"type":"integer","description":"The count of successive instances where the metric breached its threshold.","format":"int32","example":1},"severity":{"type":"string","description":"The severity of the alarm or event. Possible values for alarms are: 'CRITICAL', 'MAJOR', 'MINOR' or 'WARNING'. 'INFO' for event","enum":["CRITICAL","MAJOR","MINOR","WARNING","CLEARED","INFORMATION"]},"extraConditionFields":{"type":"array","description":"Tca extra fields for QoS.","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the field on which the condition is set"},"values":{"type":"array","description":"The possible values of the condition","items":{"type":"string","description":"The possible values of the condition"}},"value":{"type":"string","description":"The selected value of the condition"},"min":{"type":"string","description":"The bottom limit of the value"},"max":{"type":"string","description":"The upper limit of the value"},"relation":{"type":"string","description":"The operator on the condition","example":"eq"},"fieldInputType":{"type":"string","description":"The type of the conditon's fields","example":"int"},"fieldValueType":{"type":"string","description":"The type of the conditon's value","example":"int"}},"description":"Tca extra fields for QoS.","$$ref":"#/components/schemas/TCAExtraConditionField"}}},"description":"Thresholds for each field in the policy. The key is the metric name and the value is a list of TCACondition objects. Can be retrieved by monitoring-policy-controller/getPolicyTemplates query","$$ref":"#/components/schemas/TCACondition"}},"description":"Thresholds for each field in the policy. The key is the metric name and the value is a list of TCACondition objects. Can be retrieved by monitoring-policy-controller/getPolicyTemplates query"},"active":{"type":"boolean","description":"Indicates if the policy is active or not. Default is true."},"creationTimestamp":{"type":"number","description":"The policy's creation time in epoch"},"lastChangedTimestamp":{"type":"number","description":"The last time the policy was updated in epoch"}},"$$ref":"#/components/schemas/MonitoringPolicy"},"monitoringPolicyTemplate":{"type":"object","properties":{"policyTemplate":{"type":"string"},"schemasInterval":{"type":"object","additionalProperties":{"type":"object","properties":{"defaultInterval":{"type":"integer","format":"int32"},"pollingIntervals":{"type":"array","items":{"type":"integer","format":"int32"}}},"description":"Maps between the default policy frequency to all possible polling frequencies ","example":{"defaultInterval":300,"pollingIntervals":[0,300,900,1800,3600]},"$$ref":"#/components/schemas/Intervals"},"description":"Polling frequency for each schema in the policy. The key is the schema name and the value is the polling interval in seconds.","example":{"DVAVAILABILITY":{"defaultInterval":300,"pollingIntervals":[0,300,900,1800,3600]},"MEMORY":{"defaultInterval":300,"pollingIntervals":[0,300,900,1800,3600]},"ENVTEMP":{"defaultInterval":300,"pollingIntervals":[0,300,900,1800,3600]},"CPU":{"defaultInterval":300,"pollingIntervals":[0,300,900,1800,3600]}}},"schemasFieldMetadata":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{"min":{"type":"string","description":"The lowest possible value of the field.","example":"0"},"max":{"type":"string","description":"The highest possible value of the field.","example":"100"},"unitType":{"type":"string","description":"The field's unit","example":"PERCENTAGE","enum":["NUMBER","KNUMBER","MNUMBER","GNUMBER","PACKETS","KPACKETS","MPACKETS","GPACKETS","TPACKETS","PPACKETS","PACKETS_PER_SECOND","KPACKETS_PER_SECOND","MPACKETS_PER_SECOND","GPACKETS_PER_SECOND","BYTES","KBYTES","MBYTES","GBYTES","TBYTES","PBYTES","BYTES_PER_SECOND","KBYTES_PER_SECOND","MBYTES_PER_SECOND","GBYTES_PER_SECOND","TBYTES_PER_SECOND","BITS","KBITS","MBITS","GBITS","TBITS","PBITS","BITS_PER_SECOND","KBITS_PER_SECOND","MBITS_PER_SECOND","GBITS_PER_SECOND","WATTS","KWATTS","MWATTS","KWATTS_PER_DAY","MWATTS_PER_DAY","MILLIAMP","AMP","PERCENTAGE","CELSIUS","VOLT","DBM","DB","DBQ"]},"additionalFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the field on which the condition is set"},"values":{"type":"array","description":"The possible values of the condition","items":{"type":"string","description":"The possible values of the condition"}},"value":{"type":"string","description":"The selected value of the condition"},"min":{"type":"string","description":"The bottom limit of the value"},"max":{"type":"string","description":"The upper limit of the value"},"relation":{"type":"string","description":"The operator on the condition","example":"eq"},"fieldInputType":{"type":"string","description":"The type of the conditon's fields","example":"int"},"fieldValueType":{"type":"string","description":"The type of the conditon's value","example":"int"}},"description":"Tca extra fields for QoS.","$$ref":"#/components/schemas/TCAExtraConditionField"}},"displayName":{"type":"string","description":"The field's display name.","example":"CPU Utilization"},"TCAEnabled":{"type":"boolean","description":"true if the field can be set with TCA.","example":true}},"description":"Maps the schema name to every field and its metdata (min, max & unit).","example":{"DVAVAILABILITY":{"deviceAvailability":{"TCAEnabled":false}},"MEMORY":{"memoryUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"CPU":{"cpuUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"ENVTEMP":{"envTemperatureX100":{"unitType":"CELSIUS","TCAEnabled":true},"envTemperatureInletX100":{"unitType":"CELSIUS","TCAEnabled":true}}},"$$ref":"#/components/schemas/FieldMetadata"},"description":"Maps the schema name to every field and its metdata (min, max & unit).","example":{"DVAVAILABILITY":{"deviceAvailability":{"TCAEnabled":false}},"MEMORY":{"memoryUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"CPU":{"cpuUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"ENVTEMP":{"envTemperatureX100":{"unitType":"CELSIUS","TCAEnabled":true},"envTemperatureInletX100":{"unitType":"CELSIUS","TCAEnabled":true}}}},"description":"Maps the schema name to every field and its metdata (min, max & unit).","example":{"DVAVAILABILITY":{"deviceAvailability":{"TCAEnabled":false}},"MEMORY":{"memoryUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"CPU":{"cpuUtilization":{"min":"0","max":"100","unitType":"PERCENTAGE","TCAEnabled":true}},"ENVTEMP":{"envTemperatureX100":{"unitType":"CELSIUS","TCAEnabled":true},"envTemperatureInletX100":{"unitType":"CELSIUS","TCAEnabled":true}}}},"schemaDisplayMap":{"type":"object","additionalProperties":{"type":"string"}},"portGroupSupported":{"type":"boolean","description":"True if the policy is interface based","example":true}},"$$ref":"#/components/schemas/MonitoringPolicyTemplate"},"policyCollectionStatus":{"type":"string","enum":["OK","PARTIAL"]}},"$$ref":"#/components/schemas/MonitoringPolicyDTO"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"__originalOperationId":"getPolicies","method":"get","path":"/v1/policies"}}