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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Insight Rest API to query custom attributes Edited

Hello, 

 

I am trying to query a custom attribute through Insight Rest API,

Request: https://<<base-url>>/rest/insight/1.0/iql/objects?objectSchemaId=6&iql=ObjectId=22935

Response 200 and gives me all the info however let us say , if i have to find custom attribute in my object "status : inactive "via API how do i query them ?? 

If i want to find it on plugin advanced search it would be "Status" IN ("Inactive"), just want to know if anyone has better insight doing it via API

 

Thanks,

Abhilash 

 

 

2 answers

1 accepted

0 votes
Answer accepted

Hi @abhilash.gudipudi ,

your url would look like this:

https://<<BASE-URL>>/rest/insight/1.0/iql/objects?objectSchemaId=xx&iql=objectType="Teams"%20AND%20Status="Inactive"

 xx = id of your object schema

If your object type is called differently than "Teams", change it in the provided url.

Thank you @Hana Kučerová that worked ! 

0 votes
Hana Kučerová Community Leader Oct 23, 2019

Hi,

I'm sorry, I'm not sure, what you are trying to do.

Do you want to find all objects with an inactive status using REST API?

If so, you can use IQL - REST:

https://documentation.riada.io/insight/latest/iql-rest-29324717.html

Hello,

 

Thanks for the quick reply, 

My use case scenario : Using Postman for my calls

From my main objecttype Teams i have around 50 teams listed which have individual custom attribute which can be filtered by Active/Inactive

My goals is to find custom attribute status inactive(attached pic) teams from the object Teams type via rest api. I have referred the link you shared which is /rest/insight/1.0/iql/objects?objectSchemaId=1&iql=ObjectType=%22Business%20area%22&resultPerPage=1

 

Could you please share sample response in my scenario 

Sample response: Which i wanted to find via rest API call 

{
"id": 154634,
"objectTypeAttributeId": 818,
"objectAttributeValues": [
{
"value": "Active",
"displayValue": "Active"
}
],

Very new to insight so might be wrong with technical words, please dont mind

@Hana Kučerová When using the rest API how do you query for multiple keys in the iql statement. 

 

For example

https://<<BASE-URL>>/rest/insight/1.0/iql/ObjectSchema.jspa?id=6&typeId=3&mode=object&iql="Status"="Inactive"

 

Response is finding inactive in all the schemas but we want to filter by specific schema. 

 

Thanks for your help

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Do Not Lose your Customer’s Trust

Missing deadlines is one of the biggest problems every team lead wants to avoid when dealing with managed services. When the customer contracts your company to help with IT services it is expected th...

36 views 0 0
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you