REST endpoints not updating in Smart App

I have a smarttapp, with these REST endpoints:

mappings {
	path("/deviceid/:deviceId/command/:command") {
        action: [
            GET: "invokeCommand"
        ]
    }
    path("/devices") {
        action: [
            GET: "listDevices"
        ]
    }
}

They work. I added one mapping and saved the code, but it does not work:

mappings {
	path("/deviceid/:deviceId/command/:command") {
        action: [
            GET: "invokeCommand"
        ]
    }
    path("/devices") {
        action: [
            GET: "listDevices"
        ]
    }
    path("/deviceid/:deviceId/command/:command/value/:value") {
        action: [
            GET: "invokeCommand"
        ]
    }
}

There are no errors, the only thing I get back when I run curl command is html with this:

We're sorry, but that page doesn't exist.

Like I said the other ones work…

Any ideas?

I found the issue on this page: http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/smartapp.html#web-services-mapping-endpoints

There is no limit to the number of endpoints a SmartApp exposes, but the path level is restricted to four levels deep (i.e., /level1/level2/level3/level4).

2 Likes