This resource represents app properties. Use it to store arbitrary data for your Connect app.

Hierarchy

  • CommonHttpService
    • AppPropertiesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns AppPropertiesService

Methods

  • Gets all the properties of an app.

    Permissions required: Only a Connect app whose key matches addonKey can make this request. Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key).

    Parameters

    • params: {
          addonKey: string;
      }
      • addonKey: string

        The key of the app, as defined in its descriptor.

    Returns Promise<PropertyKeys>

    Returned if the request is successful.

    example:

    {
    "keys": [
    {
    "self": "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
    "key": "propertyKey"
    }
    ]
    }

    GET /rest/atlassian-connect/1/addons/{addonKey}/properties @scopes-current @scopes-beta

  • Returns the key and value of an app's property.

    Permissions required: Only a Connect app whose key matches addonKey can make this request. Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key).

    Parameters

    • params: {
          addonKey: string;
          propertyKey: string;
      }
      • addonKey: string

        The key of the app, as defined in its descriptor.

      • propertyKey: string

        The key of the property.

    Returns Promise<EntityProperty>

    Returned if the request is successful.

    example:

    {
    "self": "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
    "key": "propertyKey",
    "value": "propertyValue"
    }

    GET /rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey} @scopes-current @scopes-beta

  • Sets the value of an app's property. Use this resource to store custom data for your app.

    The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.

    Permissions required: Only a Connect app whose key matches addonKey can make this request. Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key).

    Parameters

    • params: {
          addonKey: string;
          propertyKey: string;
          requestBody: unknown;
      }
      • addonKey: string

        The key of the app, as defined in its descriptor.

      • propertyKey: string

        The key of the property.

      • requestBody: unknown

    Returns Promise<{
        created: boolean;
        operationMessage: OperationMessage;
    }>

    • status: 200, mediaType: application/json

      Returned if the property is updated.

      example:

      {
      "message": "Property updated.",
      "statusCode": 200
      }
    • status: 201, mediaType: application/json

      Returned is the property is created.

      example:

      {
      "message": "Property created.",
      "statusCode": 201
      }

    PUT /rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey} @scopes-current @scopes-beta

  • Sets the value of a Forge app's property. These values can be retrieved in Jira expressions through the app context variable. They are also available in entity property display conditions.

    For other use cases, use the Storage API.

    The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.

    Permissions required: Only Forge apps can make this request.

    The new write:app-data:jira OAuth scope is 100% optional now, and not using it won't break your app. However, we recommend adding it to your app's scope list because we will eventually make it mandatory.

    Parameters

    • params: {
          propertyKey: string;
          requestBody: unknown;
      }
      • propertyKey: string

        The key of the property.

      • requestBody: unknown

    Returns Promise<{
        created: boolean;
        operationMessage: OperationMessage;
    }>

    • status: 200, mediaType: application/json

      Returned if the property is updated.

      example:

      {
      "message": "Property updated.",
      "statusCode": 200
      }
    • status: 201, mediaType: application/json

      Returned is the property is created.

      example:

      {
      "message": "Property created.",
      "statusCode": 201
      }

    PUT /rest/forge/1/app/properties/{propertyKey} @scopes-current @scopes-beta write:app-data:jira

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

    Returns void