Collectives API returns an invalid query message

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.10
  • 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:

  1. Create a user and add it to a collective.
  2. Make sure it can log in and has access to the collective.
  3. Encode their username:password using base64
  4. 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!

I believe the OCS API is newer. I presume the older API is what’s in v30:

Indeed it might be, thanks. :expressionless:

Do you know how to check for the version of a package as a user? (Collectives, in our case)

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.

Well. Nextcloud was upgraded and the API now works like a charm. :slight_smile:

Thanks again @jtr!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.