I've been trying to create a ticket using the Service Desk API, but I can't get this done.
I'm currently using this with Python:
url='https://penadefillo.atlassian.net/', username='Username', password='password', cloud='True'
I've been trying to use this URL, but have gotten no results: https://penadefillo.atlassian.net/rest/servicedeskapi/servicedesk/{}/requesttype
Pplease, a response would be appreciated, thanks in advance!
Hi @gabriel_silfa,
Welcome to Atlassian Community!
You have to include the service desk ID and the request type ID as part of the body in your request, not in the header.
This is what it looks like if you are using curl
curl --request POST \
--url 'https://your-domain.atlassian.net/rest/servicedeskapi/request' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"serviceDeskId": "10",
"requestTypeId": "25",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}'
Also note that using password as part or your authentication is being deprecated, instead you should create an API token.
Have a look at the REST API documentation for more information.
Hi, sorry for the long wait. Thanks for answering! We are going to change the way we connect to Jira, we didn't know it was going to be deprecated.
We are going to use the OAuth 2.0 Code Grant to authenticate with the Jira Service Desk API, but we are having issues with the authorization URL. We're trying to connect an external system with Jira Service API to create tickets and retrieve information from it.
What we don't understand is the state parameters, we're using this as a base URL: https://your-domain.atlassian.net/api. Changing the "your-domain" with ours of course, but we still can't connect, any ideas about what we are doing wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's hard to say what exactly is wrong without seeing the code or the response, but make sure that you are sending the right headers with your request. From the example I posted above you have to include your authentication in a header, and the data you want to add to your request in the data header. I would recommend that you check out the API documentation and it also has examples. I can also recommend that you check out the Developer Community as well.
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.