I would like to submit SPARQL using curl. Based on what I could piece together from multiple sources, this is what I've tried.
To keep things simple, I am just trying to get the Top-level Subjects based on the query documented at...
*
http://vocab.getty.edu/queries#Top-level_Subjects* Query: select * {?f a gvp:Facet; skos:inScheme aat: ; gvp:prefLabelGVP/xl:literalForm ?l}
* UI Results:
{
"head" :
{
"vars" : [ "f", "l" ]
},
"results" :
{
"bindings" :
[
{
"f" :
{
"type" : "uri",
"value" : "http://vocab.getty.edu/aat/300264086"
},
"l" :
{
"xml:lang" : "en",
"type" : "literal",
"value" : "Associated Concepts Facet"
}
},
{
"f" :
{
"type" : "uri",
"value" : "http://vocab.getty.edu/aat/300264088"
},
"l" :
{
"xml:lang" : "en",
"type" : "literal",
"value" : "Styles and Periods Facet"
}
}
...
]
}
}
Then I try this via curl...
curl -L -D - -H "Accept: application/json" "http://vocab.getty.edu/sparql?query=select * {?f a gvp:Facet; skos:inScheme aat: ; gvp:prefLabelGVP/xl:literalForm ?l}"
Which returns...
HTTP/1.1 505 HTTP Version Not Supported
Server: Apache-Coyote/1.1
Date: Fri, 21 Jul 2017 15:03:34 GMT
Connection: close
Set-Cookie: BIGipServerForest=587573440.45165.0000; path=/; Httponly
Ultimately, I want to pass a query that searches for a string match on prefLabel and returns triples (or other linked data serialization) of matches. I wanted to start simple and see that I am getting connected and getting results. Then I can tweak the sparql to return what I really want.
Any suggestions about how to get a connection via curl would be appreciated.