Jira Rest API integration with Tempo

Santiago Arreche June 19, 2018

I'm trying to create an issue from the api rest but I have problems with the tempo account field.

How should I send this field? How do I obtain in real time the values I must send for each of the possible options?

Error when send an field value ID:

{"errorMessages":["Option cannot be selected, it has been locked from assigning to issues"],"errors":{}}

Error when send the key for the value:

{"errorMessages":[],"errors":{"io.tempo.jira__account":"Can not construct instance of java.lang.Long from String value 'FAMA': not a valid Long value\n at [Source: N/A; line: -1, column: -1]"}}

Regards

 

 

2 answers

1 accepted

0 votes
Answer accepted
Santiago Arreche June 22, 2018

I think I found the solution through Jira Support.
To obtain the values I need about the account field we must use a GET to this URL

https://topsystems.atlassian.net/rest/api/2/field/io.tempo.jira__account/option/

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2018

Hello,

You should use Tempo Rest Api to set the account field:

http://developer.tempo.io/doc/accounts/api/rest/latest/

Santiago Arreche June 19, 2018

Thanks. 

That way I have it implemented and it does not work anymore, because the Tempo API changed and they no longer return the ID for the Account objects that I need to send to the Jira Rest API to create the issue.

This is the documentation that Im following now: https://tempo-io.github.io/tempo-api-docs/#accounts

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2018

What exactly does not work?

Santiago Arreche June 20, 2018

Hi,

As I understand to create an issue through the jira api I need to send in the field ACCOUNT an ID number.

However, when I try to get the values of the count field from the Tempo api it returns all the data but not the ID number

Then if I try to send the value key to jira's api it fails as I showed before:

Can not construct instance of java.lang.Long from String value 'FAMA'

 The other problem is that if I also send a valid  value hardcoded it is giving me as it is blocked

"Option cannot be selected, it has been locked from assigning to issues"

Like Lorena Saldívar likes this

Suggest an answer

Log in or Sign up to answer