Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endurain v0.6.0 changes in API root path #1205

Open
joaovitoriasilva opened this issue Nov 18, 2024 · 4 comments
Open

Endurain v0.6.0 changes in API root path #1205

joaovitoriasilva opened this issue Nov 18, 2024 · 4 comments

Comments

@joaovitoriasilva
Copy link

Hello,

Version v0.6.0 of Endurain will be released this week with a change on the API root path adding "/api/v1" in the beginning of every endpoints, so:

  • "/token" will be "/api/v1/token" and "/refresh" will be "/api/v1/refresh"
  • "/activities/create/upload" will be "/api/v1/activities/create/upload"

Also since v0.5.0, activity uploads support .fit files.

Using tag "dev_18112024" instead of "latest" will give you an updated version with the changes.
@AquaWolf can you help on this like before?

Thank you.

@AquaWolf
Copy link
Contributor

First of all thanks for your ping @joaovitoriasilva 😀
Yes I could have a look. I'll keep you posted here.

@joaovitoriasilva
Copy link
Author

joaovitoriasilva commented Nov 18, 2024

Thanks @AquaWolf.

BTW the v0.6.0 version will also have a new "/api/v1/about" endpoint that returns the version. Maybe you can use this to use the new root path based on version? I don't know if it is worth the trouble.

{
  "name": "Endurain API",
  "version": "v0.6.0",
  "license": {
    "name": "GNU General Public License v3.0",
    "identifier": "GPL-3.0-or-later",
    "url": "https://spdx.org/licenses/GPL-3.0-or-later.html"
  }
}

@AquaWolf
Copy link
Contributor

AquaWolf commented Dec 2, 2024

ok I now changed the API path but if I want to upload a gpx file it failes.
Trying it with the web import I also get an error importing a gpx file.

In the web frontend I get this error:

Error fetching info - Error: 500 - Can't open GPX file: 1 validation error for Activity
max_cad
Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=123.12345, input_type=float]
For further information visit https://errors.pydantic.dev/2.10/v/int_from_float

trkpt looks like that:

<trkpt lon="45.67891" lat="45.67891">
        <ele>45.67891</ele>
        <time>1999-01-11T07:21:12Z</time>
        <extensions>
          <gpxtpx:TrackPointExtension>
            <gpxtpx:cad>123.12345</gpxtpx:cad>
            <accuracy>2.34567</accuracy>
          </gpxtpx:TrackPointExtension>
        </extensions>
      </trkpt>

The values are changed if you need a whole file we could have a direct chat on some other platform if you like.

@joaovitoriasilva
Copy link
Author

@AquaWolf I am sorry but I totally missed this. Can you please send the gpx to [email protected] so I could check this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants