HangryDave

API calls not working?

Recommended Posts

Hello, I'm getting started with the Rebrickable API, and am a bit confused on how it works. I ran the command:

curl -X GET --header 'Accept: application/json' --header 'Authorization: key *****' 'https://rebrickable.com/api/v3/lego/sets/7965/'

***** stands for my key. When I run this command, it gives me {"detail":"Not found."}. Can anyone help me as to why it is not working? (I'm probably doing something stupid)

Also, how would I go about hooking this API into something like an Android application?

 

Share this post


Link to post
Share on other sites

Flagging this for @Nathan  attention, because I'm from the 'bookkeeping=handwritten ledgers' and 'rotary dial phones' era.:D 

Share this post


Link to post
Share on other sites
9 hours ago, HangryDave said:

Hello, I'm getting started with the Rebrickable API, and am a bit confused on how it works. I ran the command:

curl -X GET --header 'Accept: application/json' --header 'Authorization: key *****' 'https://rebrickable.com/api/v3/lego/sets/7965/'

***** stands for my key. When I run this command, it gives me {"detail":"Not found."}. Can anyone help me as to why it is not working? (I'm probably doing something stupid)

Also, how would I go about hooking this API into something like an Android application?

 

Almost... the sets need the variant appended so:

curl -X GET --header 'Accept: application/json' --header 'Authorization: key *****' 'https://rebrickable.com/api/v3/lego/sets/7965-1/'

As for android I couldn't say. Use whatever method it has to perform http requests and json parsing of the response.

Share this post


Link to post
Share on other sites