Hello,
I'm build a extension and I requiere call API Rest service dynamically, for this I try as:
my datasources:
"dataSources": [
{
"name": "environments",
"endpointUrl": "{{endpoint.url}}/v2/configurations?count=100&offset=0&scope=me",
"resultSelector": "jsonpath:$.[].id",
},
{
"name": "hostnames",
"endpointUrl": "{{endpoint.url}}/v2/configurations/$(environment).json",
"resultSelector": "jsonpath:$.vms[].name"
}
]
and my inputs and dataSource Bindings in the json task are:
"inputs": [{
"name": "environment",
"defaultValue": "",
"type": "pickList",
"label": "Nombre del Ambiente",
"required": true,
"properties": {
"EditableOptions": "True"
},
"helpMarkDown": "Selecione el nombre del Ambiente a actualizar."
},
{
"name": "hostname",
"defaultValue": "",
"type": "pickList",
"label": "Nombre de máquina",
"required": true,
"helpMarkDown": "Seleccione el nombre de la máquina",
"properties": {
"EditableOptions": "True"
}
}
],
"dataSourceBindings": [
{
"target": "environment",
"endpointId": "$(TestService)",
"dataSourceName": "environments"
},
{
"target": "hostname",
"endpointId": "$(TestService)",
"dataSourceName": "hostnames",
"parameters": {
"environment": "$(environment)"
}
}
],
.....
but when I put the "environment" input and reload input "hostname" the response from javascript console is:
{
"$id": "1",
"innerException": null,
"message": "Variable with name environment could not be found for the given service connection.",
"typeName": "Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi.ServiceEndpointException, Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi",
"typeKey": "ServiceEndpointException",
"errorCode": 0,
"eventId": 3000
}
What can I be doing wrong so that the parameter is not sent?