Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoints for POSTING not working #1375

Open
James-kamwendo opened this issue Aug 17, 2023 · 0 comments
Open

API endpoints for POSTING not working #1375

James-kamwendo opened this issue Aug 17, 2023 · 0 comments

Comments

@James-kamwendo
Copy link

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 <MY_AUTH_TOKEN>" --data '{"app_name": "fooled", "is_of_device_type": "raspberrypicm4-ioboard"}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.

  • Trying 192.168.43.207...
  • TCP_NODELAY set
  • Connected to api.balenaproject.net (192.168.43.207) port 443 (#0)
  • ALPN, offering http/1.1
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@strength
  • successfully set certificate verify locations:
  • CAfile: ca.crt
    CApath: none
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, Unknown (8):
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, Finished (20):
  • TLSv1.3 (OUT), TLS change cipher, Client hello (1):
  • TLSv1.3 (OUT), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  • ALPN, server did not agree to a protocol
  • Server certificate:
  • subject: CN=*.balenaproject.net
  • start date: Jul 28 13:08:58 2023 GMT
  • expire date: Jul 27 13:08:58 2025 GMT
  • subjectAltName: host "api.balenaproject.net" matched cert's "*.balenaproject.net"
  • issuer: CN=ca.balenaproject.net
  • SSL certificate verify ok.
  • TLSv1.3 (OUT), TLS Unknown, Unknown (23):

POST /v6/application HTTP/1.1
Host: api.balenaproject.net
User-Agent: curl/7.53.1
Accept: /
Content-Type: application/json
Authorization: Bearer <........>
Content-Length: 69

  • upload completely sent off: 69 out of 69 bytes
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS Unknown, Unknown (23):
    < HTTP/1.1 500 Internal Server Error
    < X-Frame-Options: DENY
    < X-Content-Type-Options: nosniff
    < Vary: X-HTTP-Method-Override
    < Cache-Control: no-cache
    < Date: Thu, 17 Aug 2023 13:26:15 GMT
    < Keep-Alive: timeout=5
    < Transfer-Encoding: chunked
    <
  • Connection #0 to host api.balenaproject.net left intact
    Jamess-MacBook-Pro:~ jameskamwendo$

Specifications

  • OS:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant