Learn how to integrate with the JSON API Manager
Retrieve a list of all available JSON filenames that your API key has access to.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Required | Your unique API key |
import requests
url = "/lookup"
payload = {"api_key": "your-api-key-here"}
response = requests.post(url, json=payload)
print(response.json())
{"filenames": ["users", "products", "orders"]}
Retrieve data from a specific JSON file. Optionally limit the number of returned items.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Required | Your unique API key |
filename |
string | Required | Name of the JSON file |
datanumber |
integer | Optional | Limit items returned |
import requests
url = "/jsondata"
params = {
"api_key": "your-key",
"filename": "users",
"datanumber": 5
}
response = requests.post(url, params=params)
print(response.json())
[{"id": 1, "name": "John"}, {"id": 2, "name": "Jane"}]
Create a new JSON file. Requires an API key with write or both permission.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Required | API key with write permission |
filename |
string | Required | Name for the new JSON file |
data |
object/array | Required | JSON data (sent in request body) |
import requests
import json
url = "/upload"
params = {"api_key": "your-key", "filename": "products"}
data = {"items": [{"id": 1, "name": "Product A"}]}
response = requests.post(url, params=params, json=data)
print(response.json())
{"status": "success", "message": "File 'products' created successfully", "filename": "products"}
Update an existing JSON file. Supports two modes:
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Required | API key with write permission |
filename |
string | Required | Name of the JSON file to update |
data |
object | Required | JSON data (sent in request body) |
overwrite |
boolean | Optional | Default: false. If true, replace all data |
{} data. If your file contains an
array [], use overwrite=true.
import requests
url = "/update"
params = {"api_key": "your-key", "filename": "config", "overwrite": True}
data = {"setting1": "new_value", "setting2": "another_value"}
response = requests.post(url, params=params, json=data)
print(response.json())
# Result: File completely replaced with new data
# Existing file: {"name": "John", "age": 30}
# Update with: {"age": 31, "city": "NYC"}
url = "/update"
params = {"api_key": "your-key", "filename": "user", "overwrite": False}
data = {"age": 31, "city": "NYC"}
response = requests.post(url, params=params, json=data)
# Result: {"name": "John", "age": 31, "city": "NYC"}
# - "age" updated (existed)
# - "city" added (new key)
{
"status": "success",
"message": "File 'user' updated successfully",
"mode": "upsert",
"added_keys": ["city"],
"updated_keys": ["age"]
}
/lookup and /jsondata/upload, /update, and read endpointsTest endpoints directly from this page.
Testing...