# Tentativo di trasformare un post.json in una wiki

**URL:** <https://meta.discourse.org/t/trying-to-make-a-post-json-a-wiki/119757>\
**Category:** Product Support\
**Created:** [7 Giugno 2019, 7:43pm UTC](https://meta.discourse.org/t/trying-to-make-a-post-json-a-wiki/119757 "2019-06-07T19:43:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Seb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seb/32/134898_2.png) [@Seb](https://meta.discourse.org/u/Seb)\
**Post date:** [7 Giugno 2019, 8:42pm UTC](https://meta.discourse.org/t/trying-to-make-a-post-json-a-wiki/119757/3 "2019-06-07T20:42:56Z")

</div>

I think i am closer to being able to make the post i made a wiki but i still cant resole the issue.

When i reverse engeneered my command i got

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/b/7bd2d717cdaa582f047f31beac5380a103d345ed.png)

and in the Body there was

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/7/e7b6aec0b9911bac2fe8d58d7cf7aea7a53db091.png)

Here is the Bash script that attempts this but i cant get it to work:

```
#!/bin/bash

  response="$(curl -k -X POST https://discourse.org/posts.json
-H “Content-Type: multipart/form-data;”
-F api_key=“234234sdfsdf”
-F api_username=“hubot”
-F topic_id=“46605”
-F raw=“Wiki_test_”")"

post_id="$(echo "$response" | grep -oP '"id":\K.*(?=,"name":)')"
echo "post_id= "$post_id

curl -k -X PUT https://discourse.org/posts/$post_id/wiki \
-H "Content-Type:multipart/form-data;" \
-d '{wiki="true"}'\

```

---

_[View the full topic](https://meta.discourse.org/t/trying-to-make-a-post-json-a-wiki/119757)._
