Layer7 API Management

  • 1.  RESTMan Policies listing

    Posted Feb 27, 2017 07:49 AM

    Hi,

     

    I'm wondering where we went wrong on this one, or if this is a feature/bug.

     

    Our administration framework defined a function

     

    getPoliciesById

    which calls getPolicies, initiating a 'List' method call:

     

    /usr/bin/curl -k -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u 'xxxx@yyyyyy' --cacert /etc/pki/tls/private/CA_chain.pem 'https://the_host:7443/restman/1.0/policies?guid=95e3b9885eb49938444df31fa0d15c78'

     

    This returns an empty list.

     

    If we use Get method:

     

    /usr/bin/curl -k -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u 'xxxxx@yyyyyy' --cacert /etc/pki/tls/private/CA_chain.pem 'https://the_host:7443/restman/1.0/policies/95e3b9885eb49938444df31fa0d15c78'

     

    returns a valid list with one item

     

    Can't we use List method filtering on guid ?



  • 2.  Re: RESTMan Policies listing
    Best Answer

    Broadcom Employee
    Posted Feb 27, 2017 09:46 PM

    Hi PhBrand ,

    It seems you used the id as guid.

    when you list a policy, you should see a line similar as below,

    <l7:Policy guid="e2c9c575-2b8b-4c45-a346-41d9788e14c4" id="590fc44908206d3aa58a28fe35577578" version="0">

    Then you can list the policy with link,

    https://the_host:7443/restman/1.0/policies?guid=e2c9c575-2b8b-4c45-a346-41d9788e14c4

    or,

    https://the_host:7443/restman/1.0/policies/590fc44908206d3aa58a28fe35577578

     

    Regards,

    Mark