URL: /api/blog/v1.0/blog/{blog}/posts/{post}
Method: GET
Example request in python:
import requests, json
from sjcl import SJCL
response = requests.get('http://www.cryptedblog.com/api/blog/v1.0/blog/test-blog/posts/5671831268753408')
data = response.json()
print(json.dumps(data, indent=4, sort_keys=True))
print("decrypted-post:", json.dumps(json.loads(SJCL().decrypt(data["data"]["post-encrypted"], "YourSharedSecret")), indent=4, sort_keys=True))
The output looks like the following:
{
"data": {
"blog": "test-blog",
"comments-url": "/api/blog/v1.0/blog/test-blog/posts/5671831268753408/comments",
"date-time-create": "2014-07-13 19:59:13.256670",
"date-time-last_comment": "2014-07-13 19:59:13.256650",
"date-time-update": "None",
"images": 5735088218177536,
"images-url": "/api/blog/v1.0/images/5735088218177536",
"number-of-comments": 0,
"post": 5671831268753408,
"post-encrypted": {
"adata": "",
"cipher": "aes",
"ct": "a2JEU0sfzv4KynVvqoVjfN6oIiUqFI/ilQsraCVXLzSLu+x6koRh0GHMat/+rJWNzTtonM/HV9cbAJL6YWK+bseLg0CZl72E2Uh0AuBlF7e+5CvNSD2jpnvTaufGTvZjoW/0zBvR0NbgIS7FFy4MkOnTtWA8Zj3/MC9R0U6eIQB7roGmiCTNzp81ERoiJ9cT/eVnbqMQ2MkLaZOBMI/B8HTH6w12Km3t9qJv2smY6hcffHdEC7eKjcVCM2d5vFdlVHv0bT6kOh/cO14lxVbDDy+Mt2SfcGSqUl2qIDSFaKlLFFfq1MkpmLgsA47vUMHuerb7tHosqPBsUQgVMkt4QvL29m1XfKuJm1i/+784+fHgNQ==",
"iter": 1000,
"iv": "iGzq4To1iFIRauDL7MSnSA==",
"ks": 128,
"mode": "ccm",
"salt": "eEAlnAKE4T8=",
"ts": 64,
"v": 1
},
"post-url": "/api/blog/v1.0/blog/test-blog/posts/5671831268753408"
},
"success": true
}
decrypted-post: {
"author": "Cryptedblog-Team",
"content": "Just a test post! Click [here](http://www.cryptedblog.com) to go to the main page.",
"images": [
{
"alt": "title",
"height": 90,
"title": "title",
"width": 90
}
],
"tags": [
"tag1",
"tag2"
],
"title": "This is a test blog entry"
}