Issue with `/api/permissions` GET Endpoint Returning 405

kennethogrey 23 days ago

Hi everyone,

I am trying to retrieve the list of permissions using the endpoint documented in the Traccar API reference:

GET /api/permissions

Documentation:
https://www.traccar.org/api-reference/#tag/Permissions/paths/~1permissions/get

However, every time I call the endpoint, I get a 405 Method Not Allowed response.

Example request:

GET /api/permissions?deviceId=1&geofenceId=7

Where:

  • deviceId = 1
  • geofenceId = 7
  • the device is already linked to the geofence in Traccar

I have confirmed that:

  • POST /api/permissions works correctly
  • DELETE /api/permissions also works correctly

The issue seems to be only with the GET endpoint.

I checked the source code in:

src/main/java/org/traccar/api/resource/PermissionsResource.java

but I could not find any @GET methods implemented there. From what I can see, only the POST and DELETE handlers exist.

This is what is confusing me:

  • the GET endpoint is documented in the official API reference
  • but I cannot find its implementation in the source code
  • and the endpoint consistently returns 405

I am not familiar with Java or Spring Boot, so I may be missing something obvious, or perhaps the implementation exists elsewhere.

Has anyone successfully retrieved permissions using this endpoint?
If so:

  • how did you do it?
  • is there another resource/controller handling this?
  • or is the documentation outdated?

I would really appreciate any clarification or guidance on this.

Thanks in advance.

Anton Tananaev 23 days ago

You forgot to mention the most important detail - what version of Traccar are you using?

kennethogrey 23 days ago

i am using traccar-windows-64-6.13.3.

Anton Tananaev 23 days ago

I believe it was added after the release.

kennethogrey 23 days ago

Does this mean it will be available in the next release?

Anton Tananaev 23 days ago

Correct.

kennethogrey 23 days ago

Thanks a lot