Silo API
Create API Keys
Steps to create a manage key:
- Open the sidebar menu and click on
API Keys
. - You'll find two types of keys:
Access Key
andManage Key
. Here, we'll add a newManage Key
. - Enter a key name (optional) or leave it blank.
- Select the duration. The manage key will automatically expire and become unusable. For the free plan, you can only select a 1-month duration.
- Click the "Create" button if you're satisfied with your key setup.
- Once the key generation is completed, make sure to save it. You won't be able to view it again for security purposes.
Request Header
In the request header, make sure to include the X-MAN-API
header.
Example:
curl -X 'GET' \
'https://[region].jsonsilo.com/api/v1/manage/silos?page=1' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>'
Base URL
Please note that the Singapore region is only available for Pro and Lifetime plans.
https://[region].jsonsilo.com/api/v1
Regions
Name | Code | Example | Free Plan | Pro/Lifetime Plan |
---|---|---|---|---|
Germany | api | https://api.jsonsilo.com/api/v1 | ✅ | ✅ |
Singapore | sg-01-api | https://sg-01-api.jsonsilo.com/api/v1 | ❌ | ✅ |
All Silo
Method: GET
Endpoint:
/manage/silos?page=<PAGE_NUMBER>
Example:
curl -X 'GET' \
'https://[region].jsonsilo.com/api/v1/manage/silos?page=1' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>'
Parameter
page: number
- page number
- Example:
page=1
.page=2
- Example:
Response Body:
Response Code: 200
{
"metadata": {
"total_items": 2,
"per_page": 25,
"page_no": 1
},
"silos": [
{
"file_name": "ss",
"file_uuid": "9cdf704b-b19b-447d-9c6c-b8d044f4371e",
"created_at": "2024-03-02T05:23:14.289632+00:00",
"updated_at": "2024-03-04T14:42:22.583581+00:00",
"is_public": true,
"region_name": "sg-01-api"
},
{
"file_name": "hh",
"file_uuid": "718119c9-e6b8-4c47-b669-09a3e951c8ba",
"created_at": "2024-03-02T04:01:15.241137+00:00",
"updated_at": "2024-03-02T04:01:15.241148+00:00",
"is_public": true,
"region_name": "api"
}
]
}
Attributes
metadata:
- Page meta data:
total_items
: total number of items in the listper_page
: total number of items per pagepage_no
: page number
silos:
- A list of silos in your account includes the following attributes:
file_name
: Silo file namefile_uuid
: Silo UUIDcreated_at
: Datetime when the silo was created (Timezone:UTC
)updated_at
: Datetime when the silo was last updated (Timezone:UTC
)is_public
: Silo access levelregion_name
: Silo region
Silo Meta
Method: GET
Endpoint:
/manage/meta/<FILE_UUID>
Parameter
FILE_UUID: string
- The Silo UUID, comprising 32 hexadecimal digits separated by 4 hyphens, totaling 36 characters.
- Example:
9cdf704b-b19b-447d-9c6c-b8d044f4371e
- Example:
Example:
curl -X 'GET' \
'https://[region].jsonsilo.com/api/v1/manage/meta/9cdf704b-b19b-447d-9c6c-b8d044f4371e' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>'
Response Body:
Response Code: 200
{
"file_name": "ss",
"file_uuid": "9cdf704b-b19b-447d-9c6c-b8d044f4371e",
"created_at": "2024-03-02T05:23:14.289632+00:00",
"updated_at": "2024-03-04T14:42:22.583581+00:00",
"is_public": true,
"region_name": "sg-01-api"
}
Attributes:
file_name
: Silo file namefile_uuid
: Silo UUIDcreated_at
: Datetime when the silo was created (Timezone:UTC
)updated_at
: Datetime when the silo was last updated (Timezone:UTC
)is_public
: Silo access levelregion_name
: Silo region
Get Silo
Method: GET
Endpoint:
/manage/<FILE_UUID>
Parameter
FILE_UUID: string
- The Silo UUID, comprising 32 hexadecimal digits separated by 4 hyphens, totaling 36 characters.
- Example:
9cdf704b-b19b-447d-9c6c-b8d044f4371e
- Example:
Example:
curl -X 'GET' \
'https://[region].jsonsilo.com/api/v1/manage/9cdf704b-b19b-447d-9c6c-b8d044f4371e' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>'
Response Body:
Response code: 200
{"output":"silo output"}
Create Silo
Method: POST
Endpoint:
/manage
curl -X 'POST' \
'https://[region].jsonsilo.com/api/v1/manage' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"file_name": "myjson",
"file_data": [
{"message":"Hello world!"}
],
"region_name": "api",
"is_public": false
}'
Request Body:
{
"file_name": "string",
"file_data": [
"string"
],
"region_name": "string",
"is_public": false
}
Attributes
file_name
:string
[Required]- The name of the Silo.
file_data
:JSON | Dict
[Required]- Silo data, must be in JSON format.
- Example format 1:
"file_data": {"message":"Hello world"}
- Example format 2:
"file_data": [{"message":"Hello world!"}]
region_name
:string
[Required]- Region code
is_public
:boolean
(Optional, Default value:false
)- Public:
true
- Private:
false
- Public:
Response Body:
Response code: 200
{
"file_uuid": "0c656138-7d9b-40d7-a35d-06b3f1d3191a",
"is_public": false,
"file_name": "myjson",
"region_name": "api"
}
Attributes
- file_uuid:
string
- is_public:
boolean
- file_name:
string
- region_name:
string
Update Silo
This update process does not happen in real-time. It's not suitable for scenarios where multiple users attempt to update data simultaneously.
Method: PATCH
Endpoint:
/manage/<FILE_UUID>
Parameter
FILE_UUID: string
- The Silo UUID, comprising 32 hexadecimal digits separated by 4 hyphens, totaling 36 characters.
- Example:
9cdf704b-b19b-447d-9c6c-b8d044f4371e
- Example:
Example 1:
curl -X 'PATCH' \
'https://[region].jsonsilo.com/api/v1/manage/f6e9e33d-8822-40a0-8f0f-287a67e77122' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"file_name": "New Name",
"region_name": "api"
}'
Example 2: Update JSON only:
This update does not perform an append update like other databases do; instead, it will replace the data in the file_data
field.
This is an example of how to update your JSON file only. Please check the attributes for file_data
below to see how to set the field values correctly.
curl -X 'PATCH' \
'https://[region]/client/api/v1/manage/f6e9e33d-8822-40a0-8f0f-287a67e77122' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"file_data": [
{"message":"Hello world, this updated data!"}
],
}'
Request Body:
{
"file_name": "string",
"file_data": [
"string"
],
"region_name": "string",
"is_public": false
}
At least one field in the request body must be provided to perform an update.
Attributes:
file_name
:string
[Optional]- The name of the Silo.
file_data
:JSON | Dict
[Optional]- Silo data, must be in JSON format.
- Example format 1:
Without brackets
[
and]
."file_data": {"message":"Hello world"}
- Example format 2:
"file_data": [{"message":"Hello world!"}]
region_name
:string
[Optional]- Region code
is_public
:boolean
[Optional]- Public:
true
- Private:
false
- Public:
Response Body:
Response code: 200
{
"file_data": [
{
"message": "Hello world!"
}
],
"file_uuid": "f6e9e33d-8822-40a0-8f0f-287a67e77122",
"created_at": "2024-03-05T13:56:27.164645+00:00",
"updated_at": "2024-03-09T08:46:54.405223+00:00",
"file_name": "New Name",
"region_name": "api",
"is_public": false
}
Attributes:
file_data
: Silo JSON datafile_uuid
: Silo UUIDcreated_at
: Datetime when the silo was created (Timezone:UTC
)updated_at
: Datetime when the silo was last updated (Timezone:UTC
)file_name
: Silo file nameregion_name
: Silo regionis_public
: Silo access level
Delete Silo
Method: DELETE
Endpoint:
/manage/<FILE_UUID>
FILE_UUID: string
- The Silo UUID, comprising 32 hexadecimal digits separated by 4 hyphens, totaling 36 characters.
- Example:
9cdf704b-b19b-447d-9c6c-b8d044f4371e
- Example:
Example:
curl -X 'DELETE' \
'https://[region].jsonsilo.com/api/v1/manage/f6e9e33d-8822-40a0-8f0f-287a67e77122' \
-H 'accept: application/json' \
-H 'X-MAN-API: <MANAGE_KEY>' \
-H 'Content-Type: application/json' \
Response Body:
Response code: 200
true
If the file does not exist or has already been deleted.
Error code: 404
{
"detail": "File Not found"
}
For now, there is no official SDK from us. If you wish to contribute, you can send me a direct message to get listed in this documentation.
Thank you.