Hello,
I am currently using the ghost api v0.1 and working on getting the /posts
functionality working to create a post, however, I am having issues with the markdown being set correctly.
I have authenticated fine, have the access_token and the post is being created. The one thing that is not being set is the body of the post.
Using Postman, here is what I am sending as the url: http://<my-site>/ghost/api/v0.1/posts/?access_token=<my-token>
Here is the body in the post request:
{
"posts":
[
{
"title": "Auto API Post",
"markdown": "This is the best day every \n\n ###Here we have a list: \n *One item \n *Two items ",
"meta_title": "A test meta title post from the api",
"meta_description": "This is the meta description where all of the description of the post should go"
}
]
}
and here is the response I get with the html
key empty:
{
"posts": [
{
"id": "5c2a55c1e822d5141a7dff80",
"uuid": "96d792f4-0855-46ae-9fa7-868657515665",
"title": "Auto API Post",
"slug": "auto-api-post",
"html": "<p></p>",
"comment_id": "5c2a55c1e822d5141a7dff80",
"feature_image": null,
"featured": false,
"page": false,
"status": "draft",
"locale": null,
"visibility": "public",
"meta_title": "A test meta title post from the api",
"meta_description": "This is the meta description where all of the description of the post should go",
"created_at": "2018-12-31T17:45:37.000Z",
"created_by": "1",
"updated_at": "2018-12-31T17:45:37.000Z",
"updated_by": "1",
"published_at": null,
"published_by": null,
"custom_excerpt": null,
"codeinjection_head": null,
"codeinjection_foot": null,
"og_image": null,
"og_title": null,
"og_description": null,
"twitter_image": null,
"twitter_title": null,
"twitter_description": null,
"custom_template": null,
"author": "1",
"primary_author": null,
"url": "/404/",
"primary_tag": null
}
]
}
Additionally, here is a screenshot from GUI indicating that it is working, but there is no body text.
As I understand it, the API is still under development but hoping there is something I can do to fix this. Any help would be much appreciated thank you.