JSON storage

 

This JSON storage service allows you to store and share JSON bins, and manipulate this data over a simple HTTP API.

You can create and share bin without account. You must create a free account to use HTTP API (in order to have an API key).

You can use this service for tutorials, sharing code examples or mocking requests. You can also use this REST API for websites, web and mobile applications on development and qualification environments.

You can see the user guide, and the API documentation to help you to use this hosting service

JSON data





Security key (Optionnal) *
Private **


* The security key is used to protect access, modification and deletion of the bin.
If security key is completed, it will be required to update and delete the bin.
The security key is required to request the private bins, but not required for the public bins.

** Private: The security key is required to request private bins.
The public bin can be requested by everyone who knows the URI without the security key.


User guide

You can use this user interface to store JSON that are accessible through the user interface and an HTTP API.

  • Copy and paste, drag and drop a JSON file or directly type in the editors above.
    You can also click on "load JSON from URL" button to load your JSON data from a URL (Must be https).
    You can also click on "Browse JSON file" button to load your JSON data from a local file.
  • If you want to protect your JSON data from modification and deletion, fill in the "security key" field.
    If you want to protect access to your JSON data, check the "private" checkbox field.
  • Clicks on "Save" button in order to save your JSON data.
    The URI to directly access this JSON will be displayed.

Note: JSON data is limited to 100 KB per bin.

You can also use a REST API, see below.

API documentation

You can download the OpenAPI definition here or consult the documentation below.

You must create an account to use the API (free). Find your API key in page "My Account".
Note: the old API (without account) is still available for former users.

Usage limits:

  • 10000 requests per month
  • Bin is limited to 100 KB
  • Quota for an account: 10 MB
  • Request JSON
  • Create JSON
  • Update JSON
  • Partially update JSON
  • Delete JSON
GET /api/json-storage/bin/:id

Return a json bin.

Headers
Hearder codeDescriptionData typeRequired
Security-keyRequired to request a private bin.StringOptionnal
JavaScript example:
const request = new XMLHttpRequest();
request.open("GET", "https://json.extendsclass.com/bin/:id", true);
request.onreadystatechange = () => {
	alert(request.responseText);
};
request.send();
Response
Success: 200
{
	-- Your JSON data
}
Error: 404
{
	"status": 1
	"message": "Bin not found"
}
Error: 422
{
	"status": 1
	"message": "Id must be specified"
}
Error: 429
{
	"status": 1
	"message": "you have exceeded the call limit"
}

POST /api/json-storage/bin

Create a json bin.

Headers
Hearder codeDescriptionData typeRequired
Api-keyYour api key.StringRequired
Security-keyThe security key of your bin (maximum of 256 characters).
The security key allows to protect your bin against requests, modifications and deletions.
The security key is required to update and delete your bin.
The security key is required to request the private bins, but not required for the public bins.
StringOptionnal
PrivateThe security key is required to request private bins. Public by default.BooleanOptionnal
Request
{
	-- Your JSON data
}
JavaScript example:
const request = new XMLHttpRequest();
request.open("POST", "https://json.extendsclass.com/bin", true);
request.setRequestHeader("Content-type", "application/json");
request.setRequestHeader("Security-key", "Your security key");
request.setRequestHeader("Private", "true");
request.onreadystatechange = () => {
};
request.send('{"name": "my JSON"}');
Response
Success: 201
{
	"status": 0,
	"uri": "https://json.extendsclass.com/bin/:id",
	"id": ":id"
}
Error: 401
{
	"status": 1
	"message": "Wrong API key"
}
Error: 413
{
	"status": 1
	"message": "JSON data too large"
}
Error: 413
{
	"status": 1
	"message": "Security key is too large"
}
Error: 422
{
	"status": 1
	"message": "Id can not be specified"
}
Error: 422
{
	"status": 1
	"message": "Security key is required for private bin"
}
Error: 429
{
	"status": 1
	"message": "you have exceeded the call limit"
}
PUT /api/json-storage/bin/:id

Update a json bin.

Headers
Hearder codeDescriptionData typeRequired
Security-keyRequired to update a bin protected by a security key.StringOptionnal
Request
{
	-- Your JSON data updated
}
JavaScript example:
const request = new XMLHttpRequest();
request.open("PUT", "https://json.extendsclass.com/bin/:id", true);
request.setRequestHeader("Content-type", "application/json");
request.setRequestHeader("Security-key", "Your security key");
request.onreadystatechange = () => {
};
request.send('{"name": "my updated JSON"}');
Response
Success: 200
{
	"status": 0,
	"data": -- your JSON data updated
}
Error: 401
{
	"status": 1
	"message": "Wrong security key"
}
Error: 404
{
	"status": 1
	"message": "Bin not found"
}
Error: 413
{
	"status": 1
	"message": "JSON data too large"
}
Error: 422
{
	"status": 1
	"message": "Id must be specified"
}
Error: 429
{
	"status": 1
	"message": "you have exceeded the call limit"
}
PATCH /api/json-storage/bin/:id

