Boxtech icon indicating copy to clipboard operation
Boxtech copied to clipboard

Cannot get JSON output

Open kenlane-af opened this issue 1 year ago • 0 comments

I am able to retrieve my auth token and submit a curl GET for a BIC Code, but the API returns some <!doctype html> data and I cannot see the JSON output described in the documentation.

I've tried with both curl and Postman and tried tweaking the "Accept" parameters. I notice an error from Cloudflare but I am sure it is something more simple than that. Here is the erbose curl output:

kenneths-mbp:~ kennylane$ curl -v --location 'https://api.bic-boxtech.org/api/v2.0/codes/MNBU' --header 'Authorization: '

  • Trying 104.26.6.83:443...
  • Connected to api.bic-boxtech.org (104.26.6.83) port 443
  • ALPN: curl offers h2,http/1.1
  • (304) (OUT), TLS handshake, Client hello (1):
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • (304) (IN), TLS handshake, Server hello (2):
  • (304) (IN), TLS handshake, Unknown (8):
  • (304) (IN), TLS handshake, Certificate (11):
  • (304) (IN), TLS handshake, CERT verify (15):
  • (304) (IN), TLS handshake, Finished (20):
  • (304) (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
  • ALPN: server accepted h2
  • Server certificate:
  • subject: CN=bic-boxtech.org
  • start date: Mar 10 21:02:47 2024 GMT
  • expire date: Jun 8 21:02:46 2024 GMT
  • subjectAltName: host "api.bic-boxtech.org" matched cert's "*.bic-boxtech.org"
  • issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1P5
  • SSL certificate verify ok.
  • using HTTP/2
  • [HTTP/2] [1] OPENED stream for https://api.bic-boxtech.org/api/v2.0/codes/MNBU
  • [HTTP/2] [1] [:method: GET]
  • [HTTP/2] [1] [:scheme: https]
  • [HTTP/2] [1] [:authority: api.bic-boxtech.org]
  • [HTTP/2] [1] [:path: /api/v2.0/codes/MNBU]
  • [HTTP/2] [1] [user-agent: curl/8.4.0]
  • [HTTP/2] [1] [accept: /]
  • [HTTP/2] [1] [authorization:

GET /api/v2.0/codes/MNBU HTTP/2 Host: api.bic-boxtech.org User-Agent: curl/8.4.0 Accept: / Authorization:

< HTTP/2 200 < date: Tue, 30 Apr 2024 15:21:46 GMT < content-type: text/html < last-modified: Thu, 25 Apr 2024 13:56:50 GMT < x-amz-server-side-encryption: AES256 < vary: Accept-Encoding < x-cache: Error from cloudfront < via: 1.1 d1dad7d3c339d87d553c26a84c9ca5d2.cloudfront.net (CloudFront) < x-amz-cf-pop: IAD55-P4 < x-amz-cf-id: VQDfwgAOj4ffjTQlqWrTnQRZ5nlZcHvqjo5VWnJ15nI9zGi7SPHFyg== < age: 229 < cf-cache-status: DYNAMIC < report-to: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s="}],"group":"cf-nel","max_age":604800} < nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} < server: cloudflare < cf-ray: 87c885fdcf8482e1-IAD <

BIC Boxtech | Global Container Database * Connection #0 to host api.bic-boxtech.org left intact

kenlane-af avatar Apr 30 '24 15:04 kenlane-af