Layer7 API Management

  • 1.  GMU folderId

    Posted Dec 03, 2018 08:59 PM

    Hi There,

    How could i find out what is the folder name with folderId="e001cfd0c1c1ffasadfer187b5e72fd6a8"  using select query against mysql policy store and also wanted to find out the policy name with srcId="12ad0b6dbea27c020a9a795354220131"?  Thanks



  • 2.  Re: GMU folderId

    Broadcom Employee
    Posted Dec 03, 2018 09:46 PM

    Hi - here is half the answer - caught up at the moment - will add the rest in a bit. 

    Cheers - Mark

     

    For folder

    mysql ssg

    mysql> desc folder;

    +--------------------+--------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +--------------------+--------------+------+-----+---------+-------+
    | goid | binary(16) | NO | PRI | NULL | |
    | version | int(10) | NO | | NULL | |
    | name | varchar(255) | NO | MUL | NULL | |
    | parent_folder_goid | binary(16) | YES | MUL | NULL | |
    | security_zone_goid | binary(16) | YES | MUL | NULL | |
    +--------------------+--------------+------+-----+---------+-------+
    5 rows in set (0.00 sec)

    For showing the folder details you can : 
    select lower(hex(goid)),name from folder;

    | 798f19000dd25ef4d6d8ff59a60eec6b | Tools |
    | e001cfd0c1c1ffaa18e187b5e72fedd0 | Tools |
    | e001cfd0c1c1ffaa18e187b5e72fd08e | validation - verification |

    You may need to navigate the parent_folder_goid to find the path. 

     

    mysql> desc policy;
    +--------------------+--------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +--------------------+--------------+------+-----+---------+-------+
    | goid | binary(16) | NO | PRI | NULL | |
    | version | int(10) | NO | | NULL | |
    | name | varchar(255) | NO | UNI | NULL | |
    | xml | mediumtext | NO | | NULL | |
    | policy_type | varchar(255) | NO | MUL | NULL | |
    | soap | tinyint(1) | NO | | 0 | |
    | guid | char(36) | NO | UNI | NULL | |
    | internal_tag | varchar(255) | YES | | NULL | |
    | folder_goid | binary(16) | YES | MUL | NULL | |
    | security_zone_goid | binary(16) | YES | MUL | NULL | |
    | internal_sub_tag | varchar(255) | YES | | NULL | |
    +--------------------+--------------+------+-----+---------+-------+
    11 rows in set (0.00 sec)

     

     select lower(hex(goid)),name from policy;

     

    | c49310fe8d06df56d3ec5a1d2d16b64e | Portal Look Up API Key |
    | 8fcf0c5395d7d25e5f23ea0f3ba4bcc8 | Portal Look Up API Key DB

     

     



  • 3.  Re: GMU folderId

    Broadcom Employee
    Posted Dec 03, 2018 09:51 PM

    Hi Popleys

     

    To query the folder:

     

    select name from ssg.folder where goid=x'e001cfd0c1c1ffasadfer187b5e72fd6a8'\G

     

    To query the service:

     

    select name from ssg.published_service where goid=x'12ad0b6dbea27c020a9a795354220131'\G

     

    Note the "x" before each id. 



  • 4.  Re: GMU folderId

    Posted Dec 04, 2018 08:12 AM

    Thanks.How can I query with the below hexa format? since, goid stores in mysql with hexa format.



  • 5.  Re: GMU folderId

    Broadcom Employee
    Posted Dec 04, 2018 05:38 PM

    Another way that you can gather this information without direct connection to the DB is to use the Restman interface. To find the ID for the folder you can use the link: https://<FQDN or IP of the Gateway>:8443/restman/1.0/folders/{id}  and for the policy  https://<FQDN or IP of the Gateway>:8443/restman/1.0/policies/{id}

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support



  • 6.  Re: GMU folderId

    Broadcom Employee
    Posted Dec 05, 2018 12:34 PM

    Stephens update is good. Also I prefer instead of sql just using gmu to list for the type you want for example to list for folders which shows ID and Name (same should be usable on policy).

    gmu9.3>gmu.bat list -h GatewayHostName -u admin -plaintextPassword MyPass --trustCertificate --trustHostname --type folder



  • 7.  Re: GMU folderId

    Broadcom Employee
    Posted Dec 17, 2018 02:17 PM

    Good afternoon,

     

    Were you able to resolve the issue? What was the final result?

     

    Sincerely,


    Stephen Hughes
    Broadcom Support