Open Context Protocol is live! 🚀 Read the launch post
findUsersWithAllPermissions

findUsersWithAllPermissions

Find users with permissions

Details

  • Method: GET
  • Path: /rest/api/3/user/permission/search
  • Operation ID: findUsersWithAllPermissions

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, unless `accountId` is specified.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "username": {
    "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": "string"
  },
  "accountId": {
    "description": "A query string that is matched exactly against user `accountId`. Required, unless `query` is specified.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "permissions": {
    "description": "A comma separated list of permissions. Permissions can be specified as any:\n\n *  permission returned by [Get all permissions](#api-rest-api-3-permissions-get).\n *  custom project permission added by Connect apps.\n *  (deprecated) one of the following:\n    \n     *  ASSIGNABLE\\_USER\n     *  ASSIGN\\_ISSUE\n     *  ATTACHMENT\\_DELETE\\_ALL\n     *  ATTACHMENT\\_DELETE\\_OWN\n     *  BROWSE\n     *  CLOSE\\_ISSUE\n     *  COMMENT\\_DELETE\\_ALL\n     *  COMMENT\\_DELETE\\_OWN\n     *  COMMENT\\_EDIT\\_ALL\n     *  COMMENT\\_EDIT\\_OWN\n     *  COMMENT\\_ISSUE\n     *  CREATE\\_ATTACHMENT\n     *  CREATE\\_ISSUE\n     *  DELETE\\_ISSUE\n     *  EDIT\\_ISSUE\n     *  LINK\\_ISSUE\n     *  MANAGE\\_WATCHER\\_LIST\n     *  MODIFY\\_REPORTER\n     *  MOVE\\_ISSUE\n     *  PROJECT\\_ADMIN\n     *  RESOLVE\\_ISSUE\n     *  SCHEDULE\\_ISSUE\n     *  SET\\_ISSUE\\_SECURITY\n     *  TRANSITION\\_ISSUE\n     *  VIEW\\_VERSION\\_CONTROL\n     *  VIEW\\_VOTERS\\_AND\\_WATCHERS\n     *  VIEW\\_WORKFLOW\\_READONLY\n     *  WORKLOG\\_DELETE\\_ALL\n     *  WORKLOG\\_DELETE\\_OWN\n     *  WORKLOG\\_EDIT\\_ALL\n     *  WORKLOG\\_EDIT\\_OWN\n     *  WORK\\_ISSUE",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "issueKey": {
    "description": "The issue key for the issue.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "projectKey": {
    "description": "The project key for the project (case sensitive).",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "startAt": {
    "description": "The index of the first item to return in a page of results (page offset).",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "maxResults": {
    "description": "The maximum number of items to return per page.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  }
}

Response Schema

{
  "items": {
    "additionalProperties": false,
    "description": "A user with details as permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:\n\n *  User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank).\n *  User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values.\n *  User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values.",
    "properties": {
      "accountId": {
        "description": "The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Required in requests.",
        "maxLength": 128,
        "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"
        ],
        "readOnly": true,
        "type": "string"
      },
      "active": {
        "description": "Whether the user is active.",
        "readOnly": true,
        "type": "boolean"
      },
      "appType": {
        "description": "The app type of the user account when accountType is 'app'. Can take the following values:\n\n *  `service` Service Account\n *  `agent` Rovo Agent Account\n *  `unknown` Unknown app type",
        "readOnly": true,
        "type": "string"
      },
      "applicationRoles": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SimpleListWrapperApplicationRole"
          }
        ],
        "description": "The application roles the user is assigned to.",
        "readOnly": true
      },
      "avatarUrls": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AvatarUrlsBean"
          }
        ],
        "description": "The avatars of the user.",
        "readOnly": true
      },
      "displayName": {
        "description": "The display name of the user. Depending on the user’s privacy setting, this may return an alternative value.",
        "readOnly": true,
        "type": "string"
      },
      "emailAddress": {
        "description": "The email address of the user. Depending on the user’s privacy setting, this may be returned as null.",
        "readOnly": true,
        "type": "string"
      },
      "expand": {
        "description": "Expand options that include additional user details in the response.",
        "readOnly": true,
        "type": "string",
        "xml": {
          "attribute": true
        }
      },
      "groups": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SimpleListWrapperGroupName"
          }
        ],
        "description": "The groups that the user belongs to.",
        "readOnly": true
      },
      "key": {
        "description": "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
        "type": "string"
      },
      "locale": {
        "description": "The locale of the user. Depending on the user’s privacy setting, this may be returned as null.",
        "readOnly": true,
        "type": "string"
      },
      "name": {
        "description": "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
        "type": "string"
      },
      "self": {
        "description": "The URL of the user.",
        "format": "uri",
        "readOnly": true,
        "type": "string"
      },
      "timeZone": {
        "description": "The time zone specified in the user's profile. If the user's time zone is not visible to the current user (due to user's profile setting), or if a time zone has not been set, the instance's default time zone will be returned.",
        "readOnly": true,
        "type": "string"
      }
    },
    "type": "object",
    "xml": {
      "name": "user"
    }
  },
  "type": "array"
}

Usage

from ocp_agent import OCPAgent

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

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