This resource represents user properties and provides for storing custom data against a user. Use it to get, create, and delete user properties as well as get a list of property keys for a user. This resourse is designed for integrations and apps to store per-user data and settings. This enables data used to customized the user experience to be kept in the Jira Cloud instance's database. User properties are a type of entity property.

This resource does not access the user properties created and maintained in Jira.

Hierarchy

  • CommonHttpService
    • UserPropertiesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns UserPropertiesService

Methods

  • Deletes a property from a user.

    Note: This operation does not access the user properties created and maintained in Jira.

    Permissions required:

    • Administer Jira global permission, to delete a property from any user.
    • Access to Jira, to delete a property from the calling user's record.

    Parameters

    • params: {
          accountId?: string;
          propertyKey: string;
          userKey?: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • propertyKey: string

        The key of the user's property.

      • OptionaluserKey?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

    Returns Promise<void>

    DELETE /rest/api/3/user/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta delete:user.property:jira

  • Returns the value of a user's property. If no property key is provided Get user property keys is called.

    Note: This operation does not access the user properties created and maintained in Jira.

    Permissions required:

    • Administer Jira global permission, to get a property from any user.
    • Access to Jira, to get a property from the calling user's record.

    Parameters

    • params: {
          accountId?: string;
          propertyKey: string;
          userKey?: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • propertyKey: string

        The key of the user's property.

      • OptionaluserKey?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

    Returns Promise<EntityProperty>

    Returned if the request is successful.

    example:

    {
    "key": "issue.support",
    "value": {
    "system.conversation.id": "b1bf38be-5e94-4b40-a3b8-9278735ee1e6",
    "system.support.time": "1m"
    }
    }

    GET /rest/api/3/user/properties/{propertyKey} @scopes-current read:jira-user @scopes-beta read:user.property:jira

  • Returns the keys of all properties for a user.

    Note: This operation does not access the user properties created and maintained in Jira.

    Permissions required:

    • Administer Jira global permission, to access the property keys on any user.
    • Access to Jira, to access the calling user's property keys.

    Parameters

    • params: {
          accountId?: string;
          userKey?: string;
          username?: string;
      } = {}
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • OptionaluserKey?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

    Returns Promise<PropertyKeys>

    Returned if the request is successful.

    example:

    {
    "keys": [
    {
    "key": "issue.support",
    "self": "https://your-domain.atlassian.net/rest/api/3/issue/EX-2/properties/issue.support"
    }
    ]
    }

    GET /rest/api/3/user/properties @scopes-current read:jira-user @scopes-beta read:user.property:jira

  • Sets the value of a user's property. Use this resource to store custom data against a user.

    Note: This operation does not access the user properties created and maintained in Jira.

    Permissions required:

    • Administer Jira global permission, to set a property on any user.
    • Access to Jira, to set a property on the calling user's record.

    Parameters

    • params: {
          accountId?: string;
          propertyKey: string;
          requestBody: unknown;
          userKey?: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • propertyKey: string

        The key of the user's property. The maximum length is 255 characters.

      • requestBody: unknown

        The value of the property. The value has to be a valid, non-empty JSON value. The maximum length of the property value is 32768 bytes.

      • OptionaluserKey?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

    Returns Promise<{
        body: unknown;
        created: boolean;
    }>

    • status: 200, mediaType: application/json

      Returned if the user property is updated.

    • status: 201, mediaType: application/json

      Returned if the user property is created.

    PUT /rest/api/3/user/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta write:user.property:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void