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.
You forgot to mention the most important detail - what version of Traccar are you using?
Hi everyone,
I am trying to retrieve the list of permissions using the endpoint documented in the Traccar API reference:
GET /api/permissionsDocumentation:
https://www.traccar.org/api-reference/#tag/Permissions/paths/~1permissions/get
However, every time I call the endpoint, I get a
405 Method Not Allowedresponse.Example request:
Where:
deviceId = 1geofenceId = 7I have confirmed that:
POST /api/permissionsworks correctlyDELETE /api/permissionsalso works correctlyThe issue seems to be only with the
GETendpoint.I checked the source code in:
but I could not find any
@GETmethods implemented there. From what I can see, only the POST and DELETE handlers exist.This is what is confusing me:
405I 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:
I would really appreciate any clarification or guidance on this.
Thanks in advance.