Developer Portal
Integrate with easy-host using the REST API. Upload, manage, and serve HTML content programmatically.
Authentication
All API endpoints require HTTP Basic Authentication. Include your credentials in every request.
curl -u username:password https://content.oglimmer.com/api/content
Quick Start
# 1. Upload a single HTML file
curl -u admin:changeme \
-F "slug=hello" \
-F "file=@index.html" \
https://content.oglimmer.com/api/content
# 2. Upload a ZIP archive with multiple files
curl -u admin:changeme \
-F "slug=my-site" \
-F "file=@site.zip" \
-F "title=My Website" \
https://content.oglimmer.com/api/content
# 3. View your content
open https://content.oglimmer.com/s/hello
Base URL
All API endpoints are relative to:
https://content.oglimmer.com/api/content
Endpoints
List All Content
GET /api/content
Returns all content items owned by the authenticated user.
Example request:
curl -u admin:changeme https://content.oglimmer.com/api/content
Response: 200 OK
[
{
"id": 1,
"slug": "hello",
"title": "My Page",
"sourceUrl": "https://example.com",
"owner": "admin",
"creator": "John Doe",
"allowExternalResources": false,
"createdAt": "2026-04-09T10:00:00Z",
"updatedAt": "2026-04-09T10:30:00Z",
"files": ["index.html", "style.css"]
}
]
Create Content
POST /api/content
Upload a new content item. Accepts multipart/form-data.
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Unique URL identifier for your content |
file | file | Yes | HTML file or ZIP archive (max 10 MB) |
title | string | No | Display title for the content |
sourceUrl | string | No | Reference URL for the original source |
creator | string | No | Name of the content creator |
allowExternalResources | string | No | "true" or "false" — allow loading external resources |
Example request:
curl -u admin:changeme \
-F "slug=my-page" \
-F "file=@index.html" \
-F "title=My Page" \
-F "creator=John Doe" \
-F "allowExternalResources=false" \
https://content.oglimmer.com/api/content
Response: 201 Created
{
"id": 2,
"slug": "my-page",
"title": "My Page",
"owner": "admin",
"creator": "John Doe",
"allowExternalResources": false,
"createdAt": "2026-04-09T11:00:00Z",
"updatedAt": "2026-04-09T11:00:00Z",
"files": ["index.html"]
}
Error responses:
400 Bad Request— Missing file or invalid slug format409 Conflict— Slug already exists413 Request Entity Too Large— File exceeds 10 MB limit
Get Content
GET /api/content/{slug}
Retrieve details for a specific content item.
Example request:
curl -u admin:changeme https://content.oglimmer.com/api/content/my-page
Response: 200 OK — Returns a content object (same structure as above).
Error responses:
404 Not Found— No content with that slug
Update Content
PUT /api/content/{slug}
Update an existing content item. All fields are optional — only provided fields are updated. Accepts multipart/form-data.
| Field | Type | Description |
|---|---|---|
file | file | New file to replace existing content |
title | string | Updated title |
sourceUrl | string | Updated source URL |
creator | string | Updated creator name |
allowExternalResources | string | "true" or "false" |
Example request:
curl -X PUT -u admin:changeme \
-F "file=@updated.html" \
-F "title=Updated Page" \
https://content.oglimmer.com/api/content/my-page
Response: 200 OK — Returns the updated content object.
Error responses:
400 Bad Request— Invalid slug format404 Not Found— No content with that slug
Delete Content
DELETE /api/content/{slug}
Permanently delete a content item and all its files.
Example request:
curl -X DELETE -u admin:changeme \
https://content.oglimmer.com/api/content/my-page
Response: 204 No Content — Empty response body on success.
Error responses:
404 Not Found— No content with that slug
Response Object
All endpoints that return content use this structure:
| Field | Type | Description |
|---|---|---|
id | integer | Unique content ID |
slug | string | URL identifier |
title | string | Content title |
sourceUrl | string | Source URL (omitted if empty) |
owner | string | Username of the content owner |
creator | string | Creator name |
allowExternalResources | boolean | Whether external resource loading is allowed |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |
files | array | List of file paths in this content |
Public Serving
Uploaded content is publicly accessible at:
https://content.oglimmer.com/s/{slug}
https://content.oglimmer.com/s/{slug}/{path}
- The base URL (
/s/{slug}) servesindex.html - Sub-paths resolve to files within the uploaded content
- Responses include appropriate
Content-Typeheaders and 1-hour cache headers - No authentication required
Slug Rules
- Lowercase letters, numbers, and hyphens only
- Must start and end with a letter or number
- Pattern:
^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Limits
- Max upload size: 10 MB
- Rate limit: 10 requests/second per IP (returns
429 Too Many Requestswhen exceeded) - ZIP uploads:
__MACOSXand hidden files are automatically filtered