{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/353","repository_url":"https://api.github.com/repos/Microsoft/vsts-task-lib","labels_url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/353/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/353/events","html_url":"https://github.com/Microsoft/vsts-task-lib/issues/353","id":321087179,"number":353,"title":"Use defined endpoint data sources from tasks","user":{"login":"jsalado","id":12932925,"avatar_url":"https://avatars0.githubusercontent.com/u/12932925?v=4","gravatar_id":"","url":"https://api.github.com/users/jsalado","html_url":"https://github.com/jsalado","followers_url":"https://api.github.com/users/jsalado/followers","following_url":"https://api.github.com/users/jsalado/following{/other_user}","gists_url":"https://api.github.com/users/jsalado/gists{/gist_id}","starred_url":"https://api.github.com/users/jsalado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsalado/subscriptions","organizations_url":"https://api.github.com/users/jsalado/orgs","repos_url":"https://api.github.com/users/jsalado/repos","events_url":"https://api.github.com/users/jsalado/events{/privacy}","received_events_url":"https://api.github.com/users/jsalado/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"GitHubSriramB","id":13654692,"avatar_url":"https://avatars2.githubusercontent.com/u/13654692?v=4","gravatar_id":"","url":"https://api.github.com/users/GitHubSriramB","html_url":"https://github.com/GitHubSriramB","followers_url":"https://api.github.com/users/GitHubSriramB/followers","following_url":"https://api.github.com/users/GitHubSriramB/following{/other_user}","gists_url":"https://api.github.com/users/GitHubSriramB/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubSriramB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubSriramB/subscriptions","organizations_url":"https://api.github.com/users/GitHubSriramB/orgs","repos_url":"https://api.github.com/users/GitHubSriramB/repos","events_url":"https://api.github.com/users/GitHubSriramB/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubSriramB/received_events","type":"User","site_admin":false},"assignees":[{"login":"GitHubSriramB","id":13654692,"avatar_url":"https://avatars2.githubusercontent.com/u/13654692?v=4","gravatar_id":"","url":"https://api.github.com/users/GitHubSriramB","html_url":"https://github.com/GitHubSriramB","followers_url":"https://api.github.com/users/GitHubSriramB/followers","following_url":"https://api.github.com/users/GitHubSriramB/following{/other_user}","gists_url":"https://api.github.com/users/GitHubSriramB/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubSriramB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubSriramB/subscriptions","organizations_url":"https://api.github.com/users/GitHubSriramB/orgs","repos_url":"https://api.github.com/users/GitHubSriramB/repos","events_url":"https://api.github.com/users/GitHubSriramB/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubSriramB/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-05-08T08:18:30Z","updated_at":"2018-05-09T05:08:44Z","closed_at":null,"author_association":"NONE","body":"## Question\r\nIs there a way to use the defined endpoint data sources in the extension manifest from task's TypeScript code? does the task library support this?\r\n\r\nMy case is that I need to call the rest service defined in the endpoint from the task. What I've seen so far is that the data sources are mainly used to populate pick lists in the task definition screens.\r\n\r\nSince the endpoints of the rest service can be defined in the extension manifest and I can access some of that info from the task (URL, authentication). I was wondering if there is a way to call the external rest service with a simple call in the task lib (I haven't seen anything in the task lib docs). I would be a nice feature if it is not possible now.\r\n\r\nCan you confirm if the alternative now is, for example, to build the call to the external rest service in the task and use the node.js request to make the call?\r\n\r\nThanks,\r\nJ.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/comments/387621497","html_url":"https://github.com/Microsoft/vsts-task-lib/issues/353#issuecomment-387621497","issue_url":"https://api.github.com/repos/Microsoft/vsts-task-lib/issues/353","id":387621497,"user":{"login":"omeshp","id":11783897,"avatar_url":"https://avatars2.githubusercontent.com/u/11783897?v=4","gravatar_id":"","url":"https://api.github.com/users/omeshp","html_url":"https://github.com/omeshp","followers_url":"https://api.github.com/users/omeshp/followers","following_url":"https://api.github.com/users/omeshp/following{/other_user}","gists_url":"https://api.github.com/users/omeshp/gists{/gist_id}","starred_url":"https://api.github.com/users/omeshp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeshp/subscriptions","organizations_url":"https://api.github.com/users/omeshp/orgs","repos_url":"https://api.github.com/users/omeshp/repos","events_url":"https://api.github.com/users/omeshp/events{/privacy}","received_events_url":"https://api.github.com/users/omeshp/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T05:08:44Z","updated_at":"2018-05-09T05:08:44Z","author_association":"CONTRIBUTOR","body":"@jsalado Task lib currently doesn't have any such functionality though i agree it will be good to have. Currently the two options are to use [Execute Service Endpoint Request](https://docs.microsoft.com/en-us/rest/api/vsts/serviceendpoint/endpointproxy/execute%20service%20endpoint%20request?view=vsts-rest-5.0) rest API or to call the external rest API directly in task as you mentioned."}}
{"actor":{"display_login":"omeshp"}}