Deleting schedules

With the new SmartApp Node.js SDK Version 2.0, how do you delete scheduled events? I previously called context.api.schedules.delete() but now get an error message that this function/method doesn’t exist. I’ve found other APIs that have been removed (e.g., context.api.devices.getCapabilityStatus) but have been able to develop workarounds for those.

It would be AWESOME if there was documentation of the available APIs and their syntax. I’ve never been able to find it. I’ve developed lots of SmartApps by looking at examples and a lot of trial and error absent that documentation :frowning:

As the NodeJS SmartApp SDK is based on the Core SDK, you can see the endpoints included and the functions you can use in each of them here:

Can you share the error log you receive using context.api.schedules.delete(), please?

Also, in the SDKs section of the documentation, you can find more info about each of them. Our team keeps improving the developer docs, so, all suggestions are always welcome!

Thanks for the prompt reply. It must have either been a transient issue or user error. I added the context.api.schedules.delete() back into my code and it worked as designed. I then re-tried using the context.api.devices.getCapabilityStatus method and it worked as well. I rewrote the functions using the getStatus method instead of getCapabilityStatus method which I find much cleaner so it was a useful (albeit frustrating) exercise.

I only keep Cloudwatch logs for a day so no longer have the original error messages :frowning:

I opened the SDKs section of the documentation. I had previously been looking at the NodeJS content but found a treasure trove of useful information in the Core SDK which will be incredibly helpful. Thanks!!!

I’m glad it’s working now, don’t worry about the error logs.
I’ll be pending in case you experience the issue again or other Community members.
Remember to mark which post solved your question so others can take reference from it.
Have a nice day!