App properties API

Atlassian Connect provides a set of REST APIs specifically designed for use by apps.

Get app property keys

GET /wiki/rest/atlassian-connect/1/addons/{addonKey}/properties

Returns a list of property keys for the given app key.

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).

Scopes

Connect app scope required: NONE

OAuth 2.0 scope required: read:app-data:confluence

Parameters

LocationNameTypeDescription
Path addonKey string The key of the app, as defined in its descriptor

Response representations

200 - application/json
1
2
{
  "keys" : [
        {
          "key" : "first_key",
          "self" : "https://your-site.atlassian.net/wiki/rest/atlassian-connect/1/addons/my-add-on/properties/first_key"
        },
        {
          "key" : "another_key",
          "self" : "https://your-site.atlassian.net/wiki/rest/atlassian-connect/1/addons/my-add-on/properties/another_key"
        }
  ]
}
401 - application/json

Request without credentials or with invalid credentials, e.g., by an uninstalled app.

404 - application/json

Request issued by a user with insufficient credentials, e.g., for an app's data by anyone but the app itself, or for a app that does not exist.

Get app property

GET /wiki/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}

Returns an app property for the given property key.

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).

Scopes

Connect app scope required: NONE

OAuth 2.0 scope required: read:app-data:confluence

Parameters

LocationNameTypeDescription
Path addonKey string The key of the app, as defined in its descriptor
Path propertyKey string The key of the property
Query jsonValue boolean

Set to true to have the value field return as a JSON object. If false it will return the value field as a string containing escaped JSON. This will be deprecated during June 2016 and the behavior will default to true.

Response representations

200 - application/json
1
2
{
  "key" : "abcd",
  "value" : true,
  "self" : "https://your-site.atlassian.net/wiki/rest/atlassian-connect/1/addons/my-add-on/properties/abcd"
}
400 - application/json

Property key longer than 127 characters.

401 - application/json

Request without credentials or with invalid credentials, e.g., by an uninstalled app.

404 - application/json

Request to get a property that does not exist.

404 - application/json

Request issued by a user with insufficient credentials, e.g., for an app's data by anyone but the app itself, or for a app that does not exist.

Create or update app property

PUT /wiki/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}

Creates or updates a 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).

Scopes

Connect app scope required: NONE

OAuth 2.0 scope required: write:app-data:confluence

Parameters

LocationNameTypeDescription
Path addonKey string The key of the app, as defined in its descriptor
Path propertyKey string The key of the property

Response

200 - application/json

Property updated.

201 - application/json

Property created.

400 - application/json

Property key longer than 127 characters.

400 - application/json

Request made with invalid JSON.

401 - application/json

Request without credentials or with invalid credentials, e.g., by an uninstalled app.

404 - application/json

Request to get a property that does not exist.

404 - application/json

Request issued by a user with insufficient credentials, e.g., for an app's data by anyone but the app itself, or for a app that does not exist.

Delete app property

DELETE /wiki/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}

Deletes an app 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).

Scopes

Connect app scope required: NONE

OAuth 2.0 scope required: write:app-data:confluence

Parameters

LocationNameTypeDescription
Path addonKey string The key of the app, as defined in its descriptor
Path propertyKey string The key of the property

Response representations

204 - application/json

Property deleted.

400 - application/json

Property key longer than 127 characters.

401 - application/json

Request without credentials or with invalid credentials, e.g., by an uninstalled app.

404 - application/json

Request to get a property that does not exist.

404 - application/json

Request issued by a user with insufficient credentials, e.g., for an app's data by anyone but the app itself, or for a app that does not exist.

Rate this page: