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.