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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.