0,0 → 1,55 |
<!DOCTYPE HTML> |
<html> |
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
|
<script> |
|
// This is an example script that shows how you can insert an OID |
// (in this example "2.999.123") using an authenticated AJAX query ("RPC"-like) |
|
function testInsertOID() { |
$.ajax({ |
url:"<url>", |
method:"POST", |
data:{ |
plugin:"1.3.6.1.4.1.37476.2.5.2.4.1.0", // OID of plugin "publicPages/000_objects" |
action:"Insert", |
parent:"oid:2.999", |
id:123, |
ra_email:"test@example.com", |
comment:null, |
asn1ids:"aaa,bbb,ccc", |
iris:null, |
confidential:false, |
weid:null, |
OIDPLUS_AUTH_JWT:"<token>" |
}, |
error:function(jqXHR, textStatus, errorThrown) { |
alert("Error: " + errorThrown); |
}, |
success:function(data) { |
if ("error" in data) { |
alert("Error: " + data.error); |
} else if (data.status == 0/*OK*/) { |
alert("Insert OK"); |
} else if (data.status == 1/*RaNotExisting*/) { |
alert("Insert OK"); |
} else if (data.status == 2/*RaNotExistingNoInvitation*/) { |
alert("Insert OK"); |
} else { |
alert("Error: " + data); |
} |
} |
}); |
} |
|
</script> |
|
<body> |
|
<input type="button" onclick="testInsertOID()" value="Insert 2.999.123 to database"> |
|
</body> |
|
</html> |
Property changes: |
Added: svn:mime-type |
+text/html |
\ No newline at end of property |