Hello Team,
I am using Jira 8.21 Data center.
In the java program, With the help of Jira API, I try to use the POST method and login into Jira using a username and password. At the same time, I wanted to pass JSON data.
I am not able to do both the things same time. Please Help.
Hello,
Can you post an example of your HTTP request? And does it work with anbother tool like curl, powershell, postman, ...? Or do you only have the issue in java.
For the authorization: make sure you use a personal access token with the Bearer authorization header. An example can be found on this page: Using Personal Access Tokens
Here's a copy:
curl -H "Authorization: Bearer <yourToken>" https://{baseUrlOfYourInstance}/rest/api/content
kind regards,
Charlie
Thanks for your response. I am using postman for posting requests.
Based on the information provided by you just wanted to know what do we need to pass against "token name" in the JSON body.
{{baseUrlOfYourInstance}}/rest/pat/latest/tokens{
"name": "tokenName",
"expirationDuration": 90
}Kindly provide an example using postman similar to the one you posted using CURL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.