vladox
(Vladimir Knobel)
October 7, 2019, 6:38am
1
Hi
I’m analysing my log in GET [/smartlock/log]
But comparing the action codes with the ones in documentation I’m surprised to see one I can’t reconcile with the documentation: https://developer.nuki.io/page/nuki-web-api-120/3#heading--smart-lock-action
{
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"smartlockId": xxxxxxxxx,
"deviceType": 0,
"name": "",
"action": 241,
"trigger": 0,
"state": 0,
"autoUnlock": false,
"date": "2019-10-06T14:28:01.000Z"
},
Where can I find a complete list with all the action codes?
Stephan
(Stephan Lendl)
October 7, 2019, 12:51pm
2
You can find the values at the swagger model for the /smartlock/log endpoint:
https://api.nuki.io/#!/SmartlockLog/get
Just switch to Model view (from the default Example Value view)
You’ll see that it is
241 .. door closed
vladox
(Vladimir Knobel)
October 7, 2019, 1:12pm
3
Amazing, thanks for pointing me in the right direction!
Does this means that the docu in https://developer.nuki.io/page/nuki-web-api-120/3#heading--smart-lock-action is not up to date?
Stephan
(Stephan Lendl)
October 7, 2019, 1:28pm
4
No. Here only lock actions are listed. This is not to be confused with the action which triggered a log entry. The name similarity can be confusing, yes.
And in general I agree, that we need to update the documentation to maybe contain more information which is currently only available in the Swagger models. (Though you will always find them there directly at the endpoint which you need.)
vladox
(Vladimir Knobel)
October 7, 2019, 1:50pm
5
Awesome, I get it thanks for the clarification!