I’m trying to figure out a way to get my nextcloud calendar events returned in a json format. I’ve read through the documentation, but I’m not sure if I’m looking in the right place. I’m trying this:
But I can’t seem to get anywhere. Is there a service endpoint or other way to do this? I’m looking into using JavaScript/Ajax to parse through my calendar.
where URI for the desired calendar can be looked up in the database table oc_calendars (your table prefix might differ from oc_).
Of course you also need to authenticate with username and password in the request - I would not put the user credentials in the URL though.
Yes, this is the WebDAV-URL, but the export function works with a http client. Are you sure you appended the query-string for the get-request properly?
If I enter that link (including the query-string ?export&accept=jcal!) in a browser or request it via curl - I get a calender in json format. I know that at least the export function as an ics-file (without &accept=jcal) works since Nextcloud 9.0
Without the query-string I also get „This is the webdav interface…“
I believe I got this working. I was looking at the principleuri field instead of uri in the database… The uri was called “personal”.
The json response is huge, is there any documentation on this export param or any other query parameters to reduce the size of the json response? I can’t seem to find any documentation on it.