---+Using Digest Authentication to Insert Triples
Insert triples using Digest Authentication against the Virtuoso /sparql-auth endpoint.
To simplify data management by using HTTP digest authentication.
Here is a sample example showcasing how to insert triples in Virtuoso Quad store using Digest Authentication in a simple HTML 5 form with embedded AJAX:
This example demonstrates how Virtuoso user can insert triples into the Virtuoso Quad Store using Digest authentication against the Virtuoso "/sparql-auth" endpoint. The implementation is done on the base of simple html form using HTML 5 and AJAX:
1 To be able to perform updates to the Quad Store, a Virtuoso user account should have specific settings done:
1 Go to http://host:port/conductor
1 Enter admin credentials
1 Go to "System Admin" -> "Users"
1 Click "Create New Account". Optionally, you can apply the settings to existing user too.
1 In the presented form:
* enter "Account name", for ex. demo
* enter "Password",
* change "User type" to "SQL/ODBC and WebDAV",
* for "DAV Home Path" hatch the "create" check-box,
* change "Quata" to 5,
* Select from "Account Roles" the role "SPARQL_UPDATE" and move to "Selected" list
1 Click "Save"
1 The new user "demo" should be created and displayed in the users list:
1 Now when we have an user that can update the Quad Store data, we will demonstrate how this user will insert a triple. Place the following demo.html file at your server, so for ex. it to be accessible from http://host:port/mydemo:
1 The presented form offers 4 fields -- one for graph URI, respectively one for subject, object and predicate values. Each of these fields has predefined values that can be changed to other preferable. Enter for the created user from above its credentials and click "Insert".
1 On a successful insert, a message as below will be presented:
1 In case some of the fields graphuri, subject, object or predicate are invalid, an error handler message will be presented:
1 In case the user has provided wrong credentials or has no rights to update the Quad Store, a message as per bellow will be presented:
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[VOSSparqlProtocol][Virtuoso SPARQL Query Service]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]