This resource represents configurations stored against a custom field context by a Forge app. Configurations are information used by the Forge app at runtime to determine how to handle or process the data in a custom field in a given context. Use this resource to set and read configurations.
Returns a paginated list of configurations for list of custom fields of a type created by a Forge app.
The result can be filtered by one of these criteria:
id
.fieldContextId
.issueId
.projectKeyOrId
and issueTypeId
.Otherwise, all configurations for the provided list of custom fields are returned.
Permissions required: Administer Jira global permission. Jira permissions are not required for the Forge app that provided the custom field type.
manage:jira-configuration
read:custom-field-contextual-configuration:jira
Connect app scope required: ADMIN
array<integer>
array<integer>
integer
string
string
integer
integer
array<string>
RequiredReturned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"fieldIdsOrKeys": [
"customfield_10035",
"customfield_10036"
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/app/field/context/configuration/list`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"isLast": true,
"maxResults": 1000,
"startAt": 0,
"total": 2,
"values": [
{
"customFieldId": "customfield_10035",
"fieldContextId": "10010",
"id": "10000"
},
{
"configuration": {
"maxValue": 10000,
"minValue": 0
},
"customFieldId": "customfield_10036",
"fieldContextId": "10011",
"id": "10001",
"schema": {
"properties": {
"amount": {
"type": "number"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
}
]
}
Returns a paginated list of configurations for a custom field of a type created by a Forge app.
The result can be filtered by one of these criteria:
id
.fieldContextId
.issueId
.projectKeyOrId
and issueTypeId
.Otherwise, all configurations are returned.
Permissions required: Administer Jira global permission. Jira permissions are not required for the Forge app that provided the custom field type.
manage:jira-configuration
read:custom-field-contextual-configuration:jira
Connect app scope required: ADMIN
string
Requiredarray<integer>
array<integer>
integer
string
string
integer
integer
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/app/field/{fieldIdOrKey}/context/configuration`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"isLast": true,
"maxResults": 1000,
"startAt": 0,
"total": 2,
"values": [
{
"id": "10000",
"fieldContextId": "10010"
},
{
"id": "10001",
"fieldContextId": "10011",
"configuration": {
"minValue": 0,
"maxValue": 10000
},
"schema": {
"properties": {
"amount": {
"type": "number"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
}
]
}
Update the configuration for contexts of a custom field of a type created by a Forge app.
Permissions required: Administer Jira global permission. Jira permissions are not required for the Forge app that created the custom field type.
manage:jira-configuration
write:custom-field-contextual-configuration:jira
Connect app scope required: ADMIN
string
Requiredarray<ContextualConfiguration>
RequiredReturned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"configurations": [
{
"id": "10000"
},
{
"configuration": {
"maxValue": 10000,
"minValue": 0
},
"id": "10001",
"schema": {
"properties": {
"amount": {
"type": "number"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/app/field/{fieldIdOrKey}/context/configuration`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Rate this page: