IBM i Global

IBM i 

A space for professionals working with IBM’s integrated OS for Power systems to exchange ideas, ask questions, and share expertise on topics like RPG and COBOL development, application modernization, open source integration, system administration, and business continuity.


#Power


#IBMi
#Power
 View Only
  • 1.  404 error when using multiple path parameters in IBM i IWS

    Posted Tue January 06, 2026 01:36 AM

    I am building a REST API using IBM i Integrated Web Services (IWS).

    Currently, the API works correctly when I pass a single path parameter (customer number) and returns the expected record.
    For example, the following URL returns a valid response when I pass customer number 01010:

    http://localhost:10099/web/services/CUSTQRYXX/01010

    Now I would like to pass multiple path parameters, such as customer number and area code, to retrieve a record using both values.

    I tried calling the API with an additional path parameter (area code 02) as shown below, but this results in a 404 Not Found error:

    http://localhost:10099/web/services/CUSTQRYXX/01010/02

    The parameters in IWS are configured as path parameters.

    My questions are:

    • Is it supported to specify multiple path parameters in an IWS REST service?

    • If so, what configuration is required on the IWS side to handle multiple path parameters?

    • Are there common causes of a 404 error in this scenario (IWS service definition, parameter mapping, ILE program interface, URL format, etc.)?

    Any guidance or examples would be greatly appreciated...

    Thank you



    ------------------------------
    SAKURA KOGA
    ------------------------------


  • 2.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 30 days ago
    Edited by Satid S 30 days ago

    Dear Koga-san

    Have you tried :   localhost:10099/web/services/CUSTQRYXX?customer_number=01010&area_code=02 



    ------------------------------
    Satid S
    ------------------------------



  • 3.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 30 days ago
    Edited by Nadir K Amra 16 days ago

    In order to specify multiple pieces of information in path, you must deploy web service with URI path template.  Something like /{custno}/{areaCode}.  And then you need to inject those parameters in corresponding input parameter.  

    Example is given in https://www.ibm.com/support/pages/system/files/inline-files/IWS-Building-REST-Service-Part-3_0.pdf

    Ibm remove preview
    View this on Ibm >

    figure 11. 



    ------------------------------
    Nadir K Amra
    ------------------------------



  • 4.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 16 days ago
    Edited by Marius le Roux 16 days ago

    Hi , @Nadir K Amra ,

    Please double check that URL (it seems its got a "," at the end) which could be misleading to some who thinks the document is not available anymore. 

    Thank you



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Modernization and Integration Consultant
    MLR Consulting
    ------------------------------



  • 5.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 16 days ago

    corrected URL



    ------------------------------
    Nadir K Amra
    ------------------------------



  • 6.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 17 days ago

    Dear Sakura, 

    Error 404 (Not Found) makes me think of a misconfigured path template (as Nadir mentioned) and therefore a problem with the service configuration (not the *pgm).
    If the problem persists, could we have a screenshot of the configuration page for the service in question? (with a stop + redeploy command to return to it).

    Best regards,

    Gautier



    ------------------------------
    Gautier DUMAS
    CEO
    CFD-Innovation
    RESTINCLIERES
    +33607525416
    ------------------------------



  • 7.  RE: 404 error when using multiple path parameters in IBM i IWS

    Posted 12 days ago

    Hi @Gautier DUMAS-san,

    Thank you for your reply

    As you mentioned, the issue was not related to the *pgm, but to the service configuration.The 404 error was caused by an incorrect URL when passing multiple values.

    We confirmed that, in this case, multiple values can be passed by separating them with a comma (,), for example:http://localhost:10044/web/services/CUSTQRY01/01010,02

    For API testing, we used Swagger Viewer.
    By checking the specification in VS Code, we were able to confirm the correct URL and execution result.

    Thank you again for your helpful comment.



    ------------------------------
    SAKURA KOGA
    ------------------------------