Hi,
I’m using forge UI and I’m getting stuck on a simple CQL query.
It does not seem to filter by spacekey. What am I missing?
const myLabels = ["typea", "typeb", "typec"];
async function getPages(label) {
const cqlSearch = `cqlcontext={"spaceKey":"${context.spaceKey}"}&cql=label=${label}&limit=100`;
const response = await api
.asApp()
.requestConfluence(`/wiki/rest/api/content/search?${cqlSearch}`, {
headers: {
Accept: "application/json",
},
});
Thanks
Matteo