Community
BIM 360 API Forum
Welcome to Autodesk’s BIM 360 API Forums. Share your knowledge, ask questions, and explore popular BIM 360 API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Updating erp_id of a selected company in BIM360 admin using the Forge Rest API

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
said.benahmed
627 Views, 14 Replies

Updating erp_id of a selected company in BIM360 admin using the Forge Rest API

Can someone tell me please how to update erp_id of a selected company in BIM360 admin using the Forge Rest API

14 REPLIES 14
Message 2 of 15

Hi Said, 

 

You should be able to use this call to update a company information: 

 

https://developer.autodesk.com/en/docs/bim360/v1/reference/http/companies-:company_id-PATCH/

 

Note that in order to use BIM 360 API (account level API), you will need to set up API access with the account; i.e., exchange account ID and your client ID in the HQ UI.  

 

Also, this part of API uses 2-legged only right now. 

 

We had a webcast about BIM 360 API is here: 

https://www.youtube.com/watch?v=OVwaXTitSRw

 

 

 


Mikako Harada
Developer Technical Services
Message 3 of 15

Hi Mikako,

 

I've just been granted access to the Apps & Integrations (preview) section in the admin interface, i'll follow the instruction in the webcast and then get back with my experience feedback.

 

Thanks a lot!

 

Saïd (Saeed)

 

Screenshot_EBC_BIM360.png

Message 4 of 15

Can you tell me please what should we put in the callback url field of the forge app creation ?

 

Callback.png

Message 5 of 15

Hi Said, 

 

To make a story short -

 

Since you are using HQ API, which you use 2-legged, you can put any value there for now.  It is needed for 3-legged authentication.  

 


Mikako Harada
Developer Technical Services
Message 6 of 15

Thank you for the prompt answer!

 

I tested my setup and it's correct.

 

Is there any code sample to make this call programmatically? (not from postman as in the webcast)

Message 7 of 15

Hi Said, 

 

I made a minimum sample that changes epr_id and posted the code here: 

 

https://github.com/haradam3/HQAPIIntro 

 

You can find the explanation about this sample here: 

 

https://fieldofviewblog.wordpress.com/2016/12/05/hq-api-intro-node-js/

 

(Note: I'm still trying to establish a pattern for providing codes. So I may completely redo the repository. But trying to do so will add more time. So making it available as is for now.)  

 

I hope you will find it useful. 


Mikako Harada
Developer Technical Services
Message 8 of 15

Hi Mikako,

 

Thanks for the sample it helped me so much and I'm preparing a HQ Api Dll in visual studio

Is normal that the Get companies request returns only 12 companies ?

is it really the same data i the BIM360 account admin ?

We've got more than 990 companies in our admin account :

 

companies.png

Thanks for your support

Message 9 of 15

Hi Said, 

 

Try using additional query parameters: 

 

  • limit
  • offset

https://developer.autodesk.com/en/docs/bim360/v1/reference/http/companies-GET/

 

limit defines the maximum number of items that return at one call. The default is 10.  (You said 12. Not sure why this is so. But I take it as you only see much smaller number.) 

 

offset defines where you want to start in the array of items.  

 

e.g., 

limit=100, offset=0 will return items from item[0] to item[99]

limit=100, offset=100 will return items from item[100] to item[199] 

 

Using these parameters, you can loop through and control the amount of data you want to retrieve at each call. 


Mikako Harada
Developer Technical Services
Message 10 of 15

My bad you're right it was 10 and not 12.

 

All is okey now I've got my code working and I thank you very Much for all your time and king answers.

 

Just one last Question before I close this post :

 

Is there any possibility to filter by project ?

 

I mean getting just companies related to a specific project ?

 

Thank you in advance !

 

projectCompanies.png

Message 11 of 15

Hi Said, 

 

This is a good question.  I thought we can use "search" feature.  But does not look like search functionality is enough to do that.  I'm checking with the product team.  I will get back to you when I hear from them. 


Mikako Harada
Developer Technical Services
Message 12 of 15

Hi Said, 

 

Unfortunately, the product team confirms that the ability to list companies for a given project is missing in the current API.  

 

I logged an enhancement wish against Forge HQ API: 

 

EA-5413  need API to list Companies by Project 

 

 

Feel free to send me a use case scenario and a business case to me.  I will add them.  (You should be able to send me a private e-mail through my profile.) 

 


Mikako Harada
Developer Technical Services
Message 13 of 15

Thank you for all the helpful answers!

Message 14 of 15

Hi Said, and community, 

 

I have a good news related this thread.   

 

EA-5413 has been implemented (y) 

 

Documentation is here: 

 

https://developer.autodesk.com/en/docs/bim360/v1/reference/http/projects-:project_id-companies-GET/

 

Please take a look and give it a try. 


Mikako Harada
Developer Technical Services
Message 15 of 15

Hi Mikako,

 

That's some good news, i'll try it for sure and come back with a feedback!

 

Regards

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report