Question about Data Management API

Question about Data Management API

Anonymous
Not applicable
738 Views
4 Replies
Message 1 of 5

Question about Data Management API

Anonymous
Not applicable

Hello!

We tryed to do official step-by-step upload file manual for Data Management API (https://developer.autodesk.com/en/docs/data/v2/tutorials/upload-file/), but at step 5 (create the first version of the uploaded file) server answer "400 BAD INPUT", we created request as like as in the manual:

{
  "jsonapi": {"version": "1.0"},
  "data": {
    "type": "items",
    "attributes": {
      "displayName": "drawing.dwg",
      "extension": {
        "type": "items:autodesk.core:File",
        "version": "1.0"
      }
    },
    "relationships": {
      "tip": {
        "data": {
          "type": "versions",
          "id": "1"
        }
      },
      "parent": {
        "data": {
          "type": "folders",
          "id": "urn:adsk.wipprod:fs.folder:co.***"
        }
      }
    }
  },
  "included": [
    {
      "type": "versions",
      "id": "1",
      "attributes": {
        "name": "drawing.dwg",
        "extension": {
          "type": "versions:autodesk.core:File",
          "version": "1.0"
        }
      },
      "relationships": {
        "storage": {
          "data": {
            "type": "objects",
            "id": "urn:adsk.objects:os.object:test-bucket3-***/***.dwg"
          }
        }
      }
    }
  ]
}

What we do wrong?

739 Views
4 Replies
Replies (4)
Message 2 of 5

anil_mistry
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

Since this is related to API question, I will go ahead and move to BIM 360 API forum and someone from API team should be able to help you further. 

 

Thank you and have a great day!



Anil Mistry
Technical Support Specialist
Message 3 of 5

mikako_harada
Community Manager
Community Manager

Hi d.gorbach, 

 

In step 5 of the tutorial, you will need to use *:autodedsk.bim360:File instead of *:autodesk.core:File.

 

Some tips and tricks here: 

https://fieldofviewblog.wordpress.com/2017/02/07/bim-360-docs-api-update/

 

Please give it a try once again with this. 

 

 

 

Incidentally, for Forge questions, Forge team is monitoring stackoverflow as developer community is slightly different. Please refer to post about where to ask questions:  

 

https://fieldofviewblog.wordpress.com/2016/10/27/where-to-get-help-about-forge/

 

You are welcome to use this forum, too.  But we have a group of Forge engineers monitoring stackoverflow directly.  So FYI for future. 

 


Mikako Harada
Developer Technical Services
0 Likes
Message 4 of 5

Anonymous
Not applicable

With *.autodesk.bim360:File don't work too. Can I check my request a row by row for understand which is uncorrect?

0 Likes
Message 5 of 5

rosalesduquej
Alumni
Alumni

I created a step by step tutorial using all the REST calls needed to upload to BIM 360 Docs. 

Maybe this will help you get pass your problem. 

 

https://forge.autodesk.com/blog/tutorial-using-curl-3-legged-authentication-bim-360-docs-upload

 

Cheers



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
0 Likes