Service Virtualization

Expand all | Collapse all

Read values from Request URL (PARAM)

Jump to Best Answer
  • 1.  Read values from Request URL (PARAM)

    Posted 03-22-2018 12:44 AM

    Hi, My incoming request looks like below. 



    I will need to retrieve PLAN ID (planid1234), Version ID (versionif1234) and account id(4444) from the Request URL. 


    I tried RegEx [A-Za-z][A-Za-z0-9\+\.\-\?]* while recording and my URI Rules look like below but only retrieves Plan ID and Version id. Doesn't retrieve Account ID.. Please advice



  • 2.  Re: Read values from Request URL (PARAM)
    Best Answer

    Posted 03-22-2018 08:49 AM

    I believe you should reset the URI rules. You should be able to parse this URI OOTB.

    GET /its/data/plans/{URLPARAM0}/versions/{URLPARAM1}/assets/investment is the URI.


    When the REST parser parses the request the following Argument List entries should feed into the VSI:

    URLPARAM0 = planid1234

    URLPARAM1 = versionid1234

    accountId = 4444

    The Rest DPH parses the {URLPARAM...} values and creates arguments in the transaction's argument list.

    The Query String (?accountId=4444) is processed OOTB and is not part of the URI in terms of URLPARAM... definition and parsing.