Partially update a json bin with JSON Merge Patch.

Headers
Hearder codeDescriptionData typeRequired
Security-keyRequired to update a bin protected by a security key.StringOptionnal
Request
{
	-- Your JSON Merge Patch
}
JavaScript example:
const request = new XMLHttpRequest();
request.open("PATCH", "https://json.extendsclass.com/bin/:id", true);
request.setRequestHeader("Content-type", "application/merge-patch+json");
request.setRequestHeader("Security-key", "Your security key");
request.onreadystatechange = () => {
};
request.send('{"name": "my JSON Merge Patch", "name2": null}');
Response
Success: 200
{
	"status": 0,
	"data": -- your JSON data updated
}
Error: 401
{
	"status": 1
	"message": "Wrong security key"
}
Error: 404
{
	"status": 1
	"message": "Bin not found"
}
Error: 413
{
	"status": 1
	"message": "JSON data too large"
}
Error: 422
{
	"status": 1
	"message": "Id must be specified"
}
Error: 429
{
	"status": 1
	"message": "you have exceeded the call limit"
}
DELETE /api/json-storage/bin/:id

Delete a json bin.

Headers
Hearder codeDescriptionData typeRequired
Security-keyRequired to delete a bin protected by a security key.StringOptionnal
JavaScript example:
const request = new XMLHttpRequest();
request.open("DELETE", "https://json.extendsclass.com/bin/:id", true);
request.setRequestHeader("security-key", "Your security key");
request.onreadystatechange = () => {
};
request.send();
Response
Success: 200
{
	"status": 0
}
Error: 401
{
	"status": 1
	"message": "Wrong security key"
}
Error: 404
{
	"status": 1
	"message": "Bin not found"
}
Error: 422
{
	"status": 1
	"message": "Id must be specified"
}
Error: 429
{
	"status": 1
	"message": "you have exceeded the call limit"
}

The HTTP API supports cross-origin resource sharing (CORS requests are accepted from any origin), you will not have any cross domain issues.

Why store JSON ?

Sometimes we needed a quick location to store a configuration file or data. We do not always have the possibility to easily make these data available online

This hosting service allows you to do this, store and make available online :)



Load JSON data
URL
Security key
Please enter the security key in order to view your private bin:
You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments




Dev App Store-2020-03-29 23:26
I din't catch exactly hot I can use my pricate key afte the /bin/ section help me


Dev-2020-03-30 00:09
Hello I am having hard time to understanding how I can pass and get this request , so my question is, jow can I add my key after /bin/?


Cyril (Admin)-2020-05-31 10:03
Hello, you must put your key in a http header "Security-key".
Javascript code: request.setRequestHeader("Security-key", "Your security key");


snthsnth-2020-05-30 21:44
What do you mean by partially update?


Cyril (Admin)-2020-05-31 10:02
Hi, this allows to partially update the stored json, without having to send the object completely;
More information here: https://tools.ietf.org/html/rfc7386


aoesnth-2020-05-31 23:04
That was what I was thinking, thanks. When using PUT and not sure what PATCH was, I thought I would have to make a GET request, add some JSON in it, and "PUT" that in the bin.


nthnth-2020-06-01 00:11
Could you please turn the storage you said can be put in a bin (100 ko) into a unit that's more common, like KB?


snthsnth-2020-06-01 19:57
I have found a bug, which is that you cannot fetch/GET the JSON data due to CORS "NO-ACCESS CONTROL ORIGIN HEADER" policy, which I found using devtool's inspect element.
You mind to disable it? Because right now I have to use a proxy (http://cors-anywhere.herokuapp.com/<Thebin>)
More information here: https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9


Cyril (Admin)-2020-06-01 21:55
It is fixed, I added the header "Access-Control-Allow-Origin".


snthsnth-2020-06-02 03:18
For some reason it is showing this error


snthsnth-2020-06-02 03:18
It is showing this error: https://backendonfrontend.kudos.repl.co/Capture.PNG


snthsnth-2020-06-05 21:43
Are you solving it?


Cyril (Admin)-2020-06-07 15:43
Sorry ... Yes, it is fixed!


snthsnth-2020-06-08 04:04
Thank you