Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Created support in ServiceDesk after creation using API

Calderara Serge
Contributor
December 7, 2018

Dear all,

When I try to created an entry in Service Desk queue by using Service Desk API Request endpoint, then I am able to create teh record.

But as a response back to client is there a way that API after record creation return following back to client :

- Record Id

- Creation time

- Last update time

thanks for help

regarsd

1 answer

0 votes
Matthias Gaiser _K15t_
Community Champion
December 7, 2018

Hi @Calderara Serge,

it's me again.. :)

I believe you are using the create customer request to create the request, correct? The response of this request contains the information you requested:

  • issueKey: This is the Record Id you mentioned
  • createdDate: This contains the creation time

The last updated time would be the same as the creation time for the first request.

To access the request later, you can use the get customer request which should contain all the information you need.

Cheers,
Matthias.

Calderara Serge
Contributor
December 7, 2018

To create the request in jira Service Desk i am sending a POST to the endpoint .../rest/servicedeskapi/request

Then I pass the JSON content i want to send

{
"serviceDeskId": "1",
"requestTypeId": "1",
"requestFieldValues": {
"summary": "Test Request raised via REST API",
"description": "Test message"
}
}

Correct I guess as it create the record ?

Question : After creating the first record from API, if I am updating the record directly from Jira Service Desk, and need to update back my client I have 2 possible option :

1 - Either I am requesting all issue in a pooling interval and then scan the response to see if any change with client record

2 - Either there is an API in Service Desk which can return only changed records then return data are only those who have change and bring better performance

Is there a way to get option 2 out of the box ? if not what is the best to go ?

regards

Matthias Gaiser _K15t_
Community Champion
December 7, 2018

Your request to create it looks fine.

1) Correct. If you also have permissions to use the usual Jira REST API, you could use the search endpoint and search with a JQL. In this JQL you can restrict your search results based on the updated field like "updated > -5d" to get the changes from the last 5 days

2) You could also register a webhook in Jira. This way, Jira would call your program for every event you register it for.

Calderara Serge
Contributor
December 7, 2018

1- We do not have access to usual Jira REST Api because how custoomer demo is only based on Jira Desk which final customer will only have. So we are stuck to only user Service Desk API.

2 - how do you see this as in final we will have only Jira Service Desk at customer ?

Just for information the final goal is to connect ServiceNow platform Incident pushed into Jira Service desk when they are created BUT also beeing able to update record back in ServiceNow when a change occurs.

This is this second steps that I do not know how to go best.

regards 

Suggest an answer

Log in or Sign up to answer