简体   繁体   English

问 cli SMAPI node.js 接口失败

[英]ask cli SMAPI node.js interace is failing

I am trying to get some metrics via the nodejs module for the ask-cli.我正在尝试通过 ask-cli 的 nodejs 模块获取一些指标。 here is my command and error:这是我的命令和错误:

ask smapi get-skill-metrics --skill-id amzn1.ask.skill.xxxxx --start-time 2020-10-14T12:45:00Z --end-time 2020-10-19T12:45:00Z --period PT1H --metric uniqueCustomers --stage live --skill-type custom --locale en-US > metrics.json 

[Error]: { "name": "AskSdkModelRuntime.DefaultApiClient Error" } 

Ah yes, my VPN was blocking the request.是的,我的 VPN 阻止了请求。 It works now and here is an example data set.它现在可以工作了,这里是一个示例数据集。 now to figure out what it means:现在来弄清楚它的意思:

Operation: getSkillMetricsV1
Payload:
{
  "skillId": "amzn1.ask.skill.xxxx-xx-xx-xx-xxxx",
  "startTime": "2020-10-14T12:45:00Z",
  "endTime": "2020-10-19T12:45:00Z",
  "period": "PT1H",
  "metric": "uniqueCustomers",
  "stage": "live",
  "skillType": "custom",
  "intent": null,
  "locale": "en-US",
  "maxResults": null,
  "nextToken": null
}

Response:
{
  "body": {
    "metric": "uniqueCustomers",
    "timestamps": [
      "2020-10-14T12:00:00Z",
      "2020-10-14T13:00:00Z",
      "2020-10-19T12:00:00Z"
    ],
    "values": [
      36,
      120,
      79,
      46 ]
  },
  "headers": [  ],

  "statusCode": 200
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM