UNPKG

@itentialopensource/adapter-jira

Version:

This adapter integrates with system Jira

780 lines (657 loc) 874 kB
## Using this Adapter The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls. ### Generic Adapter Calls These are adapter methods that IAP or you might use. There are some other methods not shown here that might be used for internal adapter functionality. <table border="1" class="bordered-table"> <tr> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th> </tr> <tr> <td style="padding:15px">connect()</td> <td style="padding:15px">This call is run when the Adapter is first loaded by he Itential Platform. It validates the properties have been provided correctly.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">healthCheck(callback)</td> <td style="padding:15px">This call ensures that the adapter can communicate with Adapter for Atlassian Jira. The actual call that is used is defined in the adapter properties and .system entities action.json file.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">refreshProperties(properties)</td> <td style="padding:15px">This call provides the adapter the ability to accept property changes without having to restart the adapter.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">encryptProperty(property, technique, callback)</td> <td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Adapter for Atlassian Jira.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback)</td> <td style="padding:15px">This call provides the ability to update the adapter configuration from IAP - includes actions, schema, mockdata and other configurations.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapSuspendAdapter(mode, callback)</td> <td style="padding:15px">This call provides the ability to suspend the adapter and either have requests rejected or put into a queue to be processed after the adapter is resumed.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapUnsuspendAdapter(callback)</td> <td style="padding:15px">This call provides the ability to resume a suspended adapter. Any requests in queue will be processed before new requests.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapGetAdapterQueue(callback)</td> <td style="padding:15px">This call will return the requests that are waiting in the queue if throttling is enabled.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapFindAdapterPath(apiPath, callback)</td> <td style="padding:15px">This call provides the ability to see if a particular API path is supported by the adapter.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapTroubleshootAdapter(props, persistFlag, adapter, callback)</td> <td style="padding:15px">This call can be used to check on the performance of the adapter - it checks connectivity, healthcheck and basic get calls.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRunAdapterHealthcheck(adapter, callback)</td> <td style="padding:15px">This call will return the results of a healthcheck.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRunAdapterConnectivity(callback)</td> <td style="padding:15px">This call will return the results of a connectivity check.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRunAdapterBasicGet(callback)</td> <td style="padding:15px">This call will return the results of running basic get API calls.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapMoveAdapterEntitiesToDB(callback)</td> <td style="padding:15px">This call will push the adapter configuration from the entities directory into the Adapter or IAP Database.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapDeactivateTasks(tasks, callback)</td> <td style="padding:15px">This call provides the ability to remove tasks from the adapter.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapActivateTasks(tasks, callback)</td> <td style="padding:15px">This call provides the ability to add deactivated tasks back into the adapter.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback)</td> <td style="padding:15px">This is an expanded Generic Call. The metadata object allows us to provide many new capabilities within the generic request.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td> <td style="padding:15px">This call allows you to provide the path to have the adapter call. It is an easy way to incorporate paths that have not been built into the adapter yet.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td> <td style="padding:15px">This call is the same as the genericAdapterRequest only it does not add a base_path or version to the call.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRunAdapterLint(callback)</td> <td style="padding:15px">Runs lint on the addapter and provides the information back.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRunAdapterTests(callback)</td> <td style="padding:15px">Runs baseunit and unit tests on the adapter and provides the information back.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapGetAdapterInventory(callback)</td> <td style="padding:15px">This call provides some inventory related information about the adapter.</td> <td style="padding:15px">Yes</td> </tr> </table> <br> ### Adapter Cache Calls These are adapter methods that are used for adapter caching. If configured, the adapter will cache based on the interval provided. However, you can force a population of the cache manually as well. <table border="1" class="bordered-table"> <tr> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th> </tr> <tr> <td style="padding:15px">iapPopulateEntityCache(entityTypes, callback)</td> <td style="padding:15px">This call populates the adapter cache.</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">iapRetrieveEntitiesCache(entityType, options, callback)</td> <td style="padding:15px">This call retrieves the specific items from the adapter cache.</td> <td style="padding:15px">Yes</td> </tr> </table> <br> ### Adapter Broker Calls These are adapter methods that are used to integrate to IAP Brokers. This adapter currently supports the following broker calls. <table border="1" class="bordered-table"> <tr> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th> </tr> <tr> <td style="padding:15px">hasEntities(entityType, entityList, callback)</td> <td style="padding:15px">This call is utilized by the IAP Device Broker to determine if the adapter has a specific entity and item of the entity.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">getDevice(deviceName, callback)</td> <td style="padding:15px">This call returns the details of the requested device.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">getDevicesFiltered(options, callback)</td> <td style="padding:15px">This call returns the list of devices that match the criteria provided in the options filter.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">isAlive(deviceName, callback)</td> <td style="padding:15px">This call returns whether the device status is active</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">getConfig(deviceName, format, callback)</td> <td style="padding:15px">This call returns the configuration for the selected device.</td> <td style="padding:15px">No</td> </tr> <tr> <td style="padding:15px">iapGetDeviceCount(callback)</td> <td style="padding:15px">This call returns the count of devices.</td> <td style="padding:15px">No</td> </tr> </table> <br> ### Specific Adapter Calls Specific adapter calls are built based on the API of the Atlassian Jira. The Adapter Builder creates the proper method comments for generating JS-DOC for the adapter. This is the best way to get information on the calls. <table border="1" class="bordered-table"> <tr> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Path</span></th> <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th> </tr> <tr> <td style="padding:15px">getRestapi2applicationrole(callback)</td> <td style="padding:15px">Returns all application roles. In Jira, application roles are managed using the [Application access configuration](https://confluence.atlassian.com/x/3YxjL) page. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/applicationrole?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2applicationrolekey(key, callback)</td> <td style="padding:15px">Returns an application role. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/applicationrole/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2auditingrecord(offset, limit, filter, from, to, callback)</td> <td style="padding:15px">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](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/auditing/record?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2dashboard(filter, startAt, maxResults, callback)</td> <td style="padding:15px">Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/dashboard?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2dashboardsearch(dashboardName, accountId, owner, groupname, projectId, orderBy, startAt, maxResults, expand, callback)</td> <td style="padding:15px">Searches for dashboards. This operation is similar to [Get dashboards](#api-api-2-dashboard-get) 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. **[Permissions](#permissions) required:** None, however, only 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.</td> <td style="padding:15px">{base_path}/{version}/dashboard/search?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2dashboarddashboardIditemsitemIdproperties(dashboardId, itemId, callback)</td> <td style="padding:15px">Returns the keys of all properties for a dashboard item. **[Permissions](#permissions) required:** Permission to access Jira. However, to get the property keys the user must be the owner of the dashboard or be shared the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.</td> <td style="padding:15px">{base_path}/{version}/dashboard/{pathv1}/items/{pathv2}/properties?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2dashboarddashboardIditemsitemIdpropertiespropertyKey(dashboardId, itemId, propertyKey, callback)</td> <td style="padding:15px">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](https://confluence.atlassian.com/x/7AeiLQ). 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](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. **[Permissions](#permissions) required:** Permission to access Jira. However, to get a dashboard item property the user must be the owner of the dashboard or be shared the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.</td> <td style="padding:15px">{base_path}/{version}/dashboard/{pathv1}/items/{pathv2}/properties/{pathv3}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2dashboarddashboardIditemsitemIdpropertiespropertyKey(dashboardId, itemId, propertyKey, body, callback)</td> <td style="padding:15px">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](https://confluence.atlassian.com/x/7AeiLQ). 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](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. **[Permissions](#permissions) required:** Permission to access Jira. However, to set a dashboard item property the user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard.</td> <td style="padding:15px">{base_path}/{version}/dashboard/{pathv1}/items/{pathv2}/properties/{pathv3}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2dashboarddashboardIditemsitemIdpropertiespropertyKey(dashboardId, itemId, propertyKey, callback)</td> <td style="padding:15px">Deletes a dashboard item property. **[Permissions](#permissions) required:** Permission to access Jira. However, to delete a dashboard item property the user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard.</td> <td style="padding:15px">{base_path}/{version}/dashboard/{pathv1}/items/{pathv2}/properties/{pathv3}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2dashboardid(id, callback)</td> <td style="padding:15px">Returns a dashboard. **[Permissions](#permissions) required:** Permission to access Jira. 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](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users.</td> <td style="padding:15px">{base_path}/{version}/dashboard/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filter(expand, callback)</td> <td style="padding:15px">Returns all filters. Deprecated, use [ Search for filters](#api-api-2-filter-search-get) that supports search and pagination. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">postRestapi2filter(expand, body, callback)</td> <td style="padding:15px">Creates a filter. The filter is shared according to the [default share scope](#api-api-2-filter-post). The filter is not selected as a favorite. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/filter?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filterfavourite(expand, callback)</td> <td style="padding:15px">Returns the visible favorite filters of the user. **[Permissions](#permissions) required:** Permission to access Jira, however, a favorite filters is only visible to the user where the filter is: * owned by the user. * shared with a group that the user is a member of. * shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * shared with a public project. * shared with the public. For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation.</td> <td style="padding:15px">{base_path}/{version}/filter/favourite?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filtermy(expand, includeFavourites, callback)</td> <td style="padding:15px">Returns the filters owned by the user. If `includeFavourites` is `true`, the user's visible favorite filters are also returned. **[Permissions](#permissions) required:** Permission to access Jira, however, a favorite filters is only visible to the user where the filter is: * owned by the user. * shared with a group that the user is a member of. * shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * shared with a public project. * shared with the public. For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation.</td> <td style="padding:15px">{base_path}/{version}/filter/my?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filtersearch(filterName, accountId, owner, groupname, projectId, orderBy, startAt, maxResults, expand, callback)</td> <td style="padding:15px">Searches for filters. This operation is similar to [Get filters](#api-api-2-filter-get) except that the results can be refined to include filters that have specific attributes. For example, filters with a particular name. When multiple attributes are specified only filters matching all attributes are returned. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following filters that match the query parameters are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/search?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filterid(id, expand, callback)</td> <td style="padding:15px">Returns a filter. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2filterid(id, expand, body, callback)</td> <td style="padding:15px">Updates a filter. Use this operation to update a filter's name, description, JQL, or sharing. **[Permissions](#permissions) required:** Permission to access Jira, however the user must own the filter.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2filterid(id, callback)</td> <td style="padding:15px">Delete a filter. **[Permissions](#permissions) required:** Permission to access Jira, however filters can only be deleted by the creator of the filter or a user with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filteridcolumns(id, callback)</td> <td style="padding:15px">Returns the columns configured for a filter. The column configuration is used when the filter's results are viewed in *List View* with the *Columns* set to *Filter*. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/columns?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2filteridcolumns(id, body, callback)</td> <td style="padding:15px">Sets the columns for a filter. Only navigable fields can be set as columns. Use [Get fields](#api-api-2-field-get) to get the list fields in Jira. A navigable field has `navigable` set to `true`. The parameters for this resource are expressed as HTML form data. For example, in curl: `curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/2/filter/10000/columns` **[Permissions](#permissions) required:** Permission to access Jira, however, columns are only set for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/columns?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2filteridcolumns(id, callback)</td> <td style="padding:15px">Reset the user's column configuration for the filter to the default. **[Permissions](#permissions) required:** Permission to access Jira, however, columns are only reset for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/columns?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2filteridfavourite(id, expand, callback)</td> <td style="padding:15px">Add a filter as a favorite for the user. **[Permissions](#permissions) required:** Permission to access Jira, however, the user can only favorite: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/favourite?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2filteridfavourite(id, expand, callback)</td> <td style="padding:15px">Removes a filter as a favorite for the user. Note that this operation only removes filters visible to the user from the user's favorites list. For example, if the user favorites a public filter that is subsequently made private (and is therefore no longer visible on their favorites list) they cannot remove it from their favorites list. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/favourite?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filterdefaultShareScope(callback)</td> <td style="padding:15px">Returns the default sharing settings for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/filter/defaultShareScope?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2filterdefaultShareScope(body, callback)</td> <td style="padding:15px">Sets the default sharing for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/filter/defaultShareScope?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filteridpermission(id, callback)</td> <td style="padding:15px">Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/permission?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">postRestapi2filteridpermission(id, body, callback)</td> <td style="padding:15px">Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter. Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-api-2-filter-id-put). **[Permissions](#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/permission?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2filteridpermissionpermissionId(id, permissionId, callback)</td> <td style="padding:15px">Returns a share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. **[Permissions](#permissions) required:** Permission to access Jira, however, only the following are returned: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/permission/{pathv2}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2filteridpermissionpermissionId(id, permissionId, callback)</td> <td style="padding:15px">Deletes a share permission from a filter. **[Permissions](#permissions) required:** Permission to access Jira and the user must own the filter.</td> <td style="padding:15px">{base_path}/{version}/filter/{pathv1}/permission/{pathv2}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2settingscolumns(callback)</td> <td style="padding:15px">Returns the default issue navigator columns. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/settings/columns?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2settingscolumns(body, callback)</td> <td style="padding:15px">Sets the default issue navigator columns. The `columns` parameter accepts a navigable field value and is expressed as HTML form data. To specify multiple columns, pass multiple `columns` parameters. For example, in curl: `curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/2/settings/columns` If no column details are sent, then all default columns are removed. A navigable field is one that can be used as a column on the issue navigator. Find details of navigable issue columns using [Get fields](#api-api-2-field-get). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/settings/columns?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2notificationscheme(startAt, maxResults, expand, callback)</td> <td style="padding:15px">Returns a [paginated](#pagination) list of [notification schemes](https://confluence.atlassian.com/x/8YdKLg) in order by display name. ### About notification schemes ### A notification scheme is a list of events and recipients who will receive notifications for those events. The list is contained within the `notificationSchemeEvents` object and contains pairs of `events` and `notifications`: * `event` Identifies the type of event. The events can be [Jira system events](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-eventsEvents) or [custom events](https://confluence.atlassian.com/x/AIlKLg). * `notifications` Identifies the [recipients](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-recipientsRecipients) of notifications for each event. Recipients can be any of the following types: * `CurrentAssignee` * `Reporter` * `CurrentUser` * `ProjectLead` * `ComponentLead` * `User` (the `parameter` is the user key) * `Group` (the `parameter` is the group name) * `ProjectRole` (the `parameter` is the project role ID) * `EmailAddress` * `AllWatchers` * `UserCustomField` (the `parameter` is the ID of the custom field) * `GroupCustomField`(the `parameter` is the ID of the custom field) *Note that you should allow for events without recipients to appear in responses.* **[Permissions](#permissions) required:** Permission to access Jira, however the user must have permission to administer at least one project associated with a notification scheme for it to be returned.</td> <td style="padding:15px">{base_path}/{version}/notificationscheme?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2notificationschemeid(id, expand, callback)</td> <td style="padding:15px">Returns a [notification scheme](https://confluence.atlassian.com/x/8YdKLg), including the list of events and the recipients who will receive notifications for those events. **[Permissions](#permissions) required:** Permission to access Jira, however the user must have permission to administer at least one project associated with the notification scheme.</td> <td style="padding:15px">{base_path}/{version}/notificationscheme/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2issuepropertiespropertyKey(propertyKey, body, callback)</td> <td style="padding:15px">Sets a property value on multiple issues. The issues to be updated can be specified by a filter. The filter identifies issues eligible for update using these criteria: * `entityIds` Only issues from this list are eligible. * `currentValue` Only issues with the property set to this value are eligible. * `hasProperty`: * If *true*, only issues with the property are eligible. * If *false*, only issues without the property are eligible. If more than one criteria is specified, they are joined with the logical *AND*: only issues that satisfy all criteria are eligible. If an invalid combination of criteria is provided, an error is returned. For example, specifying a `currentValue` and `hasProperty` as *false* would not match any issues (because without the property the property cannot have a value). The filter is optional. Without the filter all the issues visible to the user and where the user has the EDIT\_ISSUES permission for the issue are considered eligible. This operation is: * transactional, either all eligible issues are updated or, when errors occur, none are updated. * [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-api-2-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for each project containing issues. * If configured, permission to view granted by [issue-level security](https://confluence.atlassian.com/x/J4lKLg) for each issue. * *Edit issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for each issue.</td> <td style="padding:15px">{base_path}/{version}/issue/properties/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2issuepropertiespropertyKey(propertyKey, body, callback)</td> <td style="padding:15px">Deletes a property value from multiple issues. The issues to be updated can be specified by filter criteria. The criteria the filter used to identify eligible issues are: * `entityIds` Only issues from this list are eligible. * `currentValue` Only issues with the property set to this value are eligible. If both criteria is specified, they are joined with the logical *AND*: only issues that satisfy both criteria are considered eligible. If no filter criteria are specified, all the issues visible to the user and where the user has the EDIT\_ISSUES permission for the issue are considered eligible. This operation is: * transactional, either the property is deleted from all eligible issues or, when errors occur, no properties are deleted. * [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-api-2-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** * *Browse projects* [ project permission](https://confluence.atlassian.com/x/yodKLg) for each project containing issues. * If configured, permission to view granted by [issue-level security](https://confluence.atlassian.com/x/J4lKLg) for each issue. * *Edit issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for each issue.</td> <td style="padding:15px">{base_path}/{version}/issue/properties/{pathv1}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2issueissueIdOrKeyproperties(issueIdOrKey, callback)</td> <td style="padding:15px">Returns the URLs and keys of an issue's properties. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If configured, permission to view the issue granted by [ issue-level security](https://confluence.atlassian.com/x/J4lKLg).</td> <td style="padding:15px">{base_path}/{version}/issue/{pathv1}/properties?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2issueissueIdOrKeypropertiespropertyKey(issueIdOrKey, propertyKey, callback)</td> <td style="padding:15px">Returns the key and value of an issue's property. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If configured, permission to view the issue granted by [ issue-level security](https://confluence.atlassian.com/x/J4lKLg).</td> <td style="padding:15px">{base_path}/{version}/issue/{pathv1}/properties/{pathv2}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">putRestapi2issueissueIdOrKeypropertiespropertyKey(issueIdOrKey, propertyKey, body, callback)</td> <td style="padding:15px">Sets the value of an issue's property. Use this resource to store custom data against an issue. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If configured, permission to view the issue granted by [ issue-level security](https://confluence.atlassian.com/x/J4lKLg). * *Edit issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the issue.</td> <td style="padding:15px">{base_path}/{version}/issue/{pathv1}/properties/{pathv2}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">deleteRestapi2issueissueIdOrKeypropertiespropertyKey(issueIdOrKey, propertyKey, callback)</td> <td style="padding:15px">Deletes an issue's property. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If configured, permission to view the issue granted by [ issue-level security](https://confluence.atlassian.com/x/J4lKLg). * *Edit issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the issue.</td> <td style="padding:15px">{base_path}/{version}/issue/{pathv1}/properties/{pathv2}?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2search(jql, startAt, maxResults, validateQuery, fields, expand, properties, fieldsByKeys, callback)</td> <td style="padding:15px">Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). If the JQL query expression is too large to be encoded as a query parameter, use the [POST](#api-api-2-search-post) version of this resource. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/search?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">postRestapi2search(body, callback)</td> <td style="padding:15px">Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). There is a [GET](#api-api-2-search-get) version of this resource that can be used for smaller JQL query expressions. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/search?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2issuepicker(query, currentJQL, currentIssueKey, currentProjectId, showSubTasks, showSubTaskParent, callback)</td> <td style="padding:15px">Returns lists of issues matching a query string. Use this resource to provide auto-completion suggestions when the user is looking for an issue using a word or string. This operation returns two lists: * `History Search` which includes issues from the user's history of created, edited, or viewed issues that contain the string in the `query` parameter. * `Current Search` which includes issues that match the JQL expression in `currentJQL` and contain the string in the `query` parameter. **[Permissions](#permissions) required:** Permission to access Jira.</td> <td style="padding:15px">{base_path}/{version}/issue/picker?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">postRestapi2expressioneval(expand, body, callback)</td> <td style="padding:15px">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](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) 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](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The current user. Always available and equal to `null` if the request is anonymous. * `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The Connect app that made the request. Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect apps](https://developer.atlassian.com/cloud/jira/platform/authentication-for-apps/)). * `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The current issue. Available only when the issue is provided in the request context object. * `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): The current project. Available only when the project is provided in the request context object. * `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): The current sprint. Available only when the sprint is provided in the request context object. * `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The current board. Available only when the board is provided in the request context object. **[Permissions](#permissions) required**: Permission to access Jira. 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`).</td> <td style="padding:15px">{base_path}/{version}/expression/eval?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2applicationProperties(key, permissionLevel, keyFilter, callback)</td> <td style="padding:15px">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](#api-api-2-application-properties-id-put) for descriptions of editable properties. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/application-properties?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr> <td style="padding:15px">getRestapi2applicationPropertiesadvancedSettings(callback)</td> <td style="padding:15px">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](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).</td> <td style="padding:15px">{base_path}/{version}/application-properties/advanced-settings?{query}</td> <td style="padding:15px">Yes</td> </tr> <tr>