Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-2375

CDS source-rest should accept "query" parameters to build the REST Call

XMLWordPrintable

      CDS source-rest should accept "query" parameters to build the REST Call

       

      maybe we can add a source property like "headers" and call it "query"

       

       

      For example:

       

       

       

        "vlanID" : {  "vlanID" : {    "tags" : "vlanID",    "name" : "vlanID",    "property" :

      {      "description" : "vlanID",      "type" : "string"    }

      ,    "group" : "default",    "updated-by" : "Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>",    "sources" : {      "input" :

      {        "type" : "source-input"      }

      ,      "default" : {        "type" : "source-default",        "properties" : { }      },      "rest": { "type": "source-rest", "properties": { "endpoint-selector": "ipam-1", "type": "JSON", "verb": "GET", "url-path": "/api/ipam/vlans?status=2", "path": "/result/0/vid", "input-key-mapping": { }, "output-key-mapping": { "vlanID": "vid", "id": "id" }, "key-dependencies": [ ] } }
            }  }

       

      the "?status=2" will be url encoded by CDS to be "%3Fstatus=2", as shown below, resulting in the server returing 404 error

       

      2020-05-16 20:40:43,076|708aef51-adda-45d1-989d-efd01bcedd90||DefaultDispatcher-worker-2||/api/v1/execution-service/process||INFO|||onap-cds-cds-blueprints-processor-f9b9fb547-xxtgm|||| rest dictionary information : (/api/ipam/vlans?status=2), ({}), ({vlanID=value, id=id})
      2020-05-16 20:40:43,079|708aef51-adda-45d1-989d-efd01bcedd90||DefaultDispatcher-worker-2||/api/v1/execution-service/process||INFO|||onap-cds-cds-blueprints-processor-f9b9fb547-xxtgm|||| Rest request method(GET), url(/api/ipam/vlans%3Fstatus=2)

            jozsef jozsef
            abdelseaudi abdelseaudi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: