Forum Discussion

allensmith81's avatar
6 years ago

is_draft does not appear to be working in APIv2

Hi all,

 

I have been churning on this for a wee while now and cant seem to figure out what is wrong. I posting the follow JSON in an APIv2 Create call but the is_draft seems to be getting ignored as the posts gets posted.

Can you see something I am doing wrong here?

{
    "data": {
        "type": "message",
        "subject": "My Blog Article",
        "body": "<html>\n <body>\n  <p>Some random text that I am using for demoing my JSON</p>\n </body>\n</html>",
        "board": {
            "id": "MyBlog"
        },
        "teaser": "Also some random teaser text",
        "is_draft": true,
        "author": {
            "id": "75284"
        }
    }
}

Some values have been changed to protect the content i.e - Subject, Body and teaser but everything else is as its passed into the API Call. 

  • I have also tried changing it so its:

     

    "is_draft": "True"
    or
    "is_draft": "true"
    but I can't seem to get it to be 
    "is_draft": True

    Python's Boolean value doesn't see, to result in a capitalised text string