Ping Submission
Ping Sindice to make sure that your RDF data is promptly indexed (or refreshed) within our services. To do this use the following APIs:
RPC API
The Sindice RPC ping API is developed according to the specification of the Pingback mechanism. The RPC method name has been adjusted to fit the majority of software that have pingback support (such as blogging engines).
The XML-RPC endpoint: http://sindice.com/xmlrpc/api
Method name: weblogUpdates.ping
Parameters:
- name of the resource - String, this can be left empty but the parameter should not be omitted.
- URL of the resource - String
Note: parameters should be sent in the exact order listed above
Response parameters:
- flerror - Boolean, value 1 indicates that an error occured
- message - String, contains the error message if flerror is 1, otherwise it will contain the string "Thanks for pinging Sindice.com"
Example of an XML-RPC Request message:
<?xml version="1.0"?>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param>
<value>Some resource title</value>
</param>
<param>
<value>http://www.w3.org/People/Berners-Lee/card.rdf</value>
</param>
</params>
</methodCall>
Example of a XML-RPC Response message:
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>flerror</name>
<value>
<boolean>0</boolean>
</value>
</member>
<member>
<name>message</name>
<value>Thanks for pinging Sindice.com</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
This Java code will do this for you:
/** * Performs a Ping to Sindice with a list of URLs. * @param urls */ public void doPing(List<URL> urls) { if (urls.size()<=0) return; StringBuffer buf = new StringBuffer(); for (URL url : urls) { buf.append(url+"\n"); } XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); try { config.setServerURL(new URL("http://sindice.com/xmlrpc/api")); XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); Object[] params = new Object[]{"(Optional)The name of your application here", buf.toString()}; Object result = client.execute("weblogUpdates.ping", params); System.out.println("Sent: "+buf.toString()+"Result: "+result); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (XmlRpcException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
REST API (Deprecated)
The REST API for ping submission can be reached through:
http://sindice.com/general/parse?url=...
Parameters:
- url
The URL address of RDF file you would link to submit to be indexed by Sindice.
Query example: http://sindice.com/general/parse?url=http%3A%2F%2Fwww.w3.org%2FPeople%2FBerners-Lee%2Fcard.rdf
Important note:
Due to potential abuse, the REST API for ping submitting is deprecated and might be deactivated in the future.
Api Documentation
- Query Languages
- API Documentation
- Ping Submission
- SIOC API
- RDFizer API
- Microformat Support
