Layer7 API Management

  • 1.  In which table column the policy revision history information will save in SSG data base. ?

    Posted Aug 16, 2015 03:42 AM

    Hi all,

    i want to know how many policies has been created in particular date and time, in ssg data base which table we can get this information. ?

     

    Message was edited by: Leif Bildoy Removed Categories for OAuth and MAG



  • 2.  Re: In which table column the policy revision history information will save in SSG data base. ?

    Posted Aug 17, 2015 08:21 AM

    Selecting information from the Gateway database directly is unsupported. Are you using version 8.2.00 of the Gateway or later? A more appropriate way to get this information would be to use the RESTMAN API. There is a function that can be used to get policy revision lists for specific policies. You can use the following HTTP request to print a list of all policy revision information: GET 1.0/policies/{id}/versions


    More specifically: You would need to provide a policy ID number in the request URI. This can also be selected from a RESTMAN API call using GET 1.0/policies and to select the value of the element located at the following XPath: /L7:Item/L7:Id. You would then use that value in the 1.0/policies/{id}/versions request to pull all versions.



  • 3.  Re: In which table column the policy revision history information will save in SSG data base. ?

    Posted Sep 15, 2015 10:15 PM

    Hi Eric Goedtel,

     

    Thanks a lot, this was very useful information. we are using 8.1.0 version, so we are not able to publish rest service . In addition to it ,is it possible to retrieve data from database being used by layer7 with help of some query.?

     

    Q) want to know how many services are created in last one month? and which service created on which date/time ?

     

     

    Thanks

    Uday.



  • 4.  Re: In which table column the policy revision history information will save in SSG data base. ?
    Best Answer

    Posted Sep 16, 2015 08:32 AM

    Unfortunately, querying the API Gateway database directly is unsupported. The best way to get this information would be to upgrade the product to a version that has API endpoints that support the type of metrics you are trying to collate.



  • 5.  Re: In which table column the policy revision history information will save in SSG data base. ?

    Posted Sep 30, 2015 11:26 AM

    I believe you will be able to query the ssg database and get the details directly if you are smart enough to map the data in two tables published_service and policy_version. A sample query would look like this.

     

    select a.name,FROM_UNIXTIME(b.time DIV 1000),b.user_login,b.active from published_service a,policy_version b where a.name="Service1" and goidToString(a.policy_goid)=goidToString(b.policy_goid);

     

    Output from policy manager and the appliance will look like this. You might want to adjust the timezone to your local time zone and the active policy is the one has value=1 in column active.

     

    ssg_query.jpg



  • 6.  Re: In which table column the policy revision history information will save in SSG data base. ?

    Posted Oct 01, 2015 01:47 AM

    Thanks Anand, yes, i can get data what ever i need.



  • 7.  Re: In which table column the policy revision history information will save in SSG data base. ?

    Posted Oct 13, 2015 11:33 AM

    You certainly can do that but unfortunately we are unable to support that work. Thank you for sharing your insight.