Creates a Smart Link in the content tree in the space.
Permissions required: Permission to view the corresponding space. Permission to create a Smart Link in the content tree in the space.
write:embed:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
Returned if the Smart Link was successfully created in the content tree.
allOf [SmartLinkSingle, object]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"spaceId": "<string>",
"title": "<string>",
"parentId": "<string>",
"embedUrl": "<string>"
}`;
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/embeds`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"id": "<string>",
"type": "<string>",
"status": "current",
"title": "<string>",
"parentId": "<string>",
"parentType": "page",
"position": 61,
"authorId": "<string>",
"ownerId": "<string>",
"createdAt": "<string>",
"embedUrl": "<string>",
"version": {
"createdAt": "<string>",
"message": "<string>",
"number": 19,
"minorEdit": true,
"authorId": "<string>"
},
"_links": {
"base": "<string>"
}
}
Returns a specific Smart Link in the content tree.
Permissions required: Permission to view the Smart Link in the content tree and its corresponding space.
read:embed:confluence
Connect app scope required: READ
integer
Requiredboolean
boolean
boolean
boolean
Returned if the requested Smart Link in the content tree is returned.
allOf [SmartLinkSingle, object]
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/embeds/{id}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"id": "<string>",
"type": "<string>",
"status": "current",
"title": "<string>",
"parentId": "<string>",
"parentType": "page",
"position": 61,
"authorId": "<string>",
"ownerId": "<string>",
"createdAt": "<string>",
"embedUrl": "<string>",
"version": {
"createdAt": "<string>",
"message": "<string>",
"number": 19,
"minorEdit": true,
"authorId": "<string>"
},
"_links": {
"base": "<string>"
}
}
Delete a Smart Link in the content tree by id.
Deleting a Smart Link in the content tree moves the Smart Link to the trash, where it can be restored later
Permissions required: Permission to view the Smart Link in the content tree and its corresponding space. Permission to delete Smart Links in the content tree in the space.
delete:embed:confluence
Connect app scope required: DELETE
integer
RequiredReturned if the Smart Link in the content tree was successfully deleted.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/embeds/{id}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: