@datafire/atlassian_jira v3.0.0
@datafire/atlassian_jira
Client library for The Jira Cloud platform REST API
Installation and Usage
npm install --save @datafire/atlassian_jira
let atlassian_jira = require('@datafire/atlassian_jira').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: "",
username: "",
password: ""
});
.then(data => {
console.log(data);
});
Description
Jira Cloud platform REST API documentation
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
atlassian_jira.oauthCallback({
"code": ""
}, context)
Input
- input
object
- code required
string
- code required
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
oauthRefresh
Exchange a refresh_token for an access_token
atlassian_jira.oauthRefresh(null, context)
Input
This action has no parameters
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
getApplicationProperty
Returns all application properties or an application property.
If you specify a value for the key
parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See Set application property for descriptions of editable properties.
Permissions required: Administer Jira global permission.
atlassian_jira.getApplicationProperty({}, context)
Input
- input
object
- key
string
: The key of the application property. - permissionLevel
string
: The permission level of all items being returned in the list. - keyFilter
string
: When akey
isn't provided, this filters the list of results by the application propertykey
using a regular expression. For example, usingjira.lf.*
will return all application properties with keys that start with jira.lf..
- key
Output
- output
array
- items ApplicationProperty
getAdvancedSettings
Returns the application properties that are accessible on the Advanced Settings page. To navigate to the Advanced Settings page in Jira, choose the Jira icon > Jira settings > System, General Configuration and then click Advanced Settings (in the upper right).
Permissions required: Administer Jira global permission.
atlassian_jira.getAdvancedSettings(null, context)
Input
This action has no parameters
Output
- output
array
- items ApplicationProperty
setApplicationProperty
Changes the value of an application property. For example, you can change the value of the jira.clone.prefix
from its default value of CLONE - to Clone - if you prefer sentence case capitalization. Editable properties are described below along with their default values.
Advanced settings
The advanced settings below are also accessible in Jira.
Key | Description | Default value |
---|---|---|
jira.clone.prefix | The string of text prefixed to the title of a cloned issue. | CLONE - |
jira.date.picker.java.format | The date format for the Java (server-side) generated dates. This must be the same as the jira.date.picker.javascript.format format setting. | d/MMM/yy |
jira.date.picker.javascript.format | The date format for the JavaScript (client-side) generated dates. This must be the same as the jira.date.picker.java.format format setting. | %e/%b/%y |
jira.date.time.picker.java.format | The date format for the Java (server-side) generated date times. This must be the same as the jira.date.time.picker.javascript.format format setting. | dd/MMM/yy h:mm a |
jira.date.time.picker.javascript.format | The date format for the JavaScript (client-side) generated date times. This must be the same as the jira.date.time.picker.java.format format setting. | %e/%b/%y %I:%M %p |
jira.issue.actions.order | The default order of actions (such as Comments or Change history) displayed on the issue view. | asc |
jira.table.cols.subtasks | The columns to show while viewing subtask issues in a table. For example, a list of subtasks on an issue. | issuetype, status, assignee, progress |
jira.view.issue.links.sort.order | The sort order of the list of issue links on the issue view. | type, status, priority |
jira.comment.collapsing.minimum.hidden | The minimum number of comments required for comment collapsing to occur. A value of 0 disables comment collapsing. | 4 |
jira.newsletter.tip.delay.days | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of -1 disables this feature. | 7 |
Look and feel
The settings listed below adjust the look and feel.
Key | Description | Default value |
---|---|---|
jira.lf.date.time | The time format. | h:mm a |
jira.lf.date.day | The day format. | EEEE h:mm a |
jira.lf.date.complete | The date and time format. | dd/MMM/yy h:mm a |
jira.lf.date.dmy | The date format. | dd/MMM/yy |
jira.date.time.picker.use.iso8061 | When enabled, sets Monday as the first day of the week in the date picker, as specified by the ISO8601 standard. | false |
jira.lf.logo.url | The URL of the logo image file. | /images/icon-jira-logo.png |
jira.lf.logo.show.application.title | Controls the visibility of the application title on the sidebar. | false |
jira.lf.favicon.url | The URL of the favicon. | /favicon.ico |
jira.lf.favicon.hires.url | The URL of the high-resolution favicon. | /images/64jira.png |
jira.lf.top.adg3.bgcolour | The background color of the sidebar. | #0747A6 |
jira.lf.top.adg3.textcolour | The color of the text and logo of the sidebar. | #DEEBFF |
jira.lf.hero.button.base.bg.colour | The background color of the hero button. | #3b7fc4 |
jira.title | The text for the application title. The application title can also be set in General settings. | Jira |
jira.option.globalsharing | Whether filters and dashboards can be shared with anyone signed into Jira. | true |
xflow.product.suggestions.enabled | Whether to expose product suggestions for other Atlassian products within Jira. | true |
Other settings
Key | Description | Default value |
---|---|---|
jira.issuenav.criteria.autoupdate | Whether instant updates to search criteria is active. | true |
Note: Be careful when changing application properties and advanced settings.
Permissions required: Administer Jira global permission.
atlassian_jira.setApplicationProperty({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: The key of the application property to update. - body required SimpleApplicationPropertyBean
- id required
Output
- output ApplicationProperty
getAllApplicationRoles
Returns all application roles. In Jira, application roles are managed using the Application access configuration page.
Permissions required: Administer Jira global permission.
atlassian_jira.getAllApplicationRoles(null, context)
Input
This action has no parameters
Output
- output
array
- items ApplicationRole
getApplicationRole
Returns an application role.
Permissions required: Administer Jira global permission.
atlassian_jira.getApplicationRole({
"key": ""
}, context)
Input
- input
object
- key required
string
: The key of the application role. Use the Get all application roles operation to get the key for each application role.
- key required
Output
- output ApplicationRole
getAttachmentMeta
Returns the attachment settings, that is, whether attachments are enabled and the maximum attachment size allowed.
Note that there are also project permissions that restrict whether users can create and delete attachments.
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getAttachmentMeta(null, context)
Input
This action has no parameters
Output
- output AttachmentSettings
removeAttachment
Deletes an attachment from an issue.
This operation can be accessed anonymously.
Permissions required: For the project holding the issue containing the attachment:
- Delete own attachments project permission to delete an attachment created by the calling user.
- Delete all attachments project permission to delete an attachment created by any user.
atlassian_jira.removeAttachment({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the attachment.
- id required
Output
Output schema unknown
getAttachment
Returns the metadata for an attachment. Note that the attachment itself is not returned.
This operation can be accessed anonymously.
Permissions required:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
atlassian_jira.getAttachment({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the attachment.
- id required
Output
- output AttachmentMetadata
expandAttachmentForHumans
Returns the metadata for the contents of an attachment, if it is an archive, and metadata for the attachment itself. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned and metadata for the ZIP archive. Currently, only the ZIP archive format is supported.
Use this operation to retrieve data that is presented to the user, as this operation returns the metadata for the attachment itself, such as the attachment's ID and name. Otherwise, use Get contents metadata for an expanded attachment, which only returns the metadata for the attachment's contents.
This operation can be accessed anonymously.
Permissions required: For the issue containing the attachment:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
atlassian_jira.expandAttachmentForHumans({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the attachment.
- id required
Output
expandAttachmentForMachines
Returns the metadata for the contents of an attachment, if it is an archive. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned. Currently, only the ZIP archive format is supported.
Use this operation if you are processing the data without presenting it to the user, as this operation only returns the metadata for the contents of the attachment. Otherwise, to retrieve data to present to the user, use Get all metadata for an expanded attachment which also returns the metadata for the attachment itself, such as the attachment's ID and name.
This operation can be accessed anonymously.
Permissions required: For the issue containing the attachment:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
atlassian_jira.expandAttachmentForMachines({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the attachment.
- id required
Output
- output AttachmentArchiveImpl
getAuditRecords
Returns a list of audit records. The list can be filtered to include items:
- containing a string in at least one field. For example, providing up will return all audit records where one or more fields contains words such as update.
- created on or after a date and time.
- created or or before a date and time.
- created during a time period.
Permissions required: Administer Jira global permission.
atlassian_jira.getAuditRecords({}, context)
Input
- input
object
- offset
integer
: The number of records to skip before returning the first result. - limit
integer
: The maximum number of results to return. - filter
string
: The query string. - from
string
: The date and time on or after which returned audit records must have been created. Ifto
is providedfrom
must be beforeto
or no audit records are returned. - to
string
: The date and time on or before which returned audit results must have been created. Iffrom
is providedto
must be afterfrom
or no audit records are returned.
- offset
Output
- output AuditRecords
getAllSystemAvatars
Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user.
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getAllSystemAvatars({
"type": ""
}, context)
Input
- input
object
- type required
string
(values: issuetype, project, user): The avatar type.
- type required
Output
- output SystemAvatars
getCommentsByIds
Returns a paginated list of just the comments for a list of comments specified by comment IDs.
This operation can be accessed anonymously.
Permissions required: Comments are returned where the user:
- has Browse projects project permission for the project containing the comment.
- If issue-level security is configured, issue-level security permission to view the issue.
- If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.
atlassian_jira.getCommentsByIds({
"body": {
"ids": []
}
}, context)
Input
- input
object
- expand
string
: Use expand to include additional information about comments in the response. This parameter accepts a comma-separated list. Expand options include: - body required IssueCommentListRequestBean
- expand
Output
- output PageBeanComment
getCommentPropertyKeys
Returns the keys of all the properties of a comment.
This operation can be accessed anonymously.
Permissions required:
- Browse projects project permission for the project.
- If issue-level security is configured, issue-level security permission to view the issue.
- If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.
atlassian_jira.getCommentPropertyKeys({
"commentId": ""
}, context)
Input
- input
object
- commentId required
string
: The ID of the comment.
- commentId required
Output
- output PropertyKeys
deleteCommentProperty
Deletes a comment property.
Permissions required: either of:
- Edit All Comments project permission to delete a property from any comment.
- Edit Own Comments project permission to delete a property from a comment created by the user.
Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group.
atlassian_jira.deleteCommentProperty({
"commentId": "",
"propertyKey": ""
}, context)
Input
- input
object
- commentId required
string
: The ID of the comment. - propertyKey required
string
: The key of the property.
- commentId required
Output
Output schema unknown
getCommentProperty
Returns the value of a comment property.
This operation can be accessed anonymously.
Permissions required:
- Browse projects project permission for the project.
- If issue-level security is configured, issue-level security permission to view the issue.
- If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.
atlassian_jira.getCommentProperty({
"commentId": "",
"propertyKey": ""
}, context)
Input
- input
object
- commentId required
string
: The ID of the comment. - propertyKey required
string
: The key of the property.
- commentId required
Output
- output EntityProperty
setCommentProperty
Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment.
The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.
Permissions required: either of:
- Edit All Comments project permission to create or update the value of a property on any comment.
- Edit Own Comments project permission to create or update the value of a property on a comment created by the user.
Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group.
atlassian_jira.setCommentProperty({
"commentId": "",
"propertyKey": "",
"body": null
}, context)
Input
- input
object
- commentId required
string
: The ID of the comment. - propertyKey required
string
: The key of the property. The maximum length is 255 characters.
- commentId required
Output
- output
object
createComponent
Creates a component. Use components to provide containers for issues within a project.
This operation can be accessed anonymously.
Permissions required: Administer projects project permission for the project in which the component is created or Administer Jira global permission.
atlassian_jira.createComponent({
"body": {}
}, context)
Input
- input
object
- body required Component
Output
- output Component
deleteComponent
Deletes a component.
This operation can be accessed anonymously.
Permissions required: Administer projects project permission for the project containing the component or Administer Jira global permission.
atlassian_jira.deleteComponent({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the component. - moveIssuesTo
string
: The ID of the component to replace the deleted component. If this value is null no replacement is made.
- id required
Output
Output schema unknown
getComponent
Returns a component.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for project containing the component.
atlassian_jira.getComponent({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the component.
- id required
Output
- output Component
updateComponent
Updates a component. Any fields included in the request are overwritten. If leadAccountId
is an empty string ("") the component lead is removed.
This operation can be accessed anonymously.
Permissions required: Administer projects project permission for the project containing the component or Administer Jira global permission.
atlassian_jira.updateComponent({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: The ID of the component. - body required Component
- id required
Output
- output Component
getComponentRelatedIssues
Returns the counts of issues assigned to the component.
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getComponentRelatedIssues({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the component.
- id required
Output
- output ComponentIssuesCount
getConfiguration
Returns the global settings in Jira. These settings determine whether optional features (for example, subtasks, time tracking, and others) are enabled. If time tracking is enabled, this operation also returns the time tracking configuration.
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getConfiguration(null, context)
Input
This action has no parameters
Output
- output Configuration
getSelectedTimeTrackingImplementation
Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned.
Permissions required: Administer Jira global permission.
atlassian_jira.getSelectedTimeTrackingImplementation(null, context)
Input
This action has no parameters
Output
- output TimeTrackingProvider
selectTimeTrackingImplementation
Selects a time tracking provider.
Permissions required: Administer Jira global permission.
atlassian_jira.selectTimeTrackingImplementation({
"body": {
"key": ""
}
}, context)
Input
- input
object
- body required TimeTrackingProvider
Output
- output
object
getAvailableTimeTrackingImplementations
Returns all time tracking providers. By default, Jira only has one time tracking provider: JIRA provided time tracking. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the Time Tracking Provider module.
Permissions required: Administer Jira global permission.
atlassian_jira.getAvailableTimeTrackingImplementations(null, context)
Input
This action has no parameters
Output
- output
array
- items TimeTrackingProvider
getSharedTimeTrackingConfiguration
Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see Configuring time tracking.
Permissions required: Administer Jira global permission.
atlassian_jira.getSharedTimeTrackingConfiguration(null, context)
Input
This action has no parameters
Output
- output TimeTrackingConfiguration
setSharedTimeTrackingConfiguration
Sets the time tracking settings.
Permissions required: Administer Jira global permission.
atlassian_jira.setSharedTimeTrackingConfiguration({
"body": {
"defaultUnit": "",
"timeFormat": "",
"workingDaysPerWeek": 0,
"workingHoursPerDay": 0
}
}, context)
Input
- input
object
- body required TimeTrackingConfiguration
Output
- output TimeTrackingConfiguration
getOptionsForField
Returns a paginated list of options and, where the custom select field is of the type Select List (cascading), cascading options for custom select fields. Cascading options are included in the item count when determining pagination. Only options from the global context are returned.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
Permissions required: Administer Jira global permission.
atlassian_jira.getOptionsForField({
"fieldId": 0
}, context)
Input
- input
object
- fieldId required
integer
: The ID of the custom field. Note: This is the numeric part of the of the field ID. For example, for a field with the ID customfield_10075 use 10075. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- fieldId required
Output
createCustomFieldOptions
Creates options and, where the custom select field is of the type Select List (cascading), cascading options for a custom select field. The options are added to the global context of the field.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
Permissions required: Administer Jira global permission.
atlassian_jira.createCustomFieldOptions({
"fieldId": 0,
"body": {}
}, context)
Input
- input
object
- fieldId required
integer
: The ID of the custom field. Note: This is the numeric part of the of the field ID. For example, for a field with the ID customfield_10075 use 10075. - body required BulkCreateCustomFieldOptionRequest
- fieldId required
Output
- output
object
updateCustomFieldOptions
Updates the options on a custom select field. Where an updated option is in use on an issue, the value on the issue is also updated. Options that are not found are ignored. A maximum of 1000 options, including sub-options of Select List (cascading) fields, can be updated per request. The options are updated on the global context of the field.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
Permissions required: Administer Jira global permission.
atlassian_jira.updateCustomFieldOptions({
"fieldId": 0,
"body": {}
}, context)
Input
- input
object
- fieldId required
integer
: The ID of the custom field. Note: This is the numeric part of the of the field ID. For example, for a field with the ID customfield_10075 use 10075. - body required UpdateCustomFieldOption
- fieldId required
Output
- output
object
getCustomFieldOption
Returns a custom field option. For example, an option in a select list.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
This operation can be accessed anonymously.
Permissions required: The custom field option is returned as follows:
- if the user has the Administer Jira global permission.
- if the user has the Browse projects project permission for at least one project the custom field is used in, and the field is visible in at least one layout the user has permission to view.
atlassian_jira.getCustomFieldOption({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the custom field option.
- id required
Output
- output CustomFieldOption
getAllDashboards
Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards.
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getAllDashboards({}, context)
Input
- input
object
- filter
string
(values: my, favourite): The filter applied to the list of dashboards. Valid values are: - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- filter
Output
- output PageOfDashboards
createDashboard
Creates a dashboard.
Permissions required: None.
atlassian_jira.createDashboard({
"body": {
"name": "",
"sharePermissions": []
}
}, context)
Input
- input
object
- body required DashboardDetails
Output
- output Dashboard
getDashboardsPaginated
Returns a paginated list of dashboards. This operation is similar to Get dashboards except that the results can be refined to include dashboards that have specific attributes. For example, dashboards with a particular name. When multiple attributes are specified only filters matching all attributes are returned.
This operation can be accessed anonymously.
Permissions required: The following dashboards that match the query parameters are returned:
- Dashboards owned by the user. Not returned for anonymous users.
- Dashboards shared with a group that the user is a member of. Not returned for anonymous users.
- Dashboards shared with a private project that the user can browse. Not returned for anonymous users.
- Dashboards shared with a public project.
- Dashboards shared with the public.
atlassian_jira.getDashboardsPaginated({}, context)
Input
- input
object
- dashboardName
string
: String used to perform a case-insensitive partial match withname
. - accountId
string
: User account ID used to return dashboards with the matchingowner.accountId
. This parameter cannot be used with theowner
parameter. - owner
string
: This parameter is deprecated because of privacy changes. UseaccountId
instead. See the migration guide for details. User name used to return dashboards with the matchingowner.name
. This parameter cannot be used with theaccountId
parameter. - groupname
string
: Group name used to returns dashboards that are shared with a group that matchessharePermissions.group.name
. - projectId
integer
: Project ID used to returns dashboards that are shared with a project that matchessharePermissions.project.id
. - orderBy
string
(values: description, -description, +description, favorite_count, -favorite_count, +favorite_count, id, -id, +id, is_favorite, -is_favorite, +is_favorite, name, -name, +name, owner, -owner, +owner): Order the results by a field: - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page. - expand
string
: Use expand to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include:
- dashboardName
Output
- output PageBeanDashboard
getDashboardItemPropertyKeys
Returns the keys of all properties for a dashboard item.
This operation can be accessed anonymously.
Permissions required: The user must be the owner of the dashboard or be shared the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.
atlassian_jira.getDashboardItemPropertyKeys({
"dashboardId": "",
"itemId": ""
}, context)
Input
- input
object
- dashboardId required
string
: The ID of the dashboard. - itemId required
string
: The ID of the dashboard item.
- dashboardId required
Output
- output PropertyKeys
deleteDashboardItemProperty
Deletes a dashboard item property.
This operation can be accessed anonymously.
Permissions required: The user must be the owner of the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard.
atlassian_jira.deleteDashboardItemProperty({
"dashboardId": "",
"itemId": "",
"propertyKey": ""
}, context)
Input
- input
object
- dashboardId required
string
: The ID of the dashboard. - itemId required
string
: The ID of the dashboard item. - propertyKey required
string
: The key of the dashboard item property.
- dashboardId required
Output
Output schema unknown
getDashboardItemProperty
Returns the key and value of a dashboard item property.
A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see Adding and customizing gadgets.
When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see Building a dashboard item for a JIRA Connect add-on and the Dashboard Item documentation.
There is no resource to set or get dashboard items.
This operation can be accessed anonymously.
Permissions required: The user must be the owner of the dashboard or be shared the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.
atlassian_jira.getDashboardItemProperty({
"dashboardId": "",
"itemId": "",
"propertyKey": ""
}, context)
Input
- input
object
- dashboardId required
string
: The ID of the dashboard. - itemId required
string
: The ID of the dashboard item. - propertyKey required
string
: The key of the dashboard item property.
- dashboardId required
Output
- output EntityProperty
setDashboardItemProperty
Sets the value of a dashboard item property. Use this resource in apps to store custom data against a dashboard item.
A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see Adding and customizing gadgets.
When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see Building a dashboard item for a JIRA Connect add-on and the Dashboard Item documentation.
There is no resource to set or get dashboard items.
The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.
This operation can be accessed anonymously.
Permissions required: The user must be the owner of the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard.
atlassian_jira.setDashboardItemProperty({
"dashboardId": "",
"itemId": "",
"propertyKey": "",
"body": null
}, context)
Input
- input
object
- dashboardId required
string
: The ID of the dashboard. - itemId required
string
: The ID of the dashboard item. - propertyKey required
string
: The key of the dashboard item property. The maximum length is 255 characters.
- dashboardId required
Output
- output
object
deleteDashboard
Deletes a dashboard.
Permissions required: None
The dashboard to be deleted must be owned by the user.
atlassian_jira.deleteDashboard({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the dashboard.
- id required
Output
Output schema unknown
getDashboard
Returns a dashboard.
This operation can be accessed anonymously.
Permissions required: None.
However, to get a dashboard, the dashboard must be shared with the user or the user must own it. Note, users with the Administer Jira global permission are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.
atlassian_jira.getDashboard({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID of the dashboard.
- id required
Output
- output Dashboard
updateDashboard
Updates a dashboard, replacing all the dashboard details with those provided.
Permissions required: None
The dashboard to be updated must be owned by the user.
atlassian_jira.updateDashboard({
"id": "",
"body": {
"name": "",
"sharePermissions": []
}
}, context)
Input
- input
object
- id required
string
: The ID of the dashboard to update. - body required DashboardDetails
- id required
Output
- output Dashboard
copyDashboard
Copies a dashboard. Any values provided in the dashboard
parameter replace those in the copied dashboard.
Permissions required: None
The dashboard to be copied must be owned by or shared with the user.
atlassian_jira.copyDashboard({
"id": "",
"body": {
"name": "",
"sharePermissions": []
}
}, context)
Input
- input
object
- id required
string
- body required DashboardDetails
- id required
Output
- output Dashboard
analyseExpression
Analyses and validates Jira expressions.
As an experimental feature, this operation can also attempt to type-check the expressions.
Learn more about Jira expressions in the documentation.
Permissions required: None.
atlassian_jira.analyseExpression({
"body": {
"expressions": []
}
}, context)
Input
- input
object
- check
string
(values: syntax, type, complexity): The check to perform: - body required JiraExpressionForAnalysis
- check
Output
- output JiraExpressionsAnalysis
evaluateJiraExpression
Evaluates a Jira expression and returns its value.
This resource can be used to test Jira expressions that you plan to use elsewhere, or to fetch data in a flexible way. Consult the Jira expressions documentation for more details.
Context variables
The following context variables are available to Jira expressions evaluated by this resource. Their presence depends on various factors; usually you need to manually request them in the context object sent in the payload, but some of them are added automatically under certain conditions.
user
(User): The current user. Always available and equal tonull
if the request is anonymous.app
(App): The Connect app that made the request. Available only for authenticated requests made by Connect Apps (read more here: Authentication for Connect apps).issue
(Issue): The current issue. Available only when the issue is provided in the request context object.issues
(List of Issues): A collection of issues matching a JQL query. Available only when JQL is provided in the request context object.project
(Project): The current project. Available only when the project is provided in the request context object.sprint
(Sprint): The current sprint. Available only when the sprint is provided in the request context object.board
(Board): The current board. Available only when the board is provided in the request context object.serviceDesk
(ServiceDesk): The current service desk. Available only when the service desk is provided in the request context object.customerRequest
(CustomerRequest): The current customer request. Available only when the customer request is provided in the request context object.
This operation can be accessed anonymously.
Permissions required: None. However, an expression may return different results for different users depending on their permissions. For example, different users may see different comments on the same issue.
Permission to access Jira Software is required to access Jira Software context variables (board
and sprint
) or fields (for example, issue.sprint
).
atlassian_jira.evaluateJiraExpression({
"body": {
"expression": ""
}
}, context)
Input
- input
object
- expand
string
: Use expand to include additional information in the response. This parameter acceptsmeta.complexity
that returns information about the expression complexity. For example, the number of expensive operations used by the expression and how close the expression is to reaching the complexity limit. Useful when designing and debugging your expressions. - body required JiraExpressionEvalRequestBean
- expand
Output
- output JiraExpressionResult
getFields
Returns system and custom issue fields according to the following rules:
- Fields that cannot be added to the issue navigator are always returned.
- Fields that cannot be placed on an issue screen are always returned.
- Fields that depend on global Jira settings are only returned if the setting is enabled. That is, timetracking fields, subtasks, votes, and watches.
- For all other fields, this operation only returns the fields that the user has permission to view (that is, the field is used in at least one project that the user has Browse Projects project permission for.)
This operation can be accessed anonymously.
Permissions required: None.
atlassian_jira.getFields(null, context)
Input
This action has no parameters
Output
- output
array
- items FieldDetails
createCustomField
Creates a custom field.
Permissions required: Administer Jira global permission.
atlassian_jira.createCustomField({
"body": {
"name": "",
"searcherKey": "",
"type": ""
}
}, context)
Input
- input
object
- body required CustomFieldDefinitionJsonBean
Output
- output FieldDetails
getFieldsPaginated
Returns a paginated list of fields for Classic Jira projects. The list can include:
- all fields.
- specific fields, by defining
id
. - fields that contain a string in the field name or description, by defining
query
. - specific fields that contain a string in the field name or description, by defining
id
andquery
.
Only custom fields can be queried, type
must be set to custom
.
Permissions required: Administer Jira global permission.
atlassian_jira.getFieldsPaginated({}, context)
Input
- input
object
- startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page. - type
array
: The type of fields to search. - id
array
: The IDs of the custom fields to return or, wherequery
is specified, filter. - query
string
: String used to perform a case-insensitive partial match with field names or descriptions. - orderBy
string
(values: contextsCount, -contextsCount, +contextsCount, lastUsed, -lastUsed, +lastUsed, name, -name, +name, screensCount, -screensCount, +screensCount): Order the results by a field: - expand
string
: Use expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:
- startAt
Output
- output PageBeanField
getContextsForField
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.
atlassian_jira.getContextsForField({
"fieldId": ""
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - isAnyIssueType
boolean
: Whether to return contexts that apply to all issue types. - isGlobalContext
boolean
: Whether to return contexts that apply to all projects. - contextId
array
: The list of context IDs. To include multiple contexts, separate IDs with ampersand:contextId=10000&contextId=10001
. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- fieldId required
Output
- output PageBeanCustomFieldContext
createCustomFieldContext
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.
atlassian_jira.createCustomFieldContext({
"fieldId": "",
"body": {
"name": ""
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - body required CreateCustomFieldContext
- fieldId required
Output
- output CreateCustomFieldContext
getCustomFieldContextsForProjectsAndIssueTypes
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.
atlassian_jira.getCustomFieldContextsForProjectsAndIssueTypes({
"fieldId": "",
"body": {
"mappings": []
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page. - body required ProjectIssueTypeMappings
- fieldId required
Output
deleteCustomFieldContext
Deletes a custom field context.
Permissions required: Administer Jira global permission.
atlassian_jira.deleteCustomFieldContext({
"fieldId": "",
"contextId": 0
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context.
- fieldId required
Output
- output
object
updateCustomFieldContext
Updates a custom field context.
Permissions required: Administer Jira global permission.
atlassian_jira.updateCustomFieldContext({
"fieldId": "",
"contextId": 0,
"body": {}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required CustomFieldContextUpdateDetails
- fieldId required
Output
- output
object
addIssueTypesToContext
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.
atlassian_jira.addIssueTypesToContext({
"fieldId": "",
"contextId": 0,
"body": {
"issueTypeIds": []
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required IssueTypeIds
- fieldId required
Output
- output
object
getOptionsForContext
Returns a paginated list of all custom field option for a context. Options are returned first then cascading options, in the order they display in Jira.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
atlassian_jira.getOptionsForContext({
"fieldId": "",
"contextId": 0
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - optionId
integer
: The ID of the option. - onlyOptions
boolean
: Whether only options are returned. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- fieldId required
Output
createCustomFieldOption
Creates options and, where the custom select field is of the type Select List (cascading), cascading options for a custom select field. The options are added to a context of the field.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
atlassian_jira.createCustomFieldOption({
"fieldId": "",
"contextId": 0,
"body": {}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required BulkCustomFieldOptionCreateRequest
- fieldId required
Output
updateCustomFieldOption
Updates the options of a custom field.
If any of the options are not found, no options are updated. Options where the values in the request match the current values aren't updated and aren't reported in the response.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
Permissions required: Administer Jira global permission.
atlassian_jira.updateCustomFieldOption({
"fieldId": "",
"contextId": 0,
"body": {}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required BulkCustomFieldOptionUpdateRequest
- fieldId required
Output
reorderCustomFieldOptions
Changes the order of custom field options or cascading options in a context.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
atlassian_jira.reorderCustomFieldOptions({
"fieldId": "",
"contextId": 0,
"body": {
"customFieldOptionIds": []
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required OrderOfCustomFieldOptions
- fieldId required
Output
- output
object
deleteCustomFieldOption
Deletes a custom field option.
Options with cascading options cannot be deleted without deleting the cascading options first.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
atlassian_jira.deleteCustomFieldOption({
"fieldId": "",
"contextId": 0,
"optionId": 0
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context from which an option should be deleted. - optionId required
integer
: The ID of the option to delete.
- fieldId required
Output
Output schema unknown
assignProjectsToCustomFieldContext
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.
atlassian_jira.assignProjectsToCustomFieldContext({
"fieldId": "",
"contextId": 0,
"body": {
"projectIds": []
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required ProjectIds
- fieldId required
Output
- output
object
removeCustomFieldContextFromProjects
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.
atlassian_jira.removeCustomFieldContextFromProjects({
"fieldId": "",
"contextId": 0,
"body": {
"projectIds": []
}
}, context)
Input
- input
object
- fieldId required
string
: The ID of the custom field. - contextId required
integer
: The ID of the context. - body required ProjectIds
- fieldId required
Output
- output
object
getContextsForFieldDeprecated
Returns a paginated list of the contexts a field is used in. Deprecated, use Get custom field contexts.
Permissions required: Administer Jira global permission.
atlassian_jira.getContextsForFieldDeprecated({
"fieldId": ""
}, context)
Input
- input
object
- fieldId required
string
: The ID of the field to return contexts for. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- fieldId required
Output
- output PageBeanContext
getScreensForField
Returns a paginated list of the screens a field is used in.
Permissions required: Administer Jira global permission.
atlassian_jira.getScreensForField({
"fieldId": ""
}, context)
Input
- input
object
- fieldId required
string
: The ID of the field to return screens for. - startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page.
- fieldId required
Output
- output PageBeanScreen
getAllIssueFieldOptions
Returns a paginated list of all the options of a select list issue field. A select list issue field is a type of issue field that enables a user to select a value from a list of options.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
atlassian_jira.getAllIssueFieldOptions({
"fieldKey": ""
}, context)
Input
- input
object
- startAt
integer
: The index of the first item to return in a page of results (page offset). - maxResults
integer
: The maximum number of items to return per page. - fieldKey required
string
: The field key is specified in the following format: $(app-key)__$(field-key). For example, example-add-on__example-issue-field. To determine thefieldKey
value, do one of the following:
- startAt
Output
- output PageBeanIssueFieldOption
createIssueFieldOption
Creates an option for a select list issue field.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
atlassian_jira.createIssueFieldOption({
"fiel
5 years ago