Forge Create Activity 给出了错误的请求

Forge Create Activity Gives Bad Request

在 Autodesk Forge 上使用 DA for Revit。我在本地创建和测试了我的代码,并试图将其部署到测试应用程序,但遇到了一些障碍,并且不确定我哪里出错了。我已经创建了 Forge 应用程序,创建并上传了捆绑包,为捆绑包创建了一个别名,但现在我正在尝试创建一个 activity,它返回了一个错误的请求,但不确定为什么。

我正在使用 Insomnia 进行测试,所以这是我的请求的时间线读数(删除了令牌等):

* Preparing request to https://developer.api.autodesk.com/da/us-east/v3/activities
* Using libcurl/7.57.0-DEV OpenSSL/1.0.2o zlib/1.2.11 libssh2/1.7.0_DEV
* Current time is 2020-05-05T18:30:00.962Z
* Disable timeout
* Enable automatic URL encoding
* Enable SSL validation
* Enable cookie sending with jar of 3 cookies
* Connection 31 seems to be dead!
* Closing connection 31
*   Trying 52.21.0.245...
* TCP_NODELAY set
* Connected to developer.api.autodesk.com (52.21.0.245) port 443 (#32)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: **removed**
*   CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: businessCategory=Private Organization; jurisdictionC=US; jurisdictionST=Delaware; serialNumber=2401504; C=US; ST=California; L=San Rafael; O=Autodesk, Inc.; OU=MCP-ASRD-CP; CN=developer.api.autodesk.com
*  start date: Feb 24 00:00:00 2020 GMT
*  expire date: Mar 22 12:00:00 2021 GMT
*  subjectAltName: host "developer.api.autodesk.com" matched cert's "developer.api.autodesk.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*  SSL certificate verify ok.

> POST /da/us-east/v3/activities HTTP/1.1
> Host: developer.api.autodesk.com
> User-Agent: insomnia/7.1.1
> Cookie: PF=**removed**
> Content-Type: application/json
> Authorization: Bearer **removed**
> Accept: */*
> Content-Length: 592

| {
|   "id":"RunChecks",
|   "commandLine":["$(engine.path)\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ModelChecker].path)"],
|   "paremeters": {
|       "rvtFile": {
|           "zip": false,
|           "ondemand": false,
|           "verb": "get",
|           "description": "Input Revit Model",
|           "required":true,
|           "localName": "$(rvtFile)"
|       },
|       "result": {
|           "zip": false,
|           "ondemand": false,
|           "verb": "put",
|           "description": "Results",
|           "required":true,
|           "localName": "Report.xml"
|       }
|   },
|   "engine": "Autodesk.Revit+2021",
|   "appbundles": ["BIT.ModelChecker+dev"],
|   "description":"Runs model checks"
| }

* upload completely sent off: 592 out of 592 bytes

< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=utf-8
< Date: Tue, 05 May 2020 18:30:01 GMT
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< Via: 1.1 824fe21e467658628899bdd8725649ee.cloudfront.net (CloudFront)
< x-amz-apigw-id: MEiKjFSroAMF20A=
< X-Amz-Cf-Id: mwq0J1Q567VwiT7nGfKuSPdrctm5Cv-AxbVpV6KhA6ZbZiTM-mAkCw==
< X-Amz-Cf-Pop: IAD89-C1
< x-amzn-Remapped-Content-Length: 90
< x-amzn-RequestId: 761a452d-2bde-4e8f-987c-fb9d4f25ce7b
< X-Amzn-Trace-Id: Root=1-5eb1b0a9-b01c07c62357bb2604081bf6
< X-Cache: Error from cloudfront
< Content-Length: 90
< Connection: keep-alive


* Received 90 B chunk
* Connection #32 to host developer.api.autodesk.com left intact

响应是 400,正文如下:

{
  "commandLine": [
    "Value cannot be null. (Parameter 'source')\n (Parameter 'commandLine')"
  ]
}

我从示例中提取了这个 here 并修改为使用我自己的别名等

我看到它说 sourcecommandLine 不能为 null 但 source 在我能找到的文档中的任何地方都没有提到并且不在示例中所以我不确定它是什么 commandLine 就像示例一样设置...

我哪里错了?

您的 activity 定义有误。 字段 parameters 被拼错为 paremeters

(我们可以改进我们的错误报告)