URL: /api/blog/v1.0/blog/{blog}
Method: POST
TODO
Example request in python:
import requests, json
from sjcl import SJCL
blog_encrypted = SJCL().encrypt(
json.dumps({
"title": "Test blog",
"description": "This is the encrypted test blog.",
"language": "en", # language code - used for hyphenation
"timezone": "Europe/Berlin",
"write-id": "7e5f3ce982194fff914029dbab29fa70", # everyone who can decrypt this message knows the write-id
}),
"YourSharedSecret")
response = requests.post(
'http://www.cryptedblog.com/api/blog/v1.0/blog/test-blog',
data=json.dumps({
"blog-encrypted": blog_encrypted,
"create-posts": True, # everyone may create posts
"create-comments": True, # everyone may create comments
"edit-without-password": True, # everyone may edit others posts/comments
"admin-password": "NoGoodAdminPassword", # admin password
"write-id": "7e5f3ce982194fff914029dbab29fa70", # with the cleartext write-id the servers validates write requests
})
)
data = response.json()
print(json.dumps(data, indent=4, sort_keys=True))
The output looks like the following:
{
"data": {
"blog": "test-blog",
"blog-url": "/api/blog/v1.0/blog/test-blog"
},
"success": true
}