This module deletes an external link from the library.
Both the username and password should be provided using the default credentials of an API Key. See "Supplying Default Credentials" in URLs, Keys and Authentication.
Properties
Name | Type | Description |
---|---|---|
LinkID | Integer, required | The ID of the external link to delete |
CSUserName | String, required | The username of the iCM user deleting the link - use an API Key |
CSUserPassword | String, required | An MD5 hash of the password of the iCM user - use an API Key |
VersionNotes | String, optional | Adds notes to the version history. There's a maximum length of 256 characters |
Example
function(params, credentials) {
let deleteLink = this.callWorkerMethod("icmapi", "iCM_obj_linkDelete", {
"attributes": {
"LinkID": 123,
"VersionNotes": "Deleting this link"
}
}, {
"options": {
"apiKey": "<Your API Key>"
}
});
return deleteLink;
}
Returns
If the request was successful the result data object will contain an object called CONTENT which includes the link ID, and another called STATE indicating the link was deleted successfully.
{
"id": 119,
"result": {
"CONTENT": {
"LinkID": 3609
},
"STATE": {
"Status": "ACCESS GRANTED"
}
},
"jsonrpc": "2.0"
}