I am trying to search a CQL query and fetch all bodies of pages in search result using REST API with following code:
requests.get(f'{base_url}/wiki/rest/api/search',
auth=...,
params={
'cql': cql,
"expand": "body.view"
},
headers={
"Accept": "application/json",
})
However, body in result pages are empty strings.
Did I miss anything?
Hello @Ran Bi ,
As search results are displayed as 'content' elements, you should add it for expand parameter. E.g.:
"expand": "content.body.view"
Wow it works. Thanks, Andrii!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.