Forums

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

Different response from /serach and API endpoint

hp February 23, 2022

Hello Community,

 

I am using the "/search" endpoint to search for issues and also get transitions.

API 1: `https://my-domain.atlassian.net/rest/api/2/search?expand=transitions,transitions.fields&fields=*all`

 

API 2: `https://my-domain.atlassian.net/rest/api/2/issue/{id}/transitions?expand=transitions.fields`

 

By comparing these 2 responses, we noticed, that in the 2nd response "fields" field is coming and in the 1st response it is not coming.

Any reason for that?

2 answers

0 votes
Prince Nyeche
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.
February 23, 2022

You've expanded it but you're adding an invalid value transitions.fields which is not part of the available options in search issue endpoint for expand parameter for your API 1. So that should explain why something is going wrong there.

0 votes
Pramodh M
Community Champion
February 23, 2022

Hi @hp 

You need to expand the first API in order to get more detail

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion

Ex.png

Let me know if you have any queries

Thanks,
Pramodh

hp February 23, 2022

@Pramodh M Thank you for the reply.

I want fields in transitions. As you can see in API 1: "https://my-domain.atlassian.net/rest/api/2/search?expand=transitions,transitions.fields&fields=*all".

I am expanding transitions and then expanding fields in transitions, transitions.fields. But it is not working.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events