Dear all

I'm trying to do SPARQL Update queries, using (curl and) http requests.

Some days ago, Jeen gave this advice as regards to SELECT queries:

"" However, there is an (undocumented) feature for this in Sesame/OWLIM. Use at your own risk: http://localhost:8080/openrdf-sesame/repositories/example?query=SELECT+...&Accept=application/sparql-results+xml ""

I tried to use this to perform iNSERT, so I did:

http://localhost:8080/openrdf-sesame/repositories/example?query=INSERT+DATA+...&Accept=.... <<

I got the following error message:

MALFORMED QUERY: Encountered " "insert" "INSERT "" at line 1, column 1.Was expecting one of: "base" ... "prefix" ... "select" ... "construct" ... "describe" ... "ask" ...
<<

Are there ways to do INSERTS via http requests?

Best

Tope

asked 16 Apr '13, 12:17

Tope's gravatar image

Tope
1111
accept rate: 0%


INSERT DATA is part of the Update language, not a query, so there are two problems: 1) That's the wrong endpoint, you need to send it to .../repositories/example/statements 2) If you want to form encode (-d), the parameter is "update=" not "query="

link

answered 16 Apr '13, 15:25

BarryNorton's gravatar image

BarryNorton
663
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1

Asked: 16 Apr '13, 12:17

Seen: 5,157 times

Last updated: 27 Jun, 06:50

Related questions

powered by BitNami OSQA