I am writing a node client to update my agent from json files.
I can upload entities fine, but when I try to add an intent, I get a 200 OK response but nothing appears to happen.
Here is the response
{
"id": "3cde67bc-054f-4538-8552-54d2e008bcdf",
"status": {
"code": 200,
"errorType": "success"
}
}
Even when I try the curl demo
curl -k -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN" --data "{'name':'change appliance state 1','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'bug report','alias':'report','meta':'@report'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\$appliance'},{'dataType':'@state','name':'state','value':'\$state'}],'speech':'Turning the \$appliance \$state\!'}],'priority':500000}" "https://api.api.ai/v1/intents?v=20150910"
replacing YOUR_DEVELOPER_ACCESS_TOKEN with my actual developer access token nothing happens.
Same with node's request module.
I am writing a node client to update my agent from json files.
I can upload entities fine, but when I try to add an intent, I get a 200 OK response but nothing appears to happen.
Here is the response { "id": "3cde67bc-054f-4538-8552-54d2e008bcdf", "status": { "code": 200, "errorType": "success" } }
Even when I try the curl demo
curl -k -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer YOUR_DEVELOPER_ACCESS_TOKEN" --data "{'name':'change appliance state 1','auto':true,'contexts':[],'templates':['turn @state:state the @appliance:appliance ','switch the @appliance:appliance @state:state '],'userSays':[{'data':[{'text':'turn '},{'text':'on','alias':'state','meta':'@state'},{'text':' the '},{'text':'bug report','alias':'report','meta':'@report'}],'isTemplate':false,'count':0},{'data':[{'text':'switch the '},{'text':'heating','alias':'appliance','meta':'@appliance'},{'text':' '},{'text':'off','alias':'state','meta':'@state'}],'isTemplate':false,'count':0}],'responses':[{'resetContexts':false,'action':'set-appliance','affectedContexts':[{'name':'house','lifespan':10}],'parameters':[{'dataType':'@appliance','name':'appliance','value':'\$appliance'},{'dataType':'@state','name':'state','value':'\$state'}],'speech':'Turning the \$appliance \$state\!'}],'priority':500000}" "https://api.api.ai/v1/intents?v=20150910"
replacing YOUR_DEVELOPER_ACCESS_TOKEN with my actual developer access token nothing happens. Same with node's request module.
node v.8.4.0, windows 7