Tips and FAQ

JIRA - Querying of Nested fields in /incidents Resource

 In Jira, if we have to query nested fields such as Project Key/ Name/ Id in the incidents resource, we need to query the project field directly which is an advanced search field.

In the below sample payload, project key is TP, if we need to get list of incidents with Project Key : TP then we can directly query Get /incidents with Where clause project='TP' 

Here is the snapshot for reference : 


For more information, see the JIRA documentation on the Advanced search field querying.

 

JIRA - What are Jira Usernames and how do I find them?

When retrieving contacts, Jira requires a username query. What is a Jira username?

Jira has a concept of a username that is based on the name field of the user posted in a contacts payload.

For example, if I posted a contact with the following json:

{
    "name": "Jme",
    "password": "abracadabra",
    "emailAddress": "jme@atlassian.com",
    "displayName": "jme of Atlassian"

}

The user name would be "Jme" or the name of the user/contact posted. In this case for a call to /GET contacts the query field would look like

where username='Jme'

Because there is no username in the post payload it is not always obvious how to query for this contact. For this reason, we inserted a "username" field in the response body from the post call.



JIRA - Authenticating when your Jira user identity is through Google

If you click the Log in with Google button in order to sign in to Jira or if you otherwise know that your Jira user identity is provider through Google, you must use an API token to authenticate the Jira instead of your user password.

To generate an API token, follow these steps:

  1. Sign in to your Jira account, and then navigate to https://id.atlassian.com/manage/api-tokens.
  2. On the API Tokens page, click Create API Token. 
  3. In the Label field, enter a name for your token, and then click Create.
  4. Click Copy to Clipboard and record the copied value, or click View and copy the token value.

When you authenticate an instance of the Jira element, use the API token as your password. If you lose track of or did not copy your token, it cannot be retrieved and you will need to create a new token.