arkhi
1
The Basics
- Nextcloud Server version (e.g., 29.x.x):
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Summary of the issue you are facing:
When querying Collectives API, I end up with the following response:
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>404</statuscode>
<message>Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.</message>
</meta>
<data/>
</ocs>
Steps to replicate it:
- Create a user and add it to a collective.
- Make sure it can log in and has access to the collective.
- Encode their username:password using base64
- Query with curl with previously encoded string:
curl -H "Authorization: Basic BASE64_ENCODED_STRING" -H "OCS-APIRequest: true" -X GET 'https://epicentre.frama.space/ocs/v2.php/apps/collectives/api/v1/collectives'
I have the same result with api/v1.0.
Thanks to anyone who could help!
jtr
2
I believe the OCS API is newer. I presume the older API is what’s in v30:
arkhi
3
Indeed it might be, thanks. 
Do you know how to check for the version of a package as a user? (Collectives, in our case)
jtr
4
FYI: it looks like Collectives >= 3.0.0 supports the OCS API. And, also appears that v3.0.0 was ported to / published for Nextcloud >=v30.
So the OCS API should be available when/if your instance’s Collectives app is updated (presumably from Collectives v2.x).
Do you know how to check for the version of a package as a user? (Collectives, in our case)
Not directly, no. The app API is admin-only.
arkhi
5
Well. Nextcloud was upgraded and the API now works like a charm. 
Thanks again @jtr!
system
Closed
6
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.