Is it possible to change ownership of these pseudo-posts? (Or whatever they are called!)
Thanks.
In a Dev category discussion tagged with rest-api, users explore whether ownership of small action posts (like āMade this a banner onā or āClosed onā) can be changed. Jonathan5 initiates the query, and ondrej notes that ownership canāt be changed directly ā the post would need to be deleted and recreated. JammyDodger suggests using the API, citing a prior thread, and later confirms via Postman that changing ownership of such posts is indeed possible. Jonathan5 seeks clarification, and JammyDodger provides a step-by-step guide using Postmanās UI, including setting headers and form-data with the post_id and target username. Jonathan5 asks if Postman can be used without paying; JammyDodger confirms a free version exists and mentions curl as an alternative. Canapin adds that tools like Insomnia are free alternatives and provides a curl example for API interaction. The consensus is that while the UI doesnāt support ownership changes, the API does ā via tools like Postman, Insomnia, or curl.
Is it possible to change ownership of these pseudo-posts? (Or whatever they are called!)
Thanks.
The small action posts? You canāt change the ownership of those as far as I know. The small action would have to be deleted and the topic opened and closed again (for example) with whoever you want to own the small action closing the topic.
This is a curiosity contribution⦠![]()
Even though thereās not an admin wrench on the small action posts, they still get a post id - is it possible to change ownership of them through the API?
Thanks for the idea. Iāve never used the API before but would be happy to give it a go if someone would confirm that it would work here⦠![]()
Would I just type this at the command line?
curl -X POST "http://forum.example.com/t/[TOPIC_ID]/change-owner.json" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: ................." \
-H "Api-Username: ..............." \
-F "post_ids[]=[POST_ID]" \
-F "username=[NEW_USERNAME]"
I can work out the [TOPIC_ID] from the URL, the API key/username from Settings-API, and [POST_ID] from looking at Chromeās dev tools.
Iām afraid Iām punching above my weight on this one.
Iāve also not used the API yet, but I hope someone else can chime in. ![]()
Just to circle back to this one via the scenic routeā¦
but I have finally gotten round to using Postman and have successfully managed to change ownership of a small action post using the API
![]()
Could you possibly expand on this? Thanks.
Iāll try ![]()
I grabbed the link of the topic where the small action post is, and popped /change-owner.json on the end, and added it to the top bar as a POST request (and entered my API-Key API-Username, plus Content-Type into the Headers tab):
I then looked up the post_id of the small action post I wanted to change in the post.json (eg. /t/tag-test-topic-one/762/2.json) and added the post_ids[] and username Keys and Values to the body tab, under āform-dataā:
Then clicked the āSendā button. ![]()
Cool. Iāve found Plans & Pricing | Postman API Platform and wonder ā is it possible to do what you describe above without paying for their plans? I donāt think I could justify any expense for this small task ![]()
I didnāt pay for it, so I think there must be a free option.
Maybe this page?
Though thatās only one way. I think you can also use curl to make requests from a terminal, though this I have not mastered yet. ![]()
There are many free software for making API requests like Postman. I use Insomnia. A matter of preferences and availability depending on your OS, mostly.
Hereās a simple example with curl from command line:
curl -X POST "https://your-discourse.com/posts.json" -H "Content-Type: application/json" -H "Api-Key: YOUR_API_KEY" -H "Api-Username: YOUR_USERNAME" -d "{\"title\": \"Test topic creation with the API\", \"raw\": \"And here's the topic's content\", \"category\": CATEGORY_ID }"