Parameters from Request to BOX API are not accepted
回答済みIm working on a solution for netsuite, that can upload files from their file cabinet to box.
For that i use the box api and more specifically the /upload endpoint.
I am logging the request that is being sent to BOX. In that request everything appears to be normal ( I compared it to a working request). The error I get is:
{"type":"error","status":404,"code":"not_found","context_info":{"errors":[{"reason":"invalid_parameter","name":"parent","message":"Invalid value 'd_131004333115'. 'parent' with value 'd_131004333115' not found"}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Not Found","request_id":"wzvhfkgngfwtr0po"}
The Request Body that is being sent:
["--someuniqueboundaryasciistring","Content-Disposition: form-data; name=\"attributes\"","","{\"name\":\"NSELI.pdf\",\"parent\":{\"id\":\"131004333115\"},\"content_created_at\":\"2021-02-04T10:53:43-08:00\",\"content_modified_at\":\"2021-02-04T10:53:43-08:00\"}","--someuniqueboundaryasciistring","Content-Disposition: form-data; name=\"f1\"; filename=\"NSELI.pdf\"","Content-Type: application/pdf;charset=UTF-8","Content-Transfer-Encoding: base64","","JVBERi0xLjQKJaqrrK0KMSAwIG9iago8PAovVGl0bGUgKEVsZWN0cm9uaWMgSW52b2ljaW5nKQovQXV0aG9yIChOZXRTdWl0ZSkKL1Byb2R1Y2VyIChBcGFjaGUgRk9QIFZlcnNpb24gMi40KQovQ3JlYXRpb25EYXRlIChEOjIwMjAwOTA5MTc1OTA3WikKPj4KZW5kb2JqCjIgMCBvYmoKPDwKICAvTiAzCiAgL0xlbmd0aCAzIDAgUgogIC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nO2ZZ1BUWRaA73udEw3dTZOhyUmihAYk5yQ5igp0N5kWmgwqigyOwAgiIkkRRBRwwNEhyCgqohgQBQVU1GlkEFDGwVFERWVp/DG7NT+2tmpr/2yfH+99de6pd859daveV/UAkCEmsBJTYH0AErmpPF9nO0ZwSCgD8wBgAQkQAQWgI1gpSZ5+Tv5gNQS14G/xfgxAgvt9HcF67jlSTNEHHcNjMy6P3040b/57/b8EkZ3IZQMA0VY5js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tV9y+e/vkDtsd9TuhnZE7+3KVc/Nzp3c57zq1G787fvedPP28srx3e4L29OTL5e/Kn/rO+bvWApECXsH4Xou9dd8jv4/9fmjf+n1V+74WsgtvFekXVRR9LmYV3/rB4IfKH1b2R+0fKjEpOVqKLuWWjh2wPnCqTKwsu2zqoOfBznJGeWH5u0NbD92sMKqoO4w/nHaYX+lR2V2lUlVa9bk6pnq0xq6mvVa2dl/t0hH2kZGjNkfb6uTqiuo+HYs99rDeub6zQa2h4jj6ePrxF42BjQMnmCeam6Sbipq+nOSe5J/yPdXfbNrc3CLbUtIKt6a1zp0OO33vR4cfu9t02urb6e1FZ8CZtDMvfwr/aeys+9m+c8xzbT+r/lzbQe0o7IQ6szoXumK6+N0h3cPn3c739Vj0dPyi+8vJC4oXai6KXyzpxffm965cyr60eDnp8vyV6CtTfVv7Jq4GX33Q79M/dM392o3rTtevDtgOXLpheePCTfOb528xb3XdNrndOWg82HHH+E7HkMlQ513Tu933zO71DG8Y7h2xHrly3+H+9QeuD26PbhwdHgsYezgeNs5/yH44+yjh0ZvH6Y+XJ3Y9QT0pfCr6tOKZ7LOGXzV/beeb8C9OOkwOPvd7PjHFmnr1W8pvn6fzX5BeVMwozDTPGs5emHOau/dy08vpV0mvlucLfhf7vfa1xuuf/7D5Y3AheGH6De/Nyp/Fb6Xennxn9K5v0Xvx2fvE98tLhR+kPpz6yPw48Cno08xyxmfM58ovml96vrp/fbKSuLIidAGhCwhdQOgCQhcQuoDQBYQuIHQBoQsIXUDoAkIXELqA0AX+j11g7T/OaiAEl+PjAPjnAOBxB4CqagDUogAgh6VyMl
Why is the parameter parent.id not read correctly?
-
As hinted here : https://support.box.com/hc/en-us/community/posts/360049201353-Error-Invalid-value-d-xxxxxxxxxx2-while-using-Box-config-file
The Script didnt have the permissions it needed to access the folder.
Better Error codes could have saved me a lot of trouble...
投稿コメントは受け付けていません。
コメント
2件のコメント