Hi @ssvtom, apologies for the delay here. That’s a good question. Our API is built on top of WordPress Rest API if you upgrade to 6.0 you be using the updated API as well. There shouldn’t be much of a difference since we do not have any updates for our Rest API yet. For now, there’s no workaround to get the new style with the version you’re using.
Let me know if that helps.
Best,
Abz
Thread Starter
ssvtom
(@ssvtom)
Oh, thanks.
Will test the upgrade on my staging system and see how events, that are created via REST look like afterwards.
I’ll keep you posted…
Hi @ssvtom, awesome. Yes, please do test it out on a staging site to be safe. Keep us posted!
Have a great day.
Best,
Abz
Thread Starter
ssvtom
(@ssvtom)
Did the TEC 6.0.2 upgrade on my staging system.
Still, events created via REST API get “old style” look. Interesting to see, that the description field is left empty during the creation. As previously said, if I just open the generated event in the Editor, it immediately gets “updated” to the new style. Afterwards the description field contains some (HTML) content.
BTW, I’m using httpie.io as REST client for testing:
http –verify no –auth user:pass https://ssv-volleyball.de/wp-json/tribe/events/v1/events title=”Testevent” start_date=”2022-10-23 16:00:00″ end_date=”2022-10-23 18:00:00″ status=publish categories:='[12]’ venue:=76
resulting in the following JSON being sent to WP
{
"categories": [
12
],
"end_date": "2022-10-23 18:00:00",
"start_date": "2022-10-23 16:00:00",
"status": "publish",
"title": "Testevent",
"venue": 76
}
Any pointers welcome.
Hi @ssvtom, thanks for getting back to me here. I’m not that familiar with httpie.io, let me reach out to our team and ask for pointers. I’d get back to you as soon as I hear from them.
Hang in there.
Best,
Abz
The command is equivalent to the curl command
curl —-insecure —-user user:pass -X POST —-header “Content-Type: application/json” —-data ‘{…}’ https://ssv-volleyball.de/wp-json/tribe/events/v1/events
Where is
- —-insecure to accept a self-signed HTTPS certificate
- —-user for basic authentication
- —-data for the POST body being set to the json object which is given above
I hope this helps 🙂
Hi @maxm123, this is helpful. Hmmm, apparently it is not being applied to the events created via REST API.
Appreciate you sharing more information. This is definitely helpful, sharing this with the team.
Best,
Abz
Thread Starter
ssvtom
(@ssvtom)
Any update on this issue you can share?
—
Tom
Hi @ssvtom, apologies I have not heard back from our devs. My initial thoughts here is that we have some code that does the conversion, but apparently it is not being applied to the events created via REST API. I am not entirely sure if it is due to the httpie.io.
I’d follow up on this and I’d get back to you whenever I hear from there.
Thanks for your patience here. Hang in there.
Best,
Abz
Hi @ssvtom, it seems like my initial thoughts were correct. It seems like it is not working with httpie.io — it would be good to try out different provider if there are any.
Appreciate your patience here. Please do not hesitate to bump a new ticket on our way.
Best,
Abz
Plugin Support
Darian
(@d0153)
Hi @ssvtom
We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.