Using the REST API, can you post to a topic without needing a double // ?

The problem has been seen in two situations:
1. With an API gateway that does not like the double // in the URI.
2. In the NGINX proxy. NGINX modified “//” to “/”

For example fails
“code”: “io.vantiq.resource.not.found”,
“message”: “The requested instance of the topics resource could not be found.”,
“params”: [“topics”]
] succeeds

Posted: May 15, 2020 at 10:20 pm
Replies: 1
May 15, 2020
Posted by Ken

There is no way to avoid the “//” when posting to a topic in the VANTIQ REST API.  The leading slash is part of the “resource id” for the topic – without it VANTIQ will not route the request properly (hence the VANTIQ equivalent of a 404).

What you can do is create a procedure to do the publish and invoke that through the REST API.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy