GET /wiki/rest/api/search
Searches for content using the Confluence Query Language (CQL).
Note that CQL input queries submitted through the /wiki/rest/api/search
endpoint no longer support user-specific fields like user
, user.fullname
, user.accountid
, and user.userkey
.
See this deprecation notice for more details.
Example initial call:
/wiki/rest/api/search?cql=type=page&limit=25
Example response:
{
"results": [
{ ... },
{ ... },
...
{ ... }
],
"limit": 25,
"size": 25,
...
"_links": {
"base": "<url>",
"context": "<url>",
"next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",
"self": "<url>"
}
}
When additional results are available, returns next
and prev
URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use limit
to specify the number of results returned in each call.
Example subsequent call (taken from example response):
/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
The response to this will have a prev
URL similar to the next
in the example response.
If the expand query parameter is used with the body.export_view
and/or body.styled_view
properties, then the query limit parameter will be restricted to a maximum value of 25.
Permissions required: Permission to view the entities. Note, only entities that the user has permission to view will be returned.
Servers
- https://your-domain.atlassian.net
Query parameters
Name | Type | Required | Description |
---|---|---|---|
excludeCurrentSpaces |
Boolean | No |
Whether to exclude current spaces and only show archived spaces. Default value: false |
sitePermissionTypeFilter |
String | No |
Filters users by permission type. Use Possible values:
Default value: "none" |
expand[] |
Array | No | |
excerpt |
String | No |
The excerpt strategy to apply to the result Possible values:
Default value: "highlight" |
cql |
String | Yes |
The CQL query to be used for the search. See Advanced Searching using CQL for instructions on how to build a CQL query. |
limit |
Integer | No |
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. Default value: 25 |
_ |
Integer | No | |
cqlcontext |
String | No |
The space, content, and content status to execute the search against.
Specify these values in an object. For example,
|
next |
Boolean | No |
Default value: false |
prev |
Boolean | No |
Default value: false |
cursor |
String | No |
Pointer to a set of search results, returned as part of the |
start |
Integer | No |
The start point of the collection to return Default value: 0 |
includeArchivedSpaces |
Boolean | No |
Whether to include content from archived spaces in the results. Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.