title: GET request with Path Parameter in RestAssured API Testing
body: <p>I have tested my API Through Postman</p>
  <p>GET - https://url:8332/v1/agreement/:agreementId?agreementType=posted
  If I use abouve url in postman I am getting result what I expected.</p>
  <p>Where</p>
  <ul>
  <li>https://url:8332 is API Link</li>
  <li>v1/agreement is an endpoint</li>
  <li>:agreementId is <strong>path variabl</strong>e - value is account number so dev made the api in a way that we can pass account number but can not see in url</li>
  <li>agreementType is queryparam</li>
  </ul>
  <p>Now I am trying automate this test using RestAssured
  code:
  String url = &quot;https:/url:8332/v1/agreement&quot;;
  String apiUrl = url + &quot;/agreementId&quot;;</p>
  <p>given().pathParam(&quot;agreementId&quot;, &quot;1234&quot;).queryParam(&quot;agreementType&quot;,&quot;CHQ&quot;).when().get(apiUrl).then().log().body();</p>
  <p>I am getting error like Invalid number of Path Parameters, Expected 0 and was 1. Redundant path parameter are agreementId=1234.</p>