API of the new version of traccar (reports)

Eduardo Maciela month ago

Hello, I'm trying to consume the API of the new version of traccar, but the requests at the reports endpoint (tris, stops, summary) are having problems. Does anyone have a solution?

Return this in the response

PKPKPKPKPKPKPKPKPKPKPKPK

Anton Tananaeva month ago

Are you sending the "Accept" header?

Eduardo Maciela month ago

I'm sending Content-Type application/json

Anton Tananaeva month ago

You have to send the Accept header. This has been discussed many times before.

Eduardo Maciela month ago

What is the value of accept? This header information is not included in the API documentation

Eduardo Maciela month ago

I'm sending Accept application/json and it worked. Thanks

Track-tracea month ago

@Eduardo Maciel

Can you show howto please

Adriano Mirandaa month ago

@Track-trace The required approach may vary depending on the programming language or software you're using to make the call. However, you can simply add one more key to your header like Accept: application/json