我目前正在关注Create Issues教程。
我走到了最后一步,当我实际发布问题时,教程说我应该得到响应,但是我没有,命令行只是运行并等待下一条命令,没有响应。
隐藏的凭据 这是用于获取访问令牌的代码:
curl -v "https://developer.api.autodesk.com/authentication/v1/authenticate" -X "POST" -H "Content-Type:application/x-www-form-urlencoded" -d "client_id=**********&client_secret=*********&grant_type=client_credentials&scope=data:read data:write"
以下是获取HUB的代码:
curl -X GET -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJjbGllbnRfaWQiOiJJTzY5cVJGYk5kNGlVcWlnS3FnR2xzREdzSk1zQVNBYyIsImV4cCI6MTU0MTA2ODUwNCwic2NvcGUiOlsiZGF0YTpyZWFkIiwiZGF0YTp3cml0ZSJdLCJhdWQiOiJodHRwczovL2F1dG9kZXNrLmNvbS9hdWQvand0ZXhwNjAiLCJqdGkiOiJxb09SZjBoQlVKNllnY2QwdEF2dGxWem9tV3YyN2JxS0ZMSlVRY1g4dmF2dWN1QXlORkhUUjhGVWJpZ2h4a3JLIn0.ELVPmHsKiK6OH9jqGltyjQuPrfOTH26tS7_i9zbz-Ys" https://developer.api.autodesk.com/project/v1/hubs/b.d3fd0d4b-37cf-4975-9dae-f70******/projects?filter%5Battributes.name%5D=AU%20London"
以下是发布问题的代码:
curl "https://developer.api.autodesk.com/issues/v1/containers/c5b56b7e-94e8-461b-a4c0-8a05d26a93d0/issues" -d “{"data":{"type":"issues","attributes":{"title":"Tester","description": "Checkifthistestworks.","starting_version":1,"due_date": "2018-02-01T00:00:00.000Z","location_description": "testing","created_at": "2017-6-31T00:00:00Z","assigned_to": "R9WYLGPNCHST"}}}” -X “POST” -H "Content-Type:application/vnd.api+json" -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJjbGllbnRfaWQiOiJJTzY5cVJGYk5kNGlVcWlnS3FnR2xzREdzSk1zQVNBYyIsImV4cCI6MTU0MTA2ODUwNCwic2NvcGUiOlsiZGF0YTpyZWFkIiwiZGF0YTp3cml0ZSJdLCJhdWQiOiJodHRwczovL2F1dG9kZXNrLmNvbS9hdWQvand0ZXhwNjAiLCJqdGkiOiJxb09SZjBoQlVKNllnY2QwdEF2dGxWem9tV3YyN2JxS0ZMSlVRY1g4dmF2dWN1QXlORkhUUjhGVWJpZ2h4a3JLIn0.ELVPmHsKiK6OH9jqGltyjQuPrfOTH26tS7_i9zbz-Ys"