Converts a list of content ids into their associated content types. This is useful for users migrating from v1 to v2
who may have stored just content ids without their associated type. This will return types as they should be used in v2.
Notably, this will return inline-comment
for inline comments and footer-comment
for footer comments, which is distinct from them
both being represented by comment
in v1.
Permissions required:
Permission to view the requested content. Any content that the user does not have permission to view or does not exist will map to null
in the response.
read:content.metadata:confluence
Connect app scope required: NONE
array<anyOf [string, number]>
RequiredReturned if the requested content ids are successfully converted to their content types
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"contentIds": [
"<string>"
]
}`;
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/content/convert-ids-to-types`, {
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
{
"results": {}
}
Rate this page: