dkurok

API-Testpage / Swagger does not return data

Recommended Posts

The API-testpage under https://rebrickable.com/api/v3/docs does not return any data. Neither for simple (non-authenticated) lego-functions nor for user-related ones.

It seems that the page tries to call a http-URL instead of https (see Curl or Request URL).

So simple API-requests like

http://rebrickable.com/api/v3/lego/parts/?part_num=3001

just return

"error": "no response from server"

 

Using https from my own client works; also requests with curl (under Windows) works (I xxx'ed out my key):

curl -X GET --header "Authorization: key xxxxxxxxxx" "https://rebrickable.com/api/v3/lego/parts/?part_num=3001"

returns:

...

{"count":1,"next":null,"previous":null,"results":[{"part_num":"3001","name":"Brick 2 x 4","part_cat_id":11,"part_url":"https://rebrickable.com/parts/3001/brick-2-x-4/","part_img_url":"https://m.rebrickable.com/media/parts/elements/300121.jpg","external_ids":{"BrickOwl":["771344"],"LEGO":["15589","54534","72841"]}}]}

but using http instead:

curl -X GET --header "Authorization: key xxxxxxxxxx" "http://rebrickable.com/api/v3/lego/parts/?part_num=3001" -v

returns:

*   Trying 2606:4700:20::6818:1968...
* connect to 2606:4700:20::6818:1968 port 80 failed: Network unreachable
*   Trying 2606:4700:20::6818:1a68...
* connect to 2606:4700:20::6818:1a68 port 80 failed: Network unreachable
*   Trying 104.24.25.104...
* Connected to rebrickable.com (104.24.25.104) port 80 (#0)
> GET /api/v3/lego/parts/?part_num=3001 HTTP/1.1
> Host: rebrickable.com
> User-Agent: curl/7.42.1
> Accept: */*
> Authorization: key xxxxxxxxx
>
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 19 Feb 2019 14:17:59 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: max-age=3600
< Expires: Tue, 19 Feb 2019 15:17:59 GMT
< Location: https://rebrickable.com/api/v3/lego/parts/?part_num=3001
< Server: cloudflare
< CF-RAY: 4ab95c322d7c96e8-FRA
<
* Connection #0 to host rebrickable.com left intact

 

 

Share this post


Link to post
Share on other sites

We added new hardware and having some problems. Nathan is working on it...

ADDED; Forum is also have some problems...

Share this post


Link to post
Share on other sites

This should be working now. If it's still not for you, logout then login again (I know, sounds stupid). It's a load balancer thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now