PATHS queries via HTTP API?

Is it possible to execute PATHS queries through the HTTP API? The documentation describes PATHS as an a Stardog “extension” of SPARQL, but from my few tests I haven’t been able to.

Thanks,
Pierluigi

Hi Pierluigi,

My apologies for the late response.

Path queries can be executed through the HTTP API, in fact, that’s how Stardog clients (Studio and CLI) execute them. The problem, however, is that there’s currently no standardized format for serializing path result sets in HTTP responses.

Stardog server sends back paths as tuples using the same format as for SELECT queries. Each binding set represents a single edge in a path. Empty tuples are used as path separators. The format is basically what you’d see in Studio or CLI in the tabular output.

Another caveat is that variable names for the results are sent back in the following format: [{variables occurring in the start pattern}, start variable, edge variables, end variable, {variables occurring in the end pattern}]. The start and end variables also occur in the start and end pattern so they’re repeated.

Everything else, e.g. the endpoint, etc., should be the same as for SELECT queries.

Cheers,
Pavel

Oh yes, it works (obviously I was doing something wrong). I see the results, and the empty tuples. I am not having luck with any other format besides sparql-results+json and …+xml, though. Is there any more or less tabular format that one can get as Accept: value on queries?

Thanks!

Sorry, I don’t quite understand, in which format do you want results back? These things should be exactly as for SELECT queries.

Cheers,
Pavel

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