balena-io / balena-sdk

The SDK to make balena powered JavaScript applications.
https://www.balena.io/
Apache License 2.0
145 stars 46 forks source link

API endpoints for POSTING not working #1375

Open James-kamwendo opened 1 year ago

James-kamwendo commented 1 year ago

Expected Behavior

Im trying to follow through the API documentation for balena and am using it in django, i've tried to get data from my balena server that is hosted on my local server in virtualbox, and the get request are working just fine but when i try to create say a fleet following the documentation the response is 500 but when i use the balena cli its creating the fleet without a problem so i thought maybe am doing it wrong in django and i tried to curl on terminal the Post request for creating a fleet and i did verbose the response was also 500 but the same endpoint am able to get the fleets i created on balena cli, i tried to curl the delete request this one worked but Posting no, i also tried to patch an existing fleet to Enable automatic update tracking for a fleet using curl it said bad request and ive been trying for 4 days now

Actual Behavior

Jamess-MacBook-Pro:~ jameskamwendo$ curl --cacert ca.crt -X POST "https://api.balenaproject.net/v6/application" -H "Content-Type: application/json" -H "Authorization: Bearer " --data '{"app_name": "fooled", "is_of_device_type": "raspberrypicm4-ioboard"}' -v Note: Unnecessary use of -X or --request, POST is already inferred.

Specifications