Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira REST API Username

I'm calling the Jira REST API using Basic Authentication. However, various online articles indicate the "username" is not my login email address. It appears my actual "username" is not presented anywhere in the Jira UI or Atlassian Account management UI. 

How is one supposed to query the REST API without knowing their username? Can this be provided by Jira Support?

To reproduce:

Using a simple PowerShell script on Windows 10 to enter my email and password. I also tried using just the account part of the email (the part before "@") and my full display  name (various formats). The credential object is used with a simple PowerShell cmdlet named "Invoke-RestMethod". This looks very similar to the cUrl examples in the official documentation for the REST API.

$cred = get-credential

invoke-restmethod -Uri '' -Method Get -Credential $cred -ContentType "application/json"


I can confirm the URI string returns JSON results when I am logged into the Jira website with my account and paste it into an empty browser window. This appears to be some case where I do not have a correct username.


invoke-restmethod : The remote server returned an error: (404) Not Found.
At line:1 char:1
+ invoke-restmethod -Uri ' ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand


For Reference:

2 answers

1 accepted

0 votes
Answer accepted

Hi Ed,

To query the REST API for Jira Cloud, you should be using a REST API token. 

Follow the instructions here to generate a token -

As you're on Cloud, the second last link you posted should be as some of the endpoints are different.

Hope that helps,
- Jimmy

0 votes


Suggest an answer

Log in or Sign up to answer