简体   繁体   中英

How to intepret the result: Template project doesn't exist in Field service? BIM360 API

we are using the BIM360 API at our Company to manage Users, Project and Firms in combination with our CRM. We writen a simple tool with User Interface which is doing it.

We tried to use the feature of "Copy from template Project". We are using the new "Field Management Service" because it is required following the instruction from Autodesk [api doc] ( https://forge.autodesk.com/en/docs/bim360/v1/reference/http/projects-POST/ ).

Thoughts

The normal project creation withouth template project works fine. We can add any service to the project we want. Also as stated above the the "Field managment Service". If we attach an ID for the template project we get an error, stating that the project doesn't exists in "Field Service".


So my thought is, that this function just works in the user interface from BIM360. Or more the "Field Service" is the old "Gen 1" Service which is different to the "Field Management Service" which is the "next Gen"?


Code

Code below shows the simple requestBody as JSON. The authentification and everything works fine and is send as bearer in the header.

{
  "name": "x_Vorlage",
  "value": "0",
  "currency": "EUR",
  "start_date": "2019-10-15",
  "end_date": "2019-10-16",
  "project_type": "Wohngebäude",
  "hubId": null,
  "id": null,
  "status": null,
  "job_number": null,
  "adress_line_1": null,
  "adress_line_2": null,
  "city": null,
  "state_or_province": "Brandenburg",
  "postal_code": null,
  "country": "Germany",
  "business_unit_id": null,
  "timezone": null,
  "language": "de",
  "contract_type": null,
  "service_types": null,
  "template_project_id": "3d8ca02e-XXXX-46ff-XXXX-9c26d408XXXX"
}

The "template_project_id" is just obfuscate for posting here.

Error:

We expected something like a HTTP 200 Result or a bad request. But we getting:

{"code":1004,"message":"Template project doesn't exist in Field service."}

Thanks for your help!

Unfortunately, the template feature only works with Field Classic in API.

So, I submitted a wishlist item HQ-5127 to our engineering team to allocate time to evaluate the possibility of supporting this on Next-Gen Field. Please remember the wishlist item id for future reference. You're welcome to ask for the updates or provide additional information to us via sending an email that contains this id to the Forge Help channel. We appreciate your understanding and patience. Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM