This API was discontinued. Please use JSON instead


I was sending HTTP POST requests to this URI before:

and I was getting the output which was to turn on the led for some time. It was working.

But now, when I use the same request I get this response

{“statusCode”:410,“error”:“Gone”,“message”:“This API was discontinued. Please use JSON instead.”}

I searched the problem in the internet but I could not find anything. How to solve this problem? Change the URI or change content-type area? I would appreciate your help.

I find that if you write to /devices/DeviceID/output, it’ll work if you set the Accept header to “application/vnd.littlebits.v2+json”, the Authorization token as you’d expect, the Content-Type header to “application/json”, and then include the following in the payload:

{ 'percent': 100, 'duration_ms': -1 }

The docs seem to be out of date. I found some examples online when I was writing the code to do this, it seems the APIs have gone through several revisions but it’s not clear.

Hi, thank for your reply.

I tried different parameters in message header and I found the correct one which the server accepts.
Before, I was using “Accept” parameter with “application/vnd.littlebits.v2+json”
I removed this and instead I added “Content–Type” parameter and it worked. I hope it helps other people who have the same problem.

1 Like

Accept header is meant to tell the server the content-type(s) accepted in the response. For the request content-type use Content-Type.

We are planning new documentation and revamped APIs for 2017.