<commit_before>{
  "name": "API LATENCY OVER TIME",
  "id": "APILatencyOverTime",
  "thumbnailURL": "",
  "configs": {
    "pubsub": {
      "types": ["subscriber"]
    },
    "providerConfig" : {
      "configs": {
        "type": "SiddhiStoreDataProvider",
        "config": {
          "siddhiApp": "@App:name('APIM_ACCESS_SUMMARY') define stream Request (meta_clientType string, applicationConsumerKey string, applicationName string, applicationId string, applicationOwner string, apiContext string,apiName string, apiVersion string, apiResourcePath string, apiResourceTemplate string, apiMethod string, apiCreator string, apiCreatorTenantDomain string, apiTier string, apiHostname string, username string, userTenantDomain string, userIp string, userAgent string, requestTimestamp long, throttledOut bool, responseTime long, serviceTime long, backendTime long, responseCacheHit bool, responseSize long, protocol string, responseCode int, destination string, securityLatency long, throttlingLatency long, requestMedLat long, responseMedLat long, backendLatency long, otherLatency long, gatewayType string, label string); @primaryKey('API_ID')  @store(type=\"rdbms\" , datasource= \"AM_DB\") define table AM_API(API_ID int,API_PROVIDER string,API_NAME string,API_VERSION string,CONTEXT string,CONTEXT_TEMPLATE string,API_TIER string,API_TYPE string,CREATED_BY string,CREATED_TIME string,UPDATED_BY string,UPDATED_TIME string); @primaryKey('URL_MAPPING_ID') @store(type= \"rdbms\" , datasource= \"AM_DB\") define table AM_API_URL_MAPPING(URL_MAPPING_ID int,API_ID int,HTTP_METHOD string,AUTH_SCHEME string,URL_PATTERN string,THROTTLING_TIER string,MEDIATION_SCRIPT string); @primaryKey('APPLICATION_ID') @store(type= \"rdbms\" , datasource= \"AM_DB\") define table AM_APPLICATION(APPLICATION_ID int, NAME string, SUBSCRIBER_ID int, APPLICATION_TIER string, CALLBACK_URL string, DESCRIPTION string, APPLICATION_STATUS  string, GROUP_ID string, CREATED_BY string, CREATED_TIME string, UPDATED_BY string, UPDATED_TIME string, UUID string, TOKEN_TYPE string); @store(type = 'rdbms', datasource = 'APIM_ANALYTICS_DB', field.length = \"apiMethod:20, regionalID:20, SHARD_ID:20\") define aggregation ApiExeTime from Request select apiName, apiVersion, apiContext, apiCreator, apiCreatorTenantDomain, apiHostname, apiResourceTemplate, apiMethod, avg(responseTime) as responseTime, avg(serviceTime) as serviceTime, avg(backendTime) as backendTime, avg(securityLatency) as securityLatency, avg(throttlingLatency) as throttlingLatency, avg(requestMedLat) as requestMedLat, avg(responseMedLat) as responseMedLat, avg(backendLatency) as backendLatency, avg(otherLatency) as otherLatency, 'default' as regionalID group by apiContext, apiHostname, apiResourceTemplate, apiMethod aggregate by requestTimestamp every seconds...years;",
          "queryData": {
            "drillDownQuery": "from ApiExeTime {{querystring}} within {{from}}L, {{to}}L per \"{{per}}s\" select {{selectPhase}} {{groupByPhase}} {{orderBy}} limit {{limit}};",
            "listApisQuery": "from AM_API on {{contextContainsCondition}} select API_NAME, API_TYPE group by API_NAME, API_TYPE",
            "listVersionsQuery": "from AM_API on ({{contextContainsCondition}} AND API_NAME == '{{selectedAPI}}' ) select API_ID, API_NAME, API_VERSION, API_TYPE group by API_ID, API_VERSION, API_TYPE",
            "listOperationsQuery": "from AM_API_URL_MAPPING on (API_ID == {{API_ID}} ) select URL_MAPPING_ID,URL_PATTERN,HTTP_METHOD group by URL_MAPPING_ID,URL_PATTERN,HTTP_METHOD",
            "productOperationsQuery": "SELECT AM_API_PRODUCT_MAPPING.API_ID as API_ID, AM_API_URL_MAPPING.URL_MAPPING_ID as URL_MAPPING_ID, URL_PATTERN, HTTP_METHOD FROM AM_API_URL_MAPPING INNER JOIN AM_API_PRODUCT_MAPPING ON AM_API_URL_MAPPING.URL_MAPPING_ID=AM_API_PRODUCT_MAPPING.URL_MAPPING_ID where AM_API_PRODUCT_MAPPING.API_ID = {{API_ID}}"
          },
          "publishingInterval": 360000
        }
      },
      "listProductQueryConfigs" : {
        "type" : "RDBMSStreamingDataProvider",
        "config" : {
          "datasourceName": "AM_DB",
          "queryData" : {
            "queryName": "listApisQuery"
          },
          "tableName": "AM_API_URL_MAPPING",
          "incrementalColumn": "URL_MAPPING_ID",
          "publishingLimit": 2147483647,
          "purgingInterval": 6,
          "purgingLimit": 6,
          "isPurgingEnable": false
        }
      }
    },
    "options": [
    ]
  }
}
<commit_msg>Fix API LATENCY OVER TIME widget does not work when an API is selected<commit_after>{
  "name": "API LATENCY OVER TIME",
  "id": "APILatencyOverTime",
  "thumbnailURL": "",
  "configs": {
    "pubsub": {
      "types": ["subscriber"]
    },
    "providerConfig" : {
      "configs": {
        "type": "SiddhiStoreDataProvider",
        "config": {
          "siddhiApp": "@App:name('APIM_ACCESS_SUMMARY') define stream Request (meta_clientType string, applicationConsumerKey string, applicationName string, applicationId string, applicationOwner string, apiContext string,apiName string, apiVersion string, apiResourcePath string, apiResourceTemplate string, apiMethod string, apiCreator string, apiCreatorTenantDomain string, apiTier string, apiHostname string, username string, userTenantDomain string, userIp string, userAgent string, requestTimestamp long, throttledOut bool, responseTime long, serviceTime long, backendTime long, responseCacheHit bool, responseSize long, protocol string, responseCode int, destination string, securityLatency long, throttlingLatency long, requestMedLat long, responseMedLat long, backendLatency long, otherLatency long, gatewayType string, label string); @primaryKey('API_ID')  @store(type=\"rdbms\" , datasource= \"AM_DB\") define table AM_API(API_ID int,API_PROVIDER string,API_NAME string,API_VERSION string,CONTEXT string,CONTEXT_TEMPLATE string,API_TIER string,API_TYPE string,CREATED_BY string,CREATED_TIME string,UPDATED_BY string,UPDATED_TIME string); @primaryKey('URL_MAPPING_ID') @store(type= \"rdbms\" , datasource= \"AM_DB\") define table AM_API_URL_MAPPING(URL_MAPPING_ID int,API_ID int,HTTP_METHOD string,AUTH_SCHEME string,URL_PATTERN string,THROTTLING_TIER string,MEDIATION_SCRIPT string); @primaryKey('APPLICATION_ID') @store(type= \"rdbms\" , datasource= \"AM_DB\") define table AM_APPLICATION(APPLICATION_ID int, NAME string, SUBSCRIBER_ID int, APPLICATION_TIER string, CALLBACK_URL string, DESCRIPTION string, APPLICATION_STATUS  string, GROUP_ID string, CREATED_BY string, CREATED_TIME string, UPDATED_BY string, UPDATED_TIME string, UUID string, TOKEN_TYPE string); @store(type = 'rdbms', datasource = 'APIM_ANALYTICS_DB', field.length = \"apiMethod:20, regionalID:20, SHARD_ID:20\") define aggregation ApiExeTime from Request select apiName, apiVersion, apiContext, apiCreator, apiCreatorTenantDomain, apiHostname, apiResourceTemplate, apiMethod, avg(responseTime) as responseTime, avg(serviceTime) as serviceTime, avg(backendTime) as backendTime, avg(securityLatency) as securityLatency, avg(throttlingLatency) as throttlingLatency, avg(requestMedLat) as requestMedLat, avg(responseMedLat) as responseMedLat, avg(backendLatency) as backendLatency, avg(otherLatency) as otherLatency, 'default' as regionalID group by apiContext, apiHostname, apiResourceTemplate, apiMethod aggregate by requestTimestamp every seconds...years;",
          "queryData": {
            "drillDownQuery": "from ApiExeTime {{querystring}} within {{from}}L, {{to}}L per \"{{per}}s\" select {{selectPhase}} {{groupByPhase}} {{orderBy}} limit {{limit}};",
            "listApisQuery": "from AM_API on {{contextContainsCondition}} select API_NAME, API_TYPE group by API_NAME, API_TYPE",
            "listVersionsQuery": "from AM_API on ({{contextContainsCondition}} AND API_NAME == '{{selectedAPI}}' ) select API_ID, API_NAME, API_VERSION, API_TYPE group by API_ID, API_NAME, API_VERSION, API_TYPE",
            "listOperationsQuery": "from AM_API_URL_MAPPING on (API_ID == {{API_ID}} ) select URL_MAPPING_ID,URL_PATTERN,HTTP_METHOD group by URL_MAPPING_ID,URL_PATTERN,HTTP_METHOD",
            "productOperationsQuery": "SELECT AM_API_PRODUCT_MAPPING.API_ID as API_ID, AM_API_URL_MAPPING.URL_MAPPING_ID as URL_MAPPING_ID, URL_PATTERN, HTTP_METHOD FROM AM_API_URL_MAPPING INNER JOIN AM_API_PRODUCT_MAPPING ON AM_API_URL_MAPPING.URL_MAPPING_ID=AM_API_PRODUCT_MAPPING.URL_MAPPING_ID where AM_API_PRODUCT_MAPPING.API_ID = {{API_ID}}"
          },
          "publishingInterval": 360000
        }
      },
      "listProductQueryConfigs" : {
        "type" : "RDBMSStreamingDataProvider",
        "config" : {
          "datasourceName": "AM_DB",
          "queryData" : {
            "queryName": "listApisQuery"
          },
          "tableName": "AM_API_URL_MAPPING",
          "incrementalColumn": "URL_MAPPING_ID",
          "publishingLimit": 2147483647,
          "purgingInterval": 6,
          "purgingLimit": 6,
          "isPurgingEnable": false
        }
      }
    },
    "options": [
    ]
  }
}

{'fraction_non_alphanumeric': 0.10411353808626234, 'fraction_numerical': 0.005322097793546956, 'mean_word_length': 5.303284416491963, 'pattern_counts': {'":': 52, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3441333', 'n_tokens_mistral': 2908, 'n_tokens_neox': 2765, 'n_words': 672}