1

我按照 https://docs.microsoft.com/en-us/azure/devops/extend/develop/service-endpoints?view=azure-devops上的教程进行操作

api 调用是正确的,因为如果我不进行身份验证,它会在错误消息中显示正确的路径。在浏览器中输入它在消息中显示的 url 会给出正确的 json。

选择列表对象的行为就像它正在尝试加载,但最终会显示未找到任何结果。

您可以使用个人公司 api 使用服务器端点加载选项列表吗?

你如何调试这个。我在调试工具的网络选项卡中看到的只是 200 来自 azure 的帖子。


This is the JSON 
{
  "meta": {
    "record_count": 5,
    "source": "mongodb",
    "searchParams": {
      "versions.start_date": {
        "$gte": "2019-08-30T00:11:55.329Z"
      }
    },
    "paging": {
      "num": 10,
      "start": 0
    }
  },
  "screenshots": [
    {
      "screenshot_test_id": 3946619,
      "url": "https://www.google.com",
      "test_name": null,
      "created_date": "2019-10-27T21:26:32.0 ```



This is the datasources from the vss.extension
"dataSources": [
          {
            "name": "CBTAPIReturn",
            "endpointUrl": "{{endpoint.url}}",
            "resultSelector": "jsonpath:$[*].screenshots"

          }

        ]

inputs and bindings from the task

"inputs": [
    {
      "name": "CBTService",
      "type": "connectedService:CBTServiceEndpoint",
      "label": "CBT service/server end point",
      "defaultValue": "",
      "required": true,
      "helpMarkDown": "Select the CBT end point to use. If needed,selecton 'manage', and add a new service endpoint of type 'CBT server connection'"
    },
    {
      "name": "CBT API Response",
      "type": "pickList",
      "label": "CBT API Response",
      "required": true,
      "helpMarkDown": "Select the name combination that you want to use.",
      "properties": {
        "EditableOptions": "True"
      }
    }
  ],
  "dataSourceBindings": [
    {
      "target": "CBT API Response",
      "endpointId": "$(CBTService)",
      "dataSourceName": "CBTAPIReturn"
    ```


4

0 回答 0