PutPage - create_if_missing

11 views
Skip to first unread message

PaladinTodd

unread,
Mar 9, 2009, 10:50:26 AM3/9/09
to PBwiki API Hackers
What's the syntax for a PutPage with the create_if_missing parameter?
I get an error with:

https://toddlandrumtest.pbwiki.com/api_v2/?op=PutPage&page=TestingAPI&_type=text&create_if_missing=True&read_key=XXXXX&html=Testing

Returns:

array (
'_request_id' => '231.17352564611162455845.0',
'_valid_as_of' => 1236609812,
'error_status' => 400,
'error_string' => 'rejected input \'create_if_missing\'',
'reference' => 'http://toddlandrumtest.pbwiki.com/api_v2/?#PutPage',
)

Mark Christian

unread,
Mar 9, 2009, 1:55:24 PM3/9/09
to to...@paladinpgm.com, PBwiki API Hackers
Hi Todd;
It's case sensitive -- so, create_if_missing=true.

Cheers;
— Mark

Nathan Schmidt

unread,
Mar 9, 2009, 2:42:56 PM3/9/09
to to...@paladinpgm.com, PBwiki API Hackers
Also, you'll need to use a write_key or admin_key for changing data on
your wiki.

-n

On Mon, Mar 9, 2009 at 7:50 AM, PaladinTodd <to...@paladinpgm.com> wrote:
>

PaladinTodd

unread,
Mar 11, 2009, 12:50:12 PM3/11/09
to PBwiki API Hackers
Thanks for the quick replies, that solved it. The other tip I got in a
private email was to put the create_if_missing at the end as well. The
link that works looks like:

https://toddlandrumtest.pbwiki.com/api_v2/?op=PutPage&page=TestingAPI&_type=text&write_key=MyKey&html=Testing&create_if_missing=true
Reply all
Reply to author
Forward
0 new messages