When creating Assets with Workato, how do I fix a 400 error I receive?

22 views Asked by At

I am working in ACC Connect/Workato on a recipe to batch create assets. I have got a csv document that I have parsed to get all of the asset data. I have also read the APS documentation and copied the request schema and brought it over to workato. I then filled in the required fields and added data for my custom fields. When I run the script I get a 400 error from the call to the Assets API. The error states:

{"code":400,"message":"400 Bad Request","body":"{"title":"Validation Error","detail":"Invalid batch create request. Request body must be a nonempty array of objects.","errorCode":"GENERAL_ERROR","type":"https://developer.api.autodesk.com/bim360/assets/v1/error-codes/GENERAL_ERROR","retryable":false}","headers":{"access_control_allow_origin":"*","content_type":"application/json; charset=utf-8","date":"Thu, 26 Oct 2023 18:06:07 GMT","etag":"W/"fc-Seyu7Jd4C7fuWpmR5e2qK2c3aq8"","request_id":"c714ffcf-4546-4ff4-90f3-66743ba9b808","strict_transport_security":"max-age=31536000; includeSubDomains","vary":"Accept-Encoding","x_powered_by":"Express","x_request_id":"c714ffcf-4546-4ff4-90f3-66743ba9b808","content_length":"252","connection":"keep-alive"}} at line: 5501.

I have tried adjusting my call, and adjusting the fields I am using. It still gives me the same error. I am debating on removing the schema and just creating the fields that I need but I haven't tried that yet. I was expecting for the assets to be created in the Autodesk Construction Cloud from the spreadsheet and to have all of the needed data filled out during the creation.

0

There are 0 answers