BIM 360 Field Issue API Filter

BIM 360 Field Issue API Filter

Anonymous
Not applicable
3,590 Views
15 Replies
Message 1 of 16

BIM 360 Field Issue API Filter

Anonymous
Not applicable

We would like to get list of issues filtered by project and issue type. However we do not find any API option to filter by issue type using BIM 360 Field API - /api/get_issues. 

 

Please let me know if there is any other easier to retrieve such list. If we attempt to get all list and try to filter ourselves we are running into timeout exceptions as most  of projects have large number of issues.

 

For api reference we use this documentation page -

https://bim360field.autodesk.com/apidoc/index.html#mobile_api_method_18

 

Any help on this would be really helpful as we badly need this functionality. Any other possible work around would also help.

 

Thanks

Gobinath

0 Likes
Accepted solutions (1)
3,591 Views
15 Replies
Replies (15)
Message 2 of 16

xiaodong_liang
Autodesk Support
Autodesk Support

Hi Gobinath,

 

as the help of ' /api/get_issues' indicates, you can use issue_filter_id to filter the issues you expected.

 

So, firstly, create a filter that specifies the parameters such as issue type. Next, call  /api/issue_filters to get the id of the corresponding filter. Finally, use this id in ' /api/get_issues'. The call below is a demo at my side:

 

https://manage.velasystems.com/api/get_issues?ticket=fff29d81-e943-4e86-8fe7-45dccb87b01a&project_id...issue_filter_id=e67d04ed-afbb-473a-962e-7438afd53d67

 

Please let us know if this helps you.

 

Untitled.png

0 Likes
Message 3 of 16

mikako_harada
Alumni
Alumni
Accepted solution

Hi Gobinath, 

 

What Xiaodong is suggesting is one way.  Another will be to use 

 

POST /fieldapi/issues/v1/search

 

https://bim360field.autodesk.com/apidoc/index.html#issues_api_method_13

 

For example, given a issue type id, let's says "68456518-0c52-7461-9d4a-d1d5a2cb4fd3", you can write a condition like:  

 

string conditions = "[\"f--issue_type_id,eq,\\\"68456518-0c52-7461-9d4a-d1d5a2cb4fd3\\\"\"]"

 

You should be able to get issue types through: 

 

POST /fieldapi/issues/v1/types

https://bim360field.autodesk.com/apidoc/index.html#issues_api_method_2

 

I hope this helps. 

 

 


Mikako Harada
Developer Technical Services
0 Likes
Message 4 of 16

Anonymous
Not applicable

https://bim360field.autodesk.com/api/issue_filters - do not provide the list of issue types. It is showing Unresolved, Issues for Engineer etc. What we are looking for QA - Quality QA/QC Issues only.  Please see the screen shot below.

 

 

QA.png

 

0 Likes
Message 5 of 16

mikako_harada
Alumni
Alumni

Hi Gobinath, 

 

To get the list of issue types, you can use:

 

POST /fieldapi/issues/v1/types

https://bim360field.autodesk.com/apidoc/index.html#issues_api_method_2

 

The link is little off the line.  When you click on the link and see the page, the scroll up a bit. You will see the subtitle.  


Mikako Harada
Developer Technical Services
0 Likes
Message 6 of 16

Anonymous
Not applicable

Yes. I got that list of issue types along with issue type id's. However I m unable to get that issue type id working with /api/get_issues as a filter option.

 

Thanks

Gobinath

0 Likes
Message 7 of 16

Anonymous
Not applicable

1. I could not get the issue type id to work as as filter when using /api/get_issues.

2. I could not get the issue type id condition(to search only QA/QC issues) to work in postman along with the filter id (for all issues) as shown below.

 

postman_with condition.png

 

 

0 Likes
Message 8 of 16

mikako_harada
Alumni
Alumni

Gobinath, 

 

I think you are mixing Xiaodong's suggestion and mine and some of calls.  You will need to use:  

POST /fieldapi/issues/v1/search 

 

Could you look at carefully what I wrote above if you are reply to me?  The image is too small to read.   

 

I modified the Intro labs' code. 

http://the360view.typepad.com/blog/2015/04/lab2-field-api-intro.html 

 

>>>>

// Add parameters
request.AddParameter("ticket", ticket);
request.AddParameter("project_id", project_id);

// Optional parameters
string conditions = "[\"f--issue_type_id,eq,\\\"68445418-0c52-4df1-9d4a-d1d5b3cb4fd3\\\"\"]";
request.AddParameter("conditions", conditions);

<<<<

 

It works for me.  I also tried mutiple time 🙂 

 

I know the format is a bit complicated.  But it is written on the doc:   

https://bim360field.autodesk.com/apidoc/index.html#issues_api_method_13 

 

Try with replacing the hardcoded id just for testing purpose.  

 

 

 


Mikako Harada
Developer Technical Services
0 Likes
Message 9 of 16

mikako_harada
Alumni
Alumni

Gibinath, 

 

Conditions - is an array of strings, which represents an array of conditions.  

 

Looks like you omitted "[ ]"? 


Mikako Harada
Developer Technical Services
0 Likes
Message 10 of 16

Anonymous
Not applicable

I am unable to get the conditions string working. I simply copied and posted yours. (replaced the correct type id). Please see the screen shot - i end up getting internal server error.

 

del.png

0 Likes
Message 11 of 16

mikako_harada
Alumni
Alumni

Gobinath, 

 

If you are using Postman, could you try without escape?  e.g., 

 

["f--issue_type_id,eq,\"68998518-0d52-4aa1-9d4a-d1d5ahg4fd3\""] 

 

Response body looks like below for me:  

 

postman.png


Mikako Harada
Developer Technical Services
0 Likes
Message 12 of 16

Anonymous
Not applicable

Yes. It works now in postman. HOwever I see two issues.

1. location is always coming as null in this api response, although there are location attached in the issues. Is this a bug in this search api (/fieldapi/issues/v1/search) ?

2. Also we would like to get status_changed_at information for an issue in the search response.

 

Please let us know if you can help us resolve this issue.

 

Thanks

Gobinath

0 Likes
Message 13 of 16

mikako_harada
Alumni
Alumni

Hi Gobinath, 

 

Glad to hear condition string is working now. 

 

About getting more detailed info., could you try the following?  

 

POST /fieldapi/issues/v1/retrieve 

https://bim360field.autodesk.com/apidoc/index.html#issues_api_method_9

 

In general, the idea is when we get a list of objects, we try not to have massive info. we get only for the necessary one. 


Mikako Harada
Developer Technical Services
0 Likes
Message 14 of 16

Anonymous
Not applicable

Yes. it worked. Thanks for the help.

0 Likes
Message 15 of 16

borgesk
Observer
Observer
Hi Mikako, I have used the fieldapi/issues/v1/retrieve method to retrieve detailed information for an issue. I need to find out issue location and when the issue was last updated. As you can see from the response below, I get location detail value but nothing for location_id. The updated_at field is returned for specific attachments, not for the issue. Can you suggest a way to retrieve issues which have been modified since a last cut date? The service api/get_equipment has a max_date parameter which offers this same capability, [ { "id": "07a8b546-27b1-4df9-b1a6-9939f60c3093", "created_by": "[email protected]", "fields": [ { "id": "f--spec_ref", "name": "Spec ref", "display_type": "drop-down", "value": null }, { "id": "f--due_date", "name": "Due date", "display_type": "date", "value": "2015-06-16" }, { "id": "f--release", "name": "Release", "display_type": "text", "value": "WO-2002" }, { "id": "f--location_detail", "name": "Location detail", "display_type": "text", "value": "Left Corridor" }, { "id": "f--issue_type_id", "name": "Issue type", "display_type": "issue_type_id", "value": "9d07f686-10d9-11e4-9511-027465b920a7" }, { "id": "f--identifier", "name": "Identifier", "display_type": "text", "value": "000017" }, { "id": "f--description", "name": "Description", "display_type": "textarea", "value": "Issue for an equipment" }, { "id": "f--responsible_company_id", "name": "Responsible company", "display_type": "company_id", "value": "00000000-1000-0000-1001-000000000001" }, { "id": "f--status", "name": "Status", "display_type": "drop-down", "value": "Open" }, { "id": "f--location_id", "name": "Location", "display_type": "location", "value": null }, { "id": "f--root_cause_id", "name": "Root cause", "display_type": "root_cause_id", "value": null }, { "id": "cf--4fbe507d-0195-4f48-b4e3-8706f8a451c9", "name": "Inspector On Duty", "display_type": "text", "value": "Karina Borges" } ], "comments": [], "attachments": [ { "id": "b1765315-c5d5-443a-9508-8116cb56d558", "type": "UriReference", "caption": null, "tags": "", "path": "http://www.google.com", "name": "Google!", "created_at": "2015-06-03 03:34:08 -0400", "updated_at": "2015-06-03 03:34:08 -0400", "created_by": "[email protected]" } ] } ]
0 Likes
Message 16 of 16

mikako_harada
Alumni
Alumni

Hi Karina, 

 

I have a favor to ask you.  Could you post this as a separate entry?  

 

Our hope is to accumurate our knowledge through forum posts and to be reused by others who has similiar questions. It will be easier to read if we stick to the original question rather than adding branches to the original question. You can always cross reference by links if the issue is some what related.  

 

Going back to your question, I will need to dig into it. But from the top of head, I think I also noticed that location data isn't there.  So you may be hitting a limitation and something we need to log a wish.  


Mikako Harada
Developer Technical Services
0 Likes