• Announcement banner
  • App data policies (EAP)
  • Application roles
  • Audit records
  • Avatars
  • Classification levels
  • Dashboards
  • Filters
  • Filter sharing
  • Group and user picker
  • Groups
  • Issues
  • UI modifications (apps)
  • Issue attachments
  • Issue comments
  • Issue comment properties
  • Issue fields
  • Issue field configurations
  • Issue custom field contexts
  • Issue custom field options
  • Issue custom field options (apps)
  • Issue custom field values (apps)
  • Issue custom field configuration (apps)
  • Issue navigator settings
  • Issue notification schemes
  • Issue priorities
  • Issue properties
  • Issue resolutions
  • Issue security level
  • Issue security schemes
  • Issue types
  • Issue type schemes
  • Issue type screen schemes
  • Issue type properties
  • Issue votes
  • Issue watchers
  • Issue worklogs
  • Issue worklog properties
  • Jira expressions
  • Jira settings
  • JQL
  • JQL functions (apps)
  • Labels
  • License metrics
  • Myself
  • Permissions
  • Permission schemes
  • Projects
  • Project avatars
  • Project categories
  • Project classification levels
  • Project components
  • Project email
  • Project features
  • Project key and name validation
  • Project permission schemes
  • Project properties
  • Project roles
  • Project role actors
  • Project types
  • Project versions
  • Screens
  • Screen tabs
  • Screen tab fields
  • Screen schemes
  • Server info
  • Status
  • Tasks
  • Time tracking
  • Users
  • User properties
  • Webhooks
  • Workflows
  • Workflow transition rules
  • Workflow schemes
  • Workflow scheme project associations
  • Workflow scheme drafts
  • Workflow statuses
  • Workflow status categories
  • Workflow transition properties
  • App properties
  • Dynamic modules
  • App migration
  • Service Registry
Cloud
Jira Cloud platform / Reference / REST API v3 (beta)

Issue custom field contexts

Postman Collection
OpenAPI
GET

Get custom field contexts

Returns a paginated list of contexts for a custom field. Contexts can be returned as follows:

  • With no other parameters set, all contexts.
  • By defining id only, all contexts from the list of IDs.
  • By defining isAnyIssueType, limit the list of contexts returned to either those that apply to all issue types (true) or those that apply to only a subset of issue types (false)
  • By defining isGlobalContext, limit the list of contexts return to either those that apply to all projects (global contexts) (true) or those that apply to only a subset of projects (false).

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredREAD

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field:jira, read:custom-field-contextual-configuration:jira

Request

Path parameters

fieldId

string

Required

Query parameters

isAnyIssueType

boolean

isGlobalContext

boolean

contextId

array<integer>

startAt

integer

maxResults

integer

Responses

Returned if the request is successful.

application/json

PageBeanCustomFieldContext

A page of items.

GET/rest/api/3/field/{fieldId}/context
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/field/{fieldId}/context`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 { "isLast": true, "maxResults": 100, "startAt": 0, "total": 2, "values": [ { "id": "10025", "name": "Bug fields context", "description": "A context used to define the custom field options for bugs.", "isGlobalContext": true, "isAnyIssueType": false }, { "id": "10026", "name": "Task fields context", "description": "A context used to define the custom field options for tasks.", "isGlobalContext": false, "isAnyIssueType": false } ] }
POST

Create custom field context

Creates a custom field context.

If projectIds is empty, a global context is created. A global context is one that applies to all project. If issueTypeIds is empty, the context applies to all issue types.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field:jira, write:field:jira, read:custom-field-contextual-configuration:jira

Request

Path parameters

fieldId

string

Required

Request bodyapplication/json

description

string

issueTypeIds

array<string>

name

string

Required
projectIds

array<string>

Responses

Returned if the custom field context is created.

application/json

CreateCustomFieldContext

The details of a created custom field context.

POST/rest/api/3/field/{fieldId}/context
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "description": "A context used to define the custom field options for bugs.", "issueTypeIds": [ "10010" ], "name": "Bug fields context", "projectIds": [] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context`, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
201Response
1 2 3 4 5 6 7 8 9 { "id": "10025", "name": "Bug fields context", "description": "A context used to define the custom field options for bugs.", "projectIds": [], "issueTypeIds": [ "10010" ] }
GET

Get custom field contexts default values

Returns a paginated list of defaults for a custom field. The results can be filtered by contextId, otherwise all values are returned. If no defaults are set for a context, nothing is returned.
The returned object depends on type of the custom field:

  • CustomFieldContextDefaultValueDate (type datepicker) for date fields.
  • CustomFieldContextDefaultValueDateTime (type datetimepicker) for date-time fields.
  • CustomFieldContextDefaultValueSingleOption (type option.single) for single choice select lists and radio buttons.
  • CustomFieldContextDefaultValueMultipleOption (type option.multiple) for multiple choice select lists and checkboxes.
  • CustomFieldContextDefaultValueCascadingOption (type option.cascading) for cascading select lists.
  • CustomFieldContextSingleUserPickerDefaults (type single.user.select) for single users.
  • CustomFieldContextDefaultValueMultiUserPicker (type multi.user.select) for user lists.
  • CustomFieldContextDefaultValueSingleGroupPicker (type grouppicker.single) for single choice group pickers.
  • CustomFieldContextDefaultValueMultipleGroupPicker (type grouppicker.multiple) for multiple choice group pickers.
  • CustomFieldContextDefaultValueURL (type url) for URLs.
  • CustomFieldContextDefaultValueProject (type project) for project pickers.
  • CustomFieldContextDefaultValueFloat (type float) for floats (floating-point numbers).
  • CustomFieldContextDefaultValueLabels (type labels) for labels.
  • CustomFieldContextDefaultValueTextField (type textfield) for text fields.
  • CustomFieldContextDefaultValueTextArea (type textarea) for text area fields.
  • CustomFieldContextDefaultValueReadOnly (type readonly) for read only (text) fields.
  • CustomFieldContextDefaultValueMultipleVersion (type version.multiple) for single choice version pickers.
  • CustomFieldContextDefaultValueSingleVersion (type version.single) for multiple choice version pickers.

Forge custom fields types are also supported, returning:

  • CustomFieldContextDefaultValueForgeStringFieldBean (type forge.string) for Forge string fields.
  • CustomFieldContextDefaultValueForgeMultiStringFieldBean (type forge.string.list) for Forge string collection fields.
  • CustomFieldContextDefaultValueForgeObjectFieldBean (type forge.object) for Forge object fields.
  • CustomFieldContextDefaultValueForgeDateTimeFieldBean (type forge.datetime) for Forge date-time fields.
  • CustomFieldContextDefaultValueForgeGroupFieldBean (type forge.group) for Forge group fields.
  • CustomFieldContextDefaultValueForgeMultiGroupFieldBean (type forge.group.list) for Forge group collection fields.
  • CustomFieldContextDefaultValueForgeNumberFieldBean (type forge.number) for Forge number fields.
  • CustomFieldContextDefaultValueForgeUserFieldBean (type forge.user) for Forge user fields.
  • CustomFieldContextDefaultValueForgeMultiUserFieldBean (type forge.user.list) for Forge user collection fields.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredREAD

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field.default-value:jira

Request

Path parameters

fieldId

string

Required

Query parameters

contextId

array<integer>

startAt

integer

maxResults

integer

Responses

Returned if the request is successful.

application/json

PageBeanCustomFieldContextDefaultValue

A page of items.

GET/rest/api/3/field/{fieldId}/context/defaultValue
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/field/{fieldId}/context/defaultValue`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "isLast": true, "maxResults": 50, "startAt": 0, "total": 3, "values": [ { "contextId": "10100", "optionId": "10001" }, { "contextId": "10101", "optionId": "10003" }, { "contextId": "10103" } ] }
PUT

Set custom field contexts default values

Sets default for contexts of a custom field. Default are defined using these objects:

  • CustomFieldContextDefaultValueDate (type datepicker) for date fields.
  • CustomFieldContextDefaultValueDateTime (type datetimepicker) for date-time fields.
  • CustomFieldContextDefaultValueSingleOption (type option.single) for single choice select lists and radio buttons.
  • CustomFieldContextDefaultValueMultipleOption (type option.multiple) for multiple choice select lists and checkboxes.
  • CustomFieldContextDefaultValueCascadingOption (type option.cascading) for cascading select lists.
  • CustomFieldContextSingleUserPickerDefaults (type single.user.select) for single users.
  • CustomFieldContextDefaultValueMultiUserPicker (type multi.user.select) for user lists.
  • CustomFieldContextDefaultValueSingleGroupPicker (type grouppicker.single) for single choice group pickers.
  • CustomFieldContextDefaultValueMultipleGroupPicker (type grouppicker.multiple) for multiple choice group pickers.
  • CustomFieldContextDefaultValueURL (type url) for URLs.
  • CustomFieldContextDefaultValueProject (type project) for project pickers.
  • CustomFieldContextDefaultValueFloat (type float) for floats (floating-point numbers).
  • CustomFieldContextDefaultValueLabels (type labels) for labels.
  • CustomFieldContextDefaultValueTextField (type textfield) for text fields.
  • CustomFieldContextDefaultValueTextArea (type textarea) for text area fields.
  • CustomFieldContextDefaultValueReadOnly (type readonly) for read only (text) fields.
  • CustomFieldContextDefaultValueMultipleVersion (type version.multiple) for single choice version pickers.
  • CustomFieldContextDefaultValueSingleVersion (type version.single) for multiple choice version pickers.

Forge custom fields types are also supported, returning:

  • CustomFieldContextDefaultValueForgeStringFieldBean (type forge.string) for Forge string fields.
  • CustomFieldContextDefaultValueForgeMultiStringFieldBean (type forge.string.list) for Forge string collection fields.
  • CustomFieldContextDefaultValueForgeObjectFieldBean (type forge.object) for Forge object fields.
  • CustomFieldContextDefaultValueForgeDateTimeFieldBean (type forge.datetime) for Forge date-time fields.
  • CustomFieldContextDefaultValueForgeGroupFieldBean (type forge.group) for Forge group fields.
  • CustomFieldContextDefaultValueForgeMultiGroupFieldBean (type forge.group.list) for Forge group collection fields.
  • CustomFieldContextDefaultValueForgeNumberFieldBean (type forge.number) for Forge number fields.
  • CustomFieldContextDefaultValueForgeUserFieldBean (type forge.user) for Forge user fields.
  • CustomFieldContextDefaultValueForgeMultiUserFieldBean (type forge.user.list) for Forge user collection fields.

Only one type of default object can be included in a request. To remove a default for a context, set the default parameter to null.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field.default-value:jira

Request

Path parameters

fieldId

string

Required

Request bodyapplication/json

defaultValues

array<oneOf [CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueSingleOption, CustomFieldContextSingleUserPickerDefaults, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueURL, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueForgeMultiUserField]>

Responses

Returned if operation is successful.

application/json

any

PUT/rest/api/3/field/{fieldId}/context/defaultValue
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 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "defaultValues": [ { "contextId": "10100", "optionId": "10001", "type": "option.single" }, { "contextId": "10101", "optionId": "10003", "type": "option.single" }, { "contextId": "10103", "optionId": "10005", "type": "option.single" } ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/defaultValue`, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
GET

Get issue types for custom field context

Returns a paginated list of context to issue type mappings for a custom field. Mappings are returned for all contexts or a list of contexts. Mappings are ordered first by context ID and then by issue type ID.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredREAD

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field:jira

Request

Path parameters

fieldId

string

Required

Query parameters

contextId

array<integer>

startAt

integer

maxResults

integer

Responses

Returned if operation is successful.

application/json

PageBeanIssueTypeToContextMapping

A page of items.

GET/rest/api/3/field/{fieldId}/context/issuetypemapping
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/field/{fieldId}/context/issuetypemapping`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "isLast": true, "maxResults": 100, "startAt": 0, "total": 3, "values": [ { "contextId": "10001", "issueTypeId": "10010" }, { "contextId": "10001", "issueTypeId": "10011" }, { "contextId": "10002", "isAnyIssueType": true } ] }
POST

Get custom field contexts for projects and issue types

Returns a paginated list of project and issue type mappings and, for each mapping, the ID of a custom field context that applies to the project and issue type.

If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is null.

Duplicate project and issue type mappings cannot be provided in the request.

The order of the returned values is the same as provided in the request.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field:jira

Request

Path parameters

fieldId

string

Required

Query parameters

startAt

integer

maxResults

integer

Request bodyapplication/json

The list of project and issue type mappings.

mappings

array<ProjectIssueTypeMapping>

Required

Responses

Returned if the request is successful.

application/json

PageBeanContextForProjectAndIssueType

A page of items.

POST/rest/api/3/field/{fieldId}/context/mapping
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 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "mappings": [ { "issueTypeId": "10000", "projectId": "10000" }, { "issueTypeId": "10001", "projectId": "10000" }, { "issueTypeId": "10002", "projectId": "10001" } ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/mapping`, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "isLast": true, "maxResults": 50, "startAt": 0, "total": 3, "values": [ { "projectId": "10000", "issueTypeId": "10000", "contextId": "10000" }, { "projectId": "10000", "issueTypeId": "10001", "contextId": null }, { "projectId": "10001", "issueTypeId": "10002", "contextId": "10003" } ] }
GET

Get project mappings for custom field context

Returns a paginated list of context to project mappings for a custom field. The result can be filtered by contextId. Otherwise, all mappings are returned. Invalid IDs are ignored.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredREAD

ClassicRECOMMENDED:manage:jira-configuration
Granular:read:field:jira

Request

Path parameters

fieldId

string

Required

Query parameters

contextId

array<integer>

startAt

integer

maxResults

integer

Responses

Returned if the request is successful.

application/json

PageBeanCustomFieldContextProjectMapping

A page of items.

GET/rest/api/3/field/{fieldId}/context/projectmapping
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/field/{fieldId}/context/projectmapping`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "isLast": true, "maxResults": 100, "startAt": 0, "total": 2, "values": [ { "contextId": "10025", "projectId": "10001" }, { "contextId": "10026", "isGlobalContext": true } ] }
PUT

Update custom field context

Updates a custom field context.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Request bodyapplication/json

description

string

name

string

Responses

Returned if the context is updated.

application/json

any

PUT/rest/api/3/field/{fieldId}/context/{contextId}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "description": "A context used to define the custom field options for bugs.", "name": "Bug fields context" }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}`, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
DEL

Delete custom field context

Deletes a custom field context.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:delete:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Responses

Returned if the context is deleted.

application/json

any

DEL/rest/api/3/field/{fieldId}/context/{contextId}
1 2 3 4 5 6 7 8 9 10 11 12 13 // 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/field/{fieldId}/context/{contextId}`, { method: 'DELETE', headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
PUT

Add issue types to context

Adds issue types to a custom field context, appending the issue types to the issue types list.

A custom field context without any issue types applies to all issue types. Adding issue types to such a custom field context would result in it applying to only the listed issue types.

If any of the issue types exists in the custom field context, the operation fails and no issue types are added.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Request bodyapplication/json

issueTypeIds

array<string>

Required

Responses

Returned if operation is successful.

application/json

any

PUT/rest/api/3/field/{fieldId}/context/{contextId}/issuetype
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "issueTypeIds": [ "10001", "10005", "10006" ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/issuetype`, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
POST

Remove issue types from context

Removes issue types from a custom field context.

A custom field context without any issue types applies to all issue types.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Request bodyapplication/json

issueTypeIds

array<string>

Required

Responses

Returned if operation is successful.

application/json

any

POST/rest/api/3/field/{fieldId}/context/{contextId}/issuetype/remove
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "issueTypeIds": [ "10001", "10005", "10006" ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/issuetype/remove`, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
PUT

Assign custom field context to projects

Assigns a custom field context to projects.

If any project in the request is assigned to any context of the custom field, the operation fails.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Request bodyapplication/json

projectIds

array<string>

Required

Responses

Returned if operation is successful.

application/json

any

PUT/rest/api/3/field/{fieldId}/context/{contextId}/project
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "projectIds": [ "10001", "10005", "10006" ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/project`, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
POST

Remove custom field context from projects

Removes a custom field context from projects.

A custom field context without any projects applies to all projects. Removing all projects from a custom field context would result in it applying to all projects.

If any project in the request is not assigned to the context, or the operation would result in two global contexts for the field, the operation fails.

Permissions required: Administer Jira global permission.

Data Security Policy: Exempt from app access rules
Scopes

Connect app scope requiredADMIN

ClassicRECOMMENDED:manage:jira-configuration
Granular:write:field:jira

Request

Path parameters

fieldId

string

Required
contextId

integer

Required

Request bodyapplication/json

projectIds

array<string>

Required

Responses

Returned if the custom field context is removed from the projects.

application/json

any

POST/rest/api/3/field/{fieldId}/context/{contextId}/project/remove
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "projectIds": [ "10001", "10005", "10006" ] }`; const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/project/remove`, { method: 'POST', 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: