I need to create an issue in my JSM project based on some triggers in a 3rd party app, Fresh Service. I'm an admin in Jira and Fresh Service.
I can do all the stuff I need to do in Fresh Service except for getting a 200 back from the REST API.
I'm trying to hit https://decisionlogic.atlassian.net/rest/api/3/issue from Fresh Service using an API Token created specifically for this purpose, but I get a 401 Unauthorized back from Jira. If I switch to using my username and password, I get a 403 back from Jira.
Is the above URL the correct one? If not, how do I find out what I should be using? If so, any thoughts about what I'm doing wrong? I can successfully hit that endpoint and create an issue using Postman using this payload:
{ "fields": { "summary": "Testing Ticket 1", "issuetype": { "id": "10706" }, "project": { "key": "DLS" }, "description": [ "This is the test description." ] }, "labels": [ "sales_forecasting" ] }
It doesn't add the label I need, but that may just be my inexperience writing requests.
Thank you!
Hi @Drew Nedderman,
Let's focus on the 1st problem which is to create a Jira issue from Fresh Service. I'm not well versed with Fresh Service, so you might need to help me with this.
The fact that you are testing the API calls on Postman indicates that you are on the right path here. If you are able to use Postman to create a Jira issue - this means you have connected all the dots here.
From the REST API doc:
The recommended way is to use the API token - just to make sure you are have tested the correct combination, can I know if you have tested the API token via Postman and it works?
If yes, then it might be something to do with the Fresh Service configuration.
Thanks,
Moga
I'm having some trouble creating the issue using the API token in Postman. I'm using the same payload as in my original question but I'm getting this error and a 400 Bad Request when sending the request:
{ "errorMessages": [], "errors": { "summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.", "description": "Field 'description' cannot be set. It is not on the appropriate screen, or unknown." }}
I've tried using API Key and Bearer Token as the authorization type and I get the same error each time.
Your note about the 401 and 403 response codes is interesting, but I have admin and project admin permissions in the project I'm using to create the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Drew Nedderman,
Please try this payload, I hope that Description is not a mandatory field:
{
"fields": {
"summary": "Testing Ticket 1",
"issuetype": {
"id": "10706"
},
"project": {
"key": "DLS"
}
}
}
Just to make sure we are not missing out on anything, are you able to create an issue on the DLS project with the same issue type?
The user account will need to have the Create Issue permission on the DLS project in order to be able to create an issue under the Project.
Thanks,
Moga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mogavenasan thank you for your help so far. When using that payload I get:
{ "errorMessages": [], "errors": { "summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown." }}
I'm the project admin, so yet I am able to create issues in the DLS project. The error message above doesn't make sense to me because the field is on the create and edit screens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Drew Nedderman, would it be possible for you to share some screenshots of how you are running the API call on the Postman? You can grey out the credentials.
Thanks,
Moga
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.
Hi @Drew Nedderman,
I can think of 2 items here:
I hope that this will solve the issue here.
Thanks,
Moga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mogavenasan
I can confirm that I used the page you linked above to create the API token.
I reviewed the thread you posted and I'm now able to create issues using the API token from Postman with Basic Auth.
I still can't create issues using the Fresh Service call to https://decisionlogic.atlassian.net/rest/api/3/issue when using the same method as in Postman, with my username and my API token as the password. I get a 403.
I've also tried using my Jira credentials as the username and password, but I get a 403.
I've contacted Fresh Service support to help with this.
Thank you very much for your help with this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Heya @Drew Nedderman,
Yeap, that is a very good place to reach out to their support - we have verified the API call and it works on Postman.
Glad to know I can help. Please mark this thread as Solved.
Thanks,
Moga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.