Delete Link's Document

DELETE /node/api/links/:id/docs/:doc_id

Deletes a link's document with the specified ID.

Request parameters

Path parameters

Parameter
Type
Description
doc_id
string
required
The ID of a document to be deleted.
id
string
required
The ID of a link whose document should be deleted.

Response description

The response body is empty.

Request examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
link_id=<...>
5
document_id=<...>
6
url=https://$saymon_hostname/node/api/links/$link_id/docs/$document_id
7
8
curl -X DELETE $url -u $login:$password
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let linkId = <...>
5
let documentId = <...>
6
let path = "/node/api/links/" + linkId + "/docs/" + documentId;
7
let auth = "Basic " + btoa(login + ":" + password);
8
9
let headers = new Headers();
10
headers.append("Authorization", auth);
11
12
let requestOptions = {
13
method: "GET",
14
headers: headers
15
};
16
17
fetch(saymonHostname + path, requestOptions)
18
.then(response => response.text())
19
.then(result => console.log(result))
20
.catch(error => console.log("error", error));
Copied!
1
const http = require("http");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let linkId = <...>
7
let documentId = <...>
8
let path = "/node/api/links/" + linkId + "/docs/" + documentId;
9
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
10
11
let options = {
12
"method": "DELETE",
13
"hostname": saymonHostname,
14
"headers": {
15
"Authorization": auth
16
},
17
"path": path
18
};
19
20
let req = http.request(options, function (res) {
21
let chunks = [];
22
23
res.on("data", function (chunk) {
24
chunks.push(chunk);
25
});
26
27
res.on("end", function (chunk) {
28
let body = Buffer.concat(chunks);
29
console.log(body.toString());
30
});
31
32
res.on("error", function (error) {
33
console.error(error);
34
});
35
});
36
37
req.end();
Copied!
1
import requests
2
3
login = <...>
4
password = <...>
5
saymon_hostname = <...>
6
link_id = <...>
7
document_id = <...>
8
url = "https://" + saymon_hostname + "/node/api/links/" + \
9
link_id + "/docs/" + document_id
10
11
response = requests.request("DELETE", url, auth=(login, password))
12
print(response.text)
Copied!
Last modified 11mo ago