Read XL Bins API
You could now store up to 10MB of JSON files using the Create XL Bins API. You could read the XL Bins using the Read XL Bins API.
INFO The entire payload of the file you are reading will be sent in response, in the future, we may allow options to Read Stream or Download JSON file.
IMPORTANT XL Bins API is an Early Access Feature. It may change drastically over time or may get discontinued in the future. We would not recommend you to use this feature on Production until it graduates to a stable release in the future.
Root
https://api.jsonbin.io/v3
Route
/xl/b/<BIN_ID>
Disable Meta Data using Query Parameter instead of X-Bin-Meta header
/xl/b/<BIN_ID>?meta=false
Request Type
GET
Request Headers
Below are the list of Accepted Request Headers if you are trying to Create a JSON record.
Request Header | Value | Required |
---|---|---|
Content-Type | application/json | Yes |
X-Master-Key | <API_KEY> | Yes |
X-Bin-Meta | <true / false> | No |
Content-Type Required
Set the Content-Type header to application/json. This needs to be passed with every GET request you make on the Read XL Bins Route. Failing to pass this in the Header will result in an error.
INFO As of now, you could only fetch the entire body as JSON in response. In the future, we may make streaming of JSON & Download as other response options.
X-Master-Key Required
X-Master-Key is nothing but your Core API Access Key. You will need this Key to access mostly any API end-point on JSONBin. You could find the key on the API Keys page.
X-Bin-Meta Optional
You may pass X-Bin-Meta header with a value of false. Doing this will omit all the metadata of the bin and will simply return the data you have stored.
Code Samples
curl -v\
-H "X-Master-key: <YOUR_API_KEY>" \
--request GET \
https://api.jsonbin.io/v3/xl/b/<BIN_ID>
Request Response
Success Status Code: 200
{
"metadata": {
"id":"<Bin Id>",
"createdAt":"<Date & Time>",
"private": <true/false>,
"name": "<Bin Name>"
}
}
Error Status Code: 400, 401, 403, 404
{
"message": "<Error Message>"
}
For more information on the error codes & errors you might possibly encounter, refer to the below section.
Error Reference
You need to pass Content-Type set to application/json
You need to pass Content-Type header set to application/json else the READ request for the XL Bin will fail.
Invalid XL Bin Id provided
You'll encounter this error if the Bin Id you are trying to access is invalid. Hence, ensure that the Bin Id you are passing is valid.