API Overview
Comprehensive guide to Siddhi Hajare Documentation APIs for integration and automation
API Fundamentals
Siddhi Hajare Documentation provides a powerful REST API that allows you to programmatically manage your documentation. Whether you're building custom integrations, automating workflows, or syncing with external systems, our API offers comprehensive endpoints for all platform features.
All API requests require authentication using Bearer tokens. Obtain your API key from the workspace settings and include it in the Authorization header.
Core Endpoints
Create, read, update, and delete documentation pages. Supports Markdown and HTML content.
Manage workspaces and their settings. Control user access and workspace configuration.
Handle user management and permissions within your organization.
// Create a new page
const createPage = async (title, content) => {
const response = await fetch('/api/v1/pages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.API_TOKEN}`
},
body: JSON.stringify({
title,
content,
workspaceId: 'workspace-123',
tags: ['api', 'guide']
})
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return await response.json();
};
// Usage
const newPage = await createPage(
'API Integration Guide',
'# Introduction
This guide covers API integration.'
);
console.log('Page created:', newPage.id);
import requests
from typing import Dict, Any
def create_page(api_token: str, title: str, content: str) -> Dict[str, Any]:
"""Create a new documentation page."""
url = 'https://api.siddhidocs.com/v1/pages'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {api_token}'
}
data = {
'title': title,
'content': content,
'workspaceId': 'workspace-123',
'tags': ['api', 'guide']
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
return response.json()
# Usage
page = create_page(
api_token='your-token-here',
title='API Integration Guide',
content='# Introduction
This guide covers API integration.'
)
print(f"Page created: {page['id']}")
Webhooks
Configure Webhook
Set up webhook endpoints in your workspace settings to receive real-time notifications.
Handle Events
Process webhook payloads for events like page updates, user changes, and workspace modifications.
Verify Signatures
Validate webhook signatures to ensure request authenticity.
SDKs and Libraries
| Language | Package | Installation |
|---|---|---|
| JavaScript | @siddhidocs/sdk | npm install @siddhidocs/sdk |
| Python | siddhi-docs | pip install siddhi-docs |
| Java | com.siddhidocs:sdk | Maven Central |
| Go | github.com/siddhidocs/go-sdk | go get github.com/siddhidocs/go-sdk |
Best Practices
Security Considerations
Token Management
Regularly rotate API tokens and revoke compromised credentials.
Access Control
Implement least-privilege access for API integrations.
Troubleshooting
Last updated 1 week ago