From the Search app I do the following search:
| metadata type=hosts
This correctly yields a table of the reporting hosts. I am using SplunkNet to provide remote search capability. This seems to work fine for a normal search but not for the metadata search defined above.
Looking at the rendered search in each case the REST call uses POST method with the following payload: search=%7c+metadata+type%3dhosts&enable_lookup=False
This looks fairly reasonable but returns no events (expected as this is just metadata) but more importantly no results. In fact the response.CanRead flag is set to false, which would tend to suggest there are no records available.
Yes, the metadata search can be executed via REST. I can't tell the specifics of the SplunkNet API, but the search string should not start with a leading |. I've just successfully tested it with the following POST data:
Here is a simple example how this is done using curl: