Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

REST API get return a filter

Service Desk Perkons October 3, 2022

Helo everyone !

 

I'm an administrator of jira end i want get this filter (below) by rest api, can i do this ?

 

Captura de tela 2022-10-03 125817.png

 

I tried by this end point: 

"/rest/api/3/search"
"jql": "project = 'Cerco Inteligente ES' and created >= 2022-09-01 and created <= 2022-09-30",
my desire it's return my fields, according the columns of the filter

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 3, 2022

@Service Desk Perkons and welcome to the community,

The response from this endpoint will be all available issue fields and not by columns you want. That's what's written on their API at least: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

I don't know any endpoints to get exactly what you want. But what is the exact problem of receiving more fields?

Service Desk Perkons October 3, 2022

Hello, 

I had a doubt when i received the json, i has a varied quantity of custom fields. I can't find this fields on json response.

 

If i don't send in post query field's, he return all fields ?

 

payload = json.dumps( {
  "expand":["editmeta"],
  "jql": "project = 'Cerco Inteligente ES' and created >= 2022-09-01 and created <= 2022-09-30",
  "maxResults": 1,
  "fieldsByKeys": False,
  "fields": [
    "issuetype",
    "cf[10060]",
    "summary",
    "Responsável",
    "status",
    "resolution",
    "creator",
    "createdDate"
    "Tipo de Correção",
    "Tempo de Atendimento",
    "Tempo de Solução"
  ],
  "startAt": 0
} )
Service Desk Perkons October 3, 2022

Hi, everyone!

 

Alex help me find the answer, i remove from post the data fields! Now all fields ar lists to me. 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 3, 2022

@Service Desk Perkons 

Try something like the following:

https://YOURDOMAIN.atlassian.net/rest/api/3/search?jql=filter%20%3D%2010022&expand=names

where 10022 is the ID of your saved filter.

Like Service Desk Perkons likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events