Create Document
POST
/document
Create a new document.
Request
METHOD: POST
AUTHENTICATION: required
URL: https://api.jsonstorage.online/v1/document
BODY:
Content-Type: application/json
title
: string (required) - The title of the document.validation_schema
: object (optional) - A schema for validation purposes. Learn Morevisibility
: enum (private | public) (optional, defaults to private) - The visibility of the document.bucket_id
: string (optional) ID of the bucket you want to associate this document.document
: Json (required) - The JSON data that you want to store on the cloud.
Example Request
curl -X POST \
-H "Content-Type: application/json" \
-H "X-secret-key: YOUR_SECRET_KEY_HERE" \
-d '{"title":"New Document","document":{"key":"value"}}' \
https://api.jsonstorage.online/v1/document
Response
Status
: 201 CreatedBody
: JSON object containing the created document.
Example Response
{
"id": "77b22667-a2e3-438a-a2e4-1a36fd557c1d",
"title": "New Document",
"validation_schema": {"type": "object"},
"visibility": "private",
"document": {"key": "value"},
"created_at": "2024-04-03T12:00:00Z"
}