Documentation
Document
Update Document

Update Document

PUT /document/:id

Update an existing document.

Request

METHOD: PUT

AUTHENTICATION: required if visibility is private

URL: https://api.jsonstorage.online/v1/document/:id

BODY:

Content-Type: application/json

  • title: string (optional) - The title of the document.
  • validation_schema: object (optional) - A schema for validation purposes. Learn More
  • visibility: enum (private | public) (optional) - The visibility of the document.
  • bucket_id: string (optional) ID of the bucket you want to associate this document.
  • document: Json (optional) - The JSON data that you want to store on the cloud.
Example Request
  curl -X PUT \
    -H "Content-Type: application/json" \
    -H "X-secret-key: YOUR_SECRET_KEY_HERE" \
    -d '{"document":{"key":"another value"}}' \
    https://api.jsonstorage.online/v1/document/77b22667-a2e3-438a-a2e4-1a36fd557c1d

Response

  • Status: 200 OK
  • Body: JSON object containing the updated document.
Example Response
{
  "id": "77b22667-a2e3-438a-a2e4-1a36fd557c1d",
  "title": "New Document",
  "validation_schema": {"type": "object"},
  "visibility": "private",
  "document": {"key": "another value"},
  "created_at": "2024-04-03T12:00:00Z"
}