Is it possible to bulk import Community posts via API?
답변함Hi,
I'm currently setting up Zendesk Community for my organization and would like to import an initial load of posts we gathered in different tools(Q & A, Feature requests etc.). to it. I'm not having any problem with importing one post at a time via Postman but there seems to be a problem with importing multiple posts at a time.
Is it possible to bulk import Community posts via API (preferably with Postman) and if yes, could you advise how to do it?
I was trying to add posts by calling https://{MY_Domain}.com/api/v2/community/posts.json with following parameters in json format:
[{
"post":
[{
"title": "Some title 1",
"details": "Some details 1 ",
"topic_id": {ID}
},
{
"title": "Some title 2",
"details": "Some detail 2",
"topic_id": {ID}
}
]
}]
OR
[{
"topic_id": "{ID}",
"post":
[{
"title": "Some title 1",
"details": "Some details 1 "
},
{
"title": "Some title 2",
"details": "Some details 2"
}
]
}]
In both cases the response I got was:
Required parameter missing: topic_id
Thanks in advance,
Bartosz Zalepiński
-
Hey Bartosz -
You should be able to add posts in bulk, though the comments have to be added one by one.
Information on how to do that is available in this article:
Migrating existing content to Help Center
Let us know if you have further questions!
-
Hi Nicole,
Thanks for quick response. In the article you've linked in a comment above, it is said to make sure to set topic_id in each post I'm willing to import. I'm doing that, but once again, while there is no problem with importing single post via API, each time I'm trying to import more than one (each provided with a topic_id), I'm getting "Bad request" status and "Required parameter missing: topic_id" message.
Could you provide me with an example of a json that will allow me to import more than one community post at a time? All I need is to import Title, Detail and specify topic into which given post will be assigned.Thanks,
Bartek
-
Hey Bartosz -
I'm going to grab one of our API experts to jump in as troubleshooting that stuff is not my area of expertise. Standby.
-
HeyO Bartosz,
Apologies for the confusion on this. There is not currently a create_many option for Community posts. The way in which to take that bulk action would be through scripting to the endpoint that you're already hitting: the individual post-creation endpoint.
This was brought within the context of a piece of Product Feedback we received a while back: https://support.zendesk.com/hc/en-us/community/posts/207916948-New-Community-API-improvements I would recommend adding your vote & comments to that existing thread to get additional attention from our Product team about building that into future versions of our software.
Please let me know if I'm failing to understand your question correctly or there's something else I can help with on this!
-
Hi Dwight,
Understood. Thanks for the reply.
Cheers,
Bartek
댓글을 남기려면 로그인하세요.
5 댓글