Open Context Protocol is live! πŸš€ Read the launch post
findUsersForPicker

findUsersForPicker

Find users for picker

Details

  • Method: GET
  • Path: /rest/api/3/user/picker
  • Operation ID: findUsersForPicker

Parameters

{
  "query": {
    "description": "A query string that is matched against user attributes, such as `displayName`, and `emailAddress`, to find relevant users. The string can match the prefix of the attribute's value. For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "maxResults": {
    "description": "The maximum number of items to return. The total number of matched users is returned in `total`.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "showAvatar": {
    "description": "Include the URI to the user's avatar.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "exclude": {
    "description": "This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "excludeAccountIds": {
    "description": "A list of account IDs to exclude from the search results. This parameter accepts a comma-separated list. Multiple account IDs can also be provided using an ampersand-separated list. For example, `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`. Cannot be provided with `exclude`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "avatarSize": {
    "description": "",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "excludeConnectUsers": {
    "description": "",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The list of users found in a search, including header text (Showing X of Y matching users) and total of matched users.",
  "properties": {
    "header": {
      "description": "Header text indicating the number of users in the response and the total number of users found in the search.",
      "type": "string"
    },
    "total": {
      "description": "The total number of users found in the search.",
      "format": "int32",
      "type": "integer"
    },
    "users": {
      "items": {
        "additionalProperties": false,
        "description": "A user found in a search.",
        "properties": {
          "accountId": {
            "description": "The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.",
            "type": "string"
          },
          "accountType": {
            "description": "The user account type. Can take the following values:\n\n *  `atlassian` regular Atlassian user account\n *  `app` system account used for Connect applications and OAuth to represent external systems\n *  `customer` Jira Service Desk account representing an external service desk",
            "enum": [
              "atlassian",
              "app",
              "customer",
              "unknown"
            ],
            "type": "string"
          },
          "avatarUrl": {
            "description": "The avatar URL of the user.",
            "format": "uri",
            "type": "string"
          },
          "displayName": {
            "description": "The display name of the user. Depending on the user’s privacy setting, this may be returned as null.",
            "type": "string"
          },
          "html": {
            "description": "The display name, email address, and key of the user with the matched query string highlighted with the HTML bold tag.",
            "type": "string"
          },
          "key": {
            "description": "This property is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
            "type": "string"
          },
          "name": {
            "description": "This property is no longer available . See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('findUsersForPicker', {
    # Add required parameters here
})