- no URL request-specific description available; see the Adlib.Data tab for all information -
Delete a record. show
If the record to be deleted doesn't exist, you'll receive an Adlib.Database.DatabaseRecordNotFoundException.
http://test2.adlibsoft.com/api/wwwopac.ashx?database=externalobjects&command=deleterecord&priref=10000049
command=deleterecord&<parameter>=<value>&...
output
can be either json
or xml
(xml
is the default, so you don't need to specify that explicitly). However, the output format produced by jQuery applications is always JSON, so you don't need to specify the output type there either.output=json
, because the output format is JSON by default.
To delete a record via de Axiell WebAPI, you have to know the record number (priref) of the record you want to delete. This priref can be obtained by searching for the desired record first, in any of the different ways described elsewhere in this documentation. We recommend using the POST method in software of your own making to delete records, but deleting a record using the GET method through a URL is possible too.
Write a new record with just a title in database 'externalobjects' show
// Create a connection to the wwwopac.ashx conn = new AdlibConnection(url); // Create a new adlib record record = new AdlibRecord(conn, "externalobjects"); // Set the priref field record["priref"] = "0"; // Set the title field record["title"] = "A new title" // Insert the record in the database record.Insert();
Delete the record you created in the previous example show
// Create a connection to the wwwopac.ashx conn = new AdlibConnection(url); // Create a new adlib record record = new AdlibRecord(conn, "externalobjects"); record.Search(10000001); if (record != null) { // Delete the record record.Delete(); }
- no jQuery-specific description available yet; see the Adlib.Data tab for all information -
Write a new record with just a title in database 'externalobjects' show
var url = "http://test2.adlibsoft.com/api/wwwopac.ashx"; var xmldata = '<adlibXML><recordList><record>' + '<priref>0</priref><title>test title</title>' + '</record></recordList></adlibXML>'; $().adlibdata(url, { //arguments database: "externalobjects", command: "insertrecord", data: xmldata, xmltype: "grouped" }, function (adlibJSON) { alert(adlibJSON.diagnostic.hits); });
Delete the record you created in the previous example show
var url = "http://test2.adlibsoft.com/api/wwwopac.ashx"; $().adlibdata(url, { //arguments database: "externalobjects", command: "deleterecord", priref: 10000001 }, function (adlibJSON) { alert(adlibJSON.diagnostic.hits); });