Atlassian Search API

The Search API from Atlassian — 6 operation(s) for search.

Operations 5

GET /teams/{username}/search/code Atlassian Search For Code In A Team S Repositories #
GET /users/{selected_user}/search/code Atlassian Search For Code In A User S Repositories #
GET /workspaces/{workspace}/search/code Atlassian Search For Code In A Workspace #
GET /wiki/rest/api/search Atlassian Search Content #
GET /wiki/rest/api/search/user Atlassian Search Users #

Documentation

📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-addon/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/connect-modules/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/intro/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-announcement-banner/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-values--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-openapi
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-application-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/
📖
Documentation
https://developer.atlassian.com/server/framework/atlassian-sdk/audit/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-settings/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/connect-api-migration/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/data-security-policy-developer-guide/
📖
Documentation
https://developer.atlassian.com/platform/forge/events-reference/jira/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-expressions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-field-configurations/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/forge/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-group-and-user-picker/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-links/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-types/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-labels/
📖
Documentation
https://developer.atlassian.com/platform/marketplace/license-api-for-cloud-apps/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-license-metrics/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-notification-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-permission-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-priorities/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-key-and-name-validation/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-resolutions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screens/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-level/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-server-info/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-statuses/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-status-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-ui-modifications--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/
📖
Documentation
https://developer.atlassian.com/server/jira/platform/webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/
📖
Documentation
https://developer.atlassian.com/cloud/admin/organization/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-management/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-provisioning/rest/

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-hook-events-paginated_hook_events-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-pull-requests-a_pullrequest_comment_task-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-repositories-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-snippets-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-teams-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-user-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-workspaces-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-body-async-content-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-states-async-id-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-group-group-array-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-inline-tasks-task-page-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-longtask-long-task-status-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-search-search-page-response-search-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-space-content-state-settings-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-template-blueprint-template-array-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-user-account-id-email-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-admin-domain-page-schema.json

Other Resources

🔗
GraphQL
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/graphql/atlassian-graphql.md
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-hook-events-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-pull-requests-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-repositories-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-snippets-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-teams-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-workspaces-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-audit-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-body-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-states-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-group-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-inline-tasks-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-longtask-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-relation-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-search-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-settings-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-space-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-template-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-admin-context.jsonld

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/atlassian-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

atlassian-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Atlassian Search API
  version: '1.0'
  description: 'Operations tagged Search across 2 of this provider''s published API definitions: bitbucket-openapi-original.yml, confluence-openapi-original.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.bitbucket.org/2.0
- url: //your-domain.atlassian.net
tags:
- name: Search
paths:
  /teams/{username}/search/code:
    get:
      tags:
      - Search
      summary: Atlassian Search For Code In A Team S Repositories
      description: Search for code in the repositories of the specified team.<br><br>Note that searches can match in the file's text (`content_matches`),<br>the path (`path_matches`), or both.<br><br>You can use the same syntax for the search query as in the UI.<br>E.g. to search for "foo" only within the repository "demo",<br>use the query parameter `search_query=foo+repo:demo`.<br><br>Similar to other APIs, you can request more fields using a<br>`fields` query parameter. E.g. to get some more information about<br>the repository of matched files, use the query parameter<br>`search_query=foo&fields=%2Bvalues.file.commit.repository`<br>(the `%2B` is a URL-encoded `+`).<br><br>Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.<br>
      operationId: atlassianSearchteam
      parameters:
      - name: username
        in: path
        description: The account to search in; either the username or the UUID in curly braces
        required: true
        schema:
          type: string
      - name: search_query
        in: query
        description: The search query
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: Which page of the search results to retrieve
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - name: pagelen
        in: query
        description: How many search results to retrieve per page
        required: false
        schema:
          type: integer
          format: int32
          default: 10
      responses:
        '200':
          description: Successful search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/search_result_page'
              examples:
                response:
                  value:
                    size: 1
                    page: 1
                    pagelen: 10
                    query_substituted: false
                    values:
                    - type: code_search_result
                      content_match_count: 2
                      content_matches:
                      - lines:
                        - line: 2
                          segments: []
                        - line: 3
                          segments:
                          - text: 'def '
                          - text: foo
                            match: true
                          - text: '():'
                        - line: 4
                          segments:
                          - text: '    print("snek")'
                        - line: 5
                          segments: []
                      path_matches:
                      - text: src/
                      - text: foo
                        match: true
                      - text: .py
                      file:
                        path: src/foo.py
                        type: commit_file
                        links:
                          self:
                            href: https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py
        '400':
          description: 'If the search request was invalid due to one of the

            following reasons:


            * the specified type of target account doesn''''t match the actual

            account type;


            * malformed pagination properties;


            * missing or malformed search query, in the latter case an error

            key will be returned in `error.data.key` property.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Search is not enabled for the requested team, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: Too many requests, try again later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
    servers:
    - url: https://api.bitbucket.org/2.0
  /users/{selected_user}/search/code:
    get:
      tags:
      - Search
      summary: Atlassian Search For Code In A User S Repositories
      description: Search for code in the repositories of the specified user.<br><br>Note that searches can match in the file's text (`content_matches`),<br>the path (`path_matches`), or both.<br><br>You can use the same syntax for the search query as in the UI.<br>E.g. to search for "foo" only within the repository "demo",<br>use the query parameter `search_query=foo+repo:demo`.<br><br>Similar to other APIs, you can request more fields using a<br>`fields` query parameter. E.g. to get some more information about<br>the repository of matched files, use the query parameter<br>`search_query=foo&fields=%2Bvalues.file.commit.repository`<br>(the `%2B` is a URL-encoded `+`).<br>
      operationId: atlassianSearchaccount
      parameters:
      - name: selected_user
        in: path
        description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
        required: true
        schema:
          type: string
      - name: search_query
        in: query
        description: The search query
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: Which page of the search results to retrieve
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - name: pagelen
        in: query
        description: How many search results to retrieve per page
        required: false
        schema:
          type: integer
          format: int32
          default: 10
      responses:
        '200':
          description: Successful search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/search_result_page'
              examples:
                response:
                  value:
                    size: 1
                    page: 1
                    pagelen: 10
                    query_substituted: false
                    values:
                    - type: code_search_result
                      content_match_count: 2
                      content_matches:
                      - lines:
                        - line: 2
                          segments: []
                        - line: 3
                          segments:
                          - text: 'def '
                          - text: foo
                            match: true
                          - text: '():'
                        - line: 4
                          segments:
                          - text: '    print("snek")'
                        - line: 5
                          segments: []
                      path_matches:
                      - text: src/
                      - text: foo
                        match: true
                      - text: .py
                      file:
                        path: src/foo.py
                        type: commit_file
                        links:
                          self:
                            href: https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py
        '400':
          description: 'If the search request was invalid due to one of the

            following reasons:


            * the specified type of target account doesn''''t match the actual

            account type;


            * malformed pagination properties;


            * missing or malformed search query, in the latter case an error

            key will be returned in `error.data.key` property.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Search is not enabled for the requested user, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: Too many requests, try again later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
    servers:
    - url: https://api.bitbucket.org/2.0
  /workspaces/{workspace}/search/code:
    get:
      tags:
      - Search
      summary: Atlassian Search For Code In A Workspace
      description: Search for code in the repositories of the specified workspace.<br><br>Note that searches can match in the file's text (`content_matches`),<br>the path (`path_matches`), or both.<br><br>You can use the same syntax for the search query as in the UI.<br>E.g. to search for "foo" only within the repository "demo",<br>use the query parameter `search_query=foo+repo:demo`.<br><br>Similar to other APIs, you can request more fields using a<br>`fields` query parameter. E.g. to get some more information about<br>the repository of matched files, use the query parameter<br>`search_query=foo&fields=%2Bvalues.file.commit.repository`<br>(the `%2B` is a URL-encoded `+`).<br><br>Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.<br>
      operationId: atlassianSearchworkspace
      parameters:
      - name: workspace
        in: path
        description: The workspace to search in; either the slug or the UUID in curly braces
        required: true
        schema:
          type: string
      - name: search_query
        in: query
        description: The search query
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: Which page of the search results to retrieve
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - name: pagelen
        in: query
        description: How many search results to retrieve per page
        required: false
        schema:
          type: integer
          format: int32
          default: 10
      responses:
        '200':
          description: Successful search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/search_result_page'
              examples:
                response:
                  value:
                    size: 1
                    page: 1
                    pagelen: 10
                    query_substituted: false
                    values:
                    - type: code_search_result
                      content_match_count: 2
                      content_matches:
                      - lines:
                        - line: 2
                          segments: []
                        - line: 3
                          segments:
                          - text: 'def '
                          - text: foo
                            match: true
                          - text: '():'
                        - line: 4
                          segments:
                          - text: '    print("snek")'
                        - line: 5
                          segments: []
                      path_matches:
                      - text: src/
                      - text: foo
                        match: true
                      - text: .py
                      file:
                        path: src/foo.py
                        type: commit_file
                        links:
                          self:
                            href: https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py
        '400':
          description: 'If the search request was invalid due to one of the

            following reasons:


            * the specified type of target account doesn''''t match the actual

            account type;


            * malformed pagination properties;


            * missing or malformed search query, in the latter case an error

            key will be returned in `error.data.key` property.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Search is not enabled for the requested workspace, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: Too many requests, try again later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:repository:bitbucket
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
    servers:
    - url: https://api.bitbucket.org/2.0
  /wiki/rest/api/search:
    get:
      tags:
      - Search
      summary: Atlassian Search Content
      description: 'Searches for content using the<br>[Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).<br><br>**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`.** <br>See this [deprecation notice](https://developer.atlassian.com/cloud/confluence/deprecation-notice-search-api/) for more details.<br><br>Example initial call:<br>```<br>/wiki/rest/api/search?cql=type=page&limit=25<br>```<br><br>Example response:<br>```<br>{<br>  "results": [<br>    { ... },<br>    { ... },<br>    ...<br>    { ... }<br>  ],<br>  "limit": 25,<br>  "size": 25,<br>  ...<br>  "_links": {<br>    "base": "",<br>    "context": "",<br>    "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",<br>    "self": ""<br>  }<br>}<br>```<br><br>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.<br><br>Example subsequent call (taken from example response):<br>```<br>/wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg<br>```<br>The response to this will have a `prev` URL similar to the `next` in the example response.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to view the entities. Note, only entities that the user has<br>permission to view will be returned.'
      operationId: atlassianSearchbycql
      parameters:
      - name: cql
        in: query
        description: 'The CQL query to be used for the search. See

          [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)

          for instructions on how to build a CQL query.'
        required: true
        schema:
          type: string
      - name: cqlcontext
        in: query
        description: 'The space, content, and content status to execute the search

          against.


          - `spaceKey` Key of the space to search against. Optional.

          - `contentId` ID of the content to search against. Optional. Must be

          in the space specified by `spaceKey`.

          - `contentStatuses` Content statuses to search against. Optional.


          Specify these values in an object. For example,

          `cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}`'
        schema:
          type: string
      - name: cursor
        in: query
        description: Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call.
        schema:
          type: string
      - name: next
        in: query
        schema:
          type: boolean
          default: false
      - name: prev
        in: query
        schema:
          type: boolean
          default: false
      - name: limit
        in: query
        description: 'The maximum number of content objects to return per page.

          Note, this may be restricted by fixed system limits.'
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 25
      - name: start
        in: query
        description: The start point of the collection to return
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 0
      - name: includeArchivedSpaces
        in: query
        description: Whether to include content from archived spaces in the results.
        schema:
          type: boolean
          default: false
      - name: excludeCurrentSpaces
        in: query
        description: Whether to exclude current spaces and only show archived spaces.
        schema:
          type: boolean
          default: false
      - name: excerpt
        in: query
        description: The excerpt strategy to apply to the result
        schema:
          type: string
          default: highlight
          enum:
          - highlight
          - indexed
          - none
          - highlight_unescaped
          - indexed_unescaped
      - name: sitePermissionTypeFilter
        in: query
        description: 'Filters users by permission type. Use `none` to default to licensed users, `externalCollaborator`

          for external/guest users, and `all` to include all permission types.'
        schema:
          type: string
          default: none
          enum:
          - all
          - externalCollaborator
          - none
      - name: _
        in: query
        schema:
          type: integer
          format: int64
      - name: expand
        in: query
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returned if the requested results are returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchPageResponseSearchResult'
        '400':
          description: Returned if the CQL query cannot be parsed.
          content: {}
        '403':
          description: 'Returned if the calling user does not have permission to access

            Confluence.'
          content: {}
      security:
      - basicAuth: []
      - oAuthDefinitions:
        - search:confluence
      x-atlassian-oauth2-scopes:
      - scheme: oAuthDefinitions
        state: Current
        scopes:
        - search:confluence
      - scheme: oAuthDefinitions
        state: Beta
        scopes:
        - read:content-details:confluence
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-connect-scope: READ
    servers:
    - url: //your-domain.atlassian.net
  /wiki/rest/api/search/user:
    get:
      tags:
      - Search
      summary: Atlassian Search Users
      description: 'Searches for users using user-specific queries from the<br>[Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).<br><br>Note that CQL input queries submitted through the `/wiki/rest/api/search/user` endpoint only support user-specific fields like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.<br><br>Note that some user fields may be set to null depending on the user''s privacy settings.<br>These are: email, profilePicture, displayName, and timeZone.'
      operationId: atlassianSearchuser
      parameters:
      - name: cql
        in: query
        description: "The CQL query to be used for the search. See\n[Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)\nfor instructions on how to build a CQL query.\n\nExample queries:\n          cql=type=user will return all users\n          cql=user=\"1234\" will return user with accountId \"1234\"\n          You can also use IN, NOT IN, != operators\n          cql=user IN (\"12\", \"34\") will return users with accountids \"12\" and \"34\"\n          cql=user.fullname~jo will return users with nickname/full name starting with \"jo\"\n          cql=user.accountid=\"123\" will return user with accountId \"123\""
        required: true
        schema:
          type: string
      - name: start
        in: query
        description: The starting index of the returned users.
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 0
      - name: limit
        in: query
        description: 'The maximum number of user objects to return per page.

          Note, this may be restricted by fixed system limits.'
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 25
      - name: expand
        in: query
        description: 'A multi-value parameter indicating which properties of the user to expand.


          - `operations` returns the operations for the user, which are used

          when setting permissions.

          - `personalSpace` returns the personal space of the user.'
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - name: sitePermissionTypeFilter
        in: query
        description: 'Filters users by permission type. Use `none` to default to licensed users, `externalCollaborator`

          for external/guest users, and `all` to include all permission types.'
        schema:
          type: string
          default: none
          enum:
          - all
          - externalCollaborator
          - none
      responses:
        '200':
          description: Returned if the requested results are returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchPageResponseSearchResult'
        '400':
          description: Returned if the CQL query cannot be parsed.
          content: {}
        '403':
          description: 'Returned if the calling user does not have permission to access

            Confluence.'
          content: {}
      security:
      - basicAuth: []
      - oAuthDefinitions:
        - read:content-details:confluence
      x-atlassian-oauth2-scopes:
      - scheme: oAuthDefinitions
        state: Current
        scopes:
        - read:content-details:confluence
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: true
      x-atlassian-connect-scope: READ
    servers:
    - url: //your-domain.atlassian.net
components:
  schemas:
    commit_file:
      type: object
      title: Commit File
      description: A file object, representing a file at a commit in a repository
      properties:
        type:
          type: string
        path:
          type: string
          description: The path in the repository
        commit:
          $ref: '#/components/schemas/commit'
        attributes:
          type: string
          enum:
          - link
          - executable
          - subrepository
          - binary
          - lfs
        escaped_path:
          type: string
          description: The escaped version of the path as it appears in a diff. If the path does not require escaping this will be the same as path.
      required:
      - type
      additionalProperties: true
    search_result_page:
      type: object
      properties:
        size:
          type: integer
          format: int64
          readOnly: true
        page:
          type: integer
          format: int32
          readOnly: true
        pagelen:
          type: integer
          format: int32
          readOnly: true
        query_substituted:
          type: boolean
          readOnly: true
        next:
          type: string
          format: uri
          readOnly: true
        previous:
          type: string
          format: uri
          readOnly: true
        values:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/search_code_search_result'
    repository:
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        title: Repository
        description: A Bitbucket repository.
        properties:
          links:
            type: object
            properties:
              self:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              html:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              avatar:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              pullrequests:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              commits:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              forks:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              watchers:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              downloads:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
              clone:
                type: array
                items:
                  type: object
                  title: Link
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      type: string
                      format: uri
                    name:
                      type: string
                  additionalProperties: false
              hooks:
                type: object
                title: Link
                description: A link to a resource related to this object.
                properties:
                  href:
                    type: string
                    format: uri
                  name:
                    type: string
                additionalProperties: false
            additionalProperties: false
          uuid:
            type: string
            description: The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
          full_name:
            type: string
            description: The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs.
          is_private:
            type: boolean
          parent:
            $ref: '#/components/schemas/repository'
          scm:
            type: string
            enum:
            - git
          owner:
            $ref: '#/components/schemas/account'
          name:
            type: string
          description:
            type: string
          created_on:
            type: string
            format: date-time
          updated_on:
            type: string
            format: date-time
          size:
            type: integer
          language:
            type: string
          has_issues:
            type: boolean
            description: '

              The issue tracker for this repository is enabled. Issue Tracker

              features are not supported for repositories in workspaces

              administered through admin.atlassian.com.

              '
          has_wiki:
            type: boolean
            description: '

              The wiki for this repository is enabled. Wiki

              features are not supported for repositories in workspaces

              administered through admin.atlassian.com.

              '
          fork_policy:
            type: string
            description: "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n"
            enum:
            - allow_forks
            - no_public_forks
            - no_forks
          project:
            $ref: '#/components/schemas/project'
          mainbranch:
            $ref: '#/components/schemas/branch'
        additionalProperties: true
    ref:
      type: object
      title: Ref
      description: A ref object, representing a branch or tag in a repository.
      properties:
        type:
          type: string
        links:
          type: object
          properties:
            self:
              type: object
              title: Link
              description: A link to a resource related to this object.
              properties:
                href:
                  type: string
                  format: uri
                name:
                  type: string
              additionalProperties: false
            commits:
              type: object
              title: Link
              description: A link to a resource related to this object.
              properties:
                href:
                  type: string
                  format: uri
                name:
                  type: string
              additionalProperties: false
            html:
              type: object
              title: Link
              description: A link to a res

# --- truncated at 32 KB (93 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/openapi/atlassian-search-api-openapi.yml