API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  APIC V10 GWY Service Type is not working

    Posted Mon September 21, 2020 11:19 AM
    Team,

    I am trying to automate the Gateway deployment using apic. Script expects the key for DataPower V5 format even though i am trying to use Datapower API Gateway.

    Error: The 'gateway_service_type' property value 'datapower-api-gateway' is incorrect. It has to be 'datapower-gateway' for the gateways of type 'DataPower Gateway (v5 Compatible)'.
    Logout from Cloud Manager

    It looks like a bug, Is anyone faced the issue.


    Thanks
    Chander.

    ------------------------------
    Chander Ponnusamy
    TECHAVIDITY BUSINESS SOLUTIONS PVT LTD,
    Bangalore
    ------------------------------


  • 2.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 02:55 AM
    Hello Chander,

    it is most probably that you have a wrong value for the gateway_service_type in your openAPI document that you try to publish.
    You need to set the value to datapower-gateway if you are deploying on a API Gateway datapower.

    Pierre.


    ------------------------------
    Pierre Richelle
    IBM Hybrid Cloud Integration Specialists
    IBM
    bruxelles
    0474681892
    ------------------------------



  • 3.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 07:49 AM
    Hello Pierre,

    Thanks for your response.  I tried with the same value earlier, it does not work. I will paste the error for both the scenario. I am trying to register the GW as Datapower API Gateway. I am using APIC tool kit as part of my automation.

    1. Set the value for datapower-gateway for gateway_service_type,  I will get the error as follows.

    2020/09/22 17:16:15 Response dump:
    HTTP/1.1 500 Internal Server Error
    Content-Length: 410
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With
    Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
    Connection: keep-alive
    Content-Type: application/yaml; charset=utf-8
    Date: Tue, 22 Sep 2020 11:46:15 GMT
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    X-Request-Id: b21210cce6669559db4caeeafd561460

    status: 500
    message:
    - >-
    An error occurred communicating with the gateways subsystem at
    'https://tapigw.techavidity.in:3000' (status: 400, response: '"Unable to
    perform initial registration for API Management. Error: Unable to create the
    DataPower Gateway service because the gateway address
    https://tapigw.techavidity.in:3000 references a gateway of type DataPower
    API Gateway."').

    Error: An error occurred communicating with the gateways subsystem at 'https://tapigw.techavidity.in:3000' (status: 400, response: '"Unable to perform initial registration for API Management. Error: Unable to create the DataPower Gateway service because the gateway address https://tapigw.techavidity.in:3000 references a gateway of type DataPower API Gateway."').


    2. As per earlier, i am setting the value as datapower-api-gateway, now i will get the following error:

    2020/09/22 17:11:59 Response dump:
    HTTP/1.1 400 Bad Request
    Content-Length: 215
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With
    Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
    Connection: keep-alive
    Content-Type: application/yaml; charset=utf-8
    Date: Tue, 22 Sep 2020 11:41:59 GMT
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    X-Request-Id: 2728c886dc4120b1eeeb65b85b602e11

    status: 400
    message:
    - >-
    The 'gateway_service_type' property value 'datapower-api-gateway' is
    incorrect. It has to be 'datapower-gateway' for the gateways of type
    'DataPower Gateway (v5 Compatible)'.

    Error: The 'gateway_service_type' property value 'datapower-api-gateway' is incorrect. It has to be 'datapower-gateway' for the gateways of type 'DataPower Gateway (v5 Compatible)'.
    Logout from Cloud Manager

    I registered manually to extract the value for same key using REST API, For DataPower API Gateway, the value is datapower-api-gateway. But it's not taking the value from APIC. 

    Based on the above errors, it looks like apic toolkit need to be fixed. Please do let us know your thoughts. 



    ------------------------------
    Chander Ponnusamy
    Founder & CEO
    TECHAVIDITY BUSINESS SOLUTIONS PVT LTD
    ------------------------------



  • 4.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 08:34 AM

    Hello,

    Thanks a lot for this input, it provides useful information.

    May I ask you to provide more information on the actions that you are doing?

    - Are you using REST API as described here:
    https://apic-api.apiconnect.ibmcloud.com/v10/
    I guess yes.
    - You are mentioning apic toolkit. Are you referring to APIC CLI toolkit ?
    - What configuration did you set on the API Gateway Service on Datapower ?



    ------------------------------
    Pierre Richelle
    IBM Hybrid Cloud Integration Specialists
    IBM
    bruxelles
    0474681892
    ------------------------------



  • 5.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 09:03 AM
    Thanks for your reply. I am testing with  both APIC CLI toolkit and REST API. 

    - Are you using REST API as described here:
    https://apic-api.apiconnect.ibmcloud.com/v10/
    I guess yes. - YES.
    - You are mentioning apic toolkit. Are you referring to APIC CLI toolkit ? Yes, APIC CLI toolkit, It does not work.
    - What configuration did you set on the API Gateway Service on Datapower ?  I tested both VMWare and Openshift deployments, observed the same error.  

    For VMWare, this will be the configuration mentioned in IBM Documentation, This is good for apic v2018, v10, 

    For Openshift, we don't need to configure anything apart from enabling web gui.  

    Both VMware and OpenShift, we can create Gateway services manually, Extracted the values from Rest API to see the parameters,  Using same values to create it back using Rest API, it fails.

    Please do let me know if you need more info.


    ------------------------------
    Chander Ponnusamy
    Founder & CEO
    TECHAVIDITY BUSINESS SOLUTIONS PVT LTD
    ------------------------------



  • 6.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 08:21 AM
    I tested the same in REST API too. I created manually and got the values for GW Services, deleted the entry, used the same JSON file as input from REST API, got the same error.

    {
        "status"400,
        "message": [
            "The 'gateway_service_type' property value 'datapower-api-gateway' is incorrect. It has to be 'datapower-gateway' for the gateways of type 'DataPower Gateway (v5 Compatible)'."
        ]
    }

    I will conclude that this is a bug, as i tested it in both APIC toolkit and REST API.


    ------------------------------
    Chander Ponnusamy
    Founder & CEO
    TECHAVIDITY BUSINESS SOLUTIONS PVT LTD
    ------------------------------



  • 7.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 08:36 AM
    can you provide the configuration of your API Gateway Service on DataPower ?

    ------------------------------
    Pierre Richelle
    IBM Hybrid Cloud Integration Specialists
    IBM
    bruxelles
    0474681892
    ------------------------------



  • 8.  RE: APIC V10 GWY Service Type is not working

    Posted Tue September 22, 2020 09:09 AM
    You can create manually, using REST API, Get, you can get existing configuration, delete the GW services from APIC Cloud Console.

    This is from REST API POST method to register the Gateway.
    {
        "gateway_service_type""datapower-api-gateway",
        "api_version""2.0.0",
        "name""gw-service",
        "title""GW Service",
        "endpoint""https://tapigw.techavidity.in:3000",
        "api_endpoint_base""https://tapigw.techavidity.in",
        "tls_client_profile_url""https://tapimg.techavidity.in/api/orgs/8bb54d5b-1930-4dcb-8036-96bc0da3a152/tls-client-profiles/1dfbe8c6-792d-404f-814b-c6b858357ccc",
        "sni": [
            {
                "host""*",
                "tls_server_profile_url""https://tapimg.techavidity.in/api/orgs/8bb54d5b-1930-4dcb-8036-96bc0da3a152/tls-server-profiles/c76bae1d-9d3f-4fdc-8756-4eafcf157e39"
            }
        ],
        "visibility": {
            "type""public"
        }
    }


    ------------------------------
    Chander Ponnusamy
    Founder & CEO
    TECHAVIDITY BUSINESS SOLUTIONS PVT LTD
    ------------------------------