REST APi for /sitemaps/{sitemap-name} is returning 404

Dear all,

I have created some sitemaps and am trying to access one of that sitemap with its name
When i make a call with /sitemaps , i can get all sitemaps list.

But when i make call to a specific sitemap GET: /sitemaps/{sitemap-name} , I am getting 404.

does anyone know what could be the issue?

Thanks in Advance

Welcome to the forum!

When you make the call to get the full list of sitemaps, check the name of the sitemap you are looking for carefully. The actual name of the sitemap stored in the jasondb is NOT the same as the UID you have given that sitemap in the UI editor, it has had “uicomponents_” added as a prefix. In the call to the api you have to use the complete prefix+UID to get the sitemap.

For example, I have the following sitemap:

The api call using the sitemap ID

http://localhost:9080/rest/sitemaps/Sitemap_Russell?jsoncallback=callback

returns 404, but using the completed name

http://localhost:9080/rest/sitemaps/uicomponents_Sitemap_Russell?jsoncallback=callback

returns the correct payload.

1 Like

Thanks @JustinG for your reply.

I have one more query, Can we create multiple sitemaps for multiple devices?, where each of that will have its own .items, .things ? is it possible ? can you provide any link where i can get this information.

Thanks in Advance

There is no (reasonable*) way to assign specific sitemaps to specific devices. I have no experience with the iOS app, but with the android app at least each device can have a different sitemap registered as the default that will be shown when the app loads, but all the other sitemaps will also be available.

*With the remote openHab binding available in OH3, it would be possible to have different unique OH instances each connected to only particular items in the “main” OH instance, and each with a different defined sitemap. Then each device could be connected to only one of those instances and therefore have access to a unique sitemap and no others. This, however, would be a lot of work for no real benefit at all.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.