Layer7 API Management

 View Only
  • 1.  Policy for check which method is enabled for an API

    Posted Jan 24, 2021 03:32 PM


    How to write a policy to check which method is enabled  like (GET,POST,DELETE,OPTION etc.) for an API in CA API Gateway Layer 7 .?




    Regards,
    Sanjeev


  • 2.  RE: Policy for check which method is enabled for an API

    Posted Jan 29, 2021 10:16 PM
    Is there any one who can help on this.

    Regards,
    Snajeev


  • 3.  RE: Policy for check which method is enabled for an API

    Broadcom Employee
    Posted Jan 29, 2021 10:25 PM
    That information can be found in //l7:Service/l7:ServiceDetail/l7:ServiceMapping/l7:HttpMapping/l7:Verbs element of the Service object in Restman.

    ------------------------------
    Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
    ------------------------------



  • 4.  RE: Policy for check which method is enabled for an API

    Posted Feb 06, 2021 02:40 PM
    Hi Jay ,
            I am not able to find the path as you mentioned. Suppose I deploy 10 services in different folder, now I want to check & display that in the services the OPTION method is enable or not then how to do that or how to implement a policy to achieve that ?

    Regards,
    Sanjeev


  • 5.  RE: Policy for check which method is enabled for an API

    Broadcom Employee
    Posted Feb 06, 2021 03:29 PM
    Use a Restman call to get the service objects from the folder, then use that XPath to determine the verbs that are enabled for each to see if OPTION is on of them.

    If you want to do this in policy, you can make direct Restman calls using the REST Manage Gateway assertion so long as the identity making the call to the policy has been authenticated as an admin user. The uri and action for calling it are described in the documentation for the assertion.

    ------------------------------
    Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
    ------------------------------



  • 6.  RE: Policy for check which method is enabled for an API

    Posted Feb 06, 2021 03:47 PM
    Many thanks for the quick reply Jay. Can you please provide any link or some docc regarding this for more clarity as m very new with this Layer 7  .



    Regards,
    Sanjeev


  • 7.  RE: Policy for check which method is enabled for an API

    Broadcom Employee
    Posted Feb 08, 2021 06:46 PM
      |   view attached
    The Gateway documentation is at https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0.html

    Once you have the Restman service published you can see its documentation directly on your gateway by pointing a browser to https://<yourGateway>:8443/restman/1.0/doc

    Attached is a simple policy illustrating how to call Restman directly from a service. Publish a Web API service at /serviceProperties, import this policy into it, then access it with your browser (https://<yourGateway>:8443/serviceProperties) using admin credentials from the Internal Identity Provider. It retrieves a list of all services then cycles through the XML for each to extract the properties and builds an html response.

    ------------------------------
    Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
    ------------------------------

    Attachment(s)

    xml
    ServiceProperties.xml   17 KB 1 version