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

404 Error on retrieving organizations #29

Closed
DavHau opened this issue Nov 16, 2019 · 7 comments · Fixed by #32
Closed

404 Error on retrieving organizations #29

DavHau opened this issue Nov 16, 2019 · 7 comments · Fixed by #32

Comments

@DavHau
Copy link

DavHau commented Nov 16, 2019

The first example of the readme api.query().organizations.get() fails with error 404:
{"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.", "type": "404"}

@sambonbonne
Copy link

Hello,
Same here, I guess this is because the SDK uses old API URLs (like cp-par1.scaleway.com instead of api.scaleway.com/instance/v1/zones/fr-par-1).
Is it possible to update the SDK?

@brmzkw
Copy link
Contributor

brmzkw commented May 8, 2020

Can you provide a snippet?

It's working fine for me.

from scaleway.apis import AccountAPI, ComputeAPI
import sys

token = sys.argv[1]

api = AccountAPI(auth_token=token)
data = api.query().organizations.get()
assert 'organizations' in data

cp_api = ComputeAPI(auth_token=token)
data = cp_api.query().servers.get()
assert 'servers' in data

@sambonbonne
Copy link

For me it was a bug on my side, sorry.

Anyway, don't you think the SDK should be updated to use the new endpoint? The API documentations recommends to not use old enpoints.

@brmzkw
Copy link
Contributor

brmzkw commented May 10, 2020

I am no longer working at Scaleway, but I imagine it would indeed be better to use the new endpoints. On the other hand, I also imagine they won't break backward compatibility as some opensource projects will still use the old URLs (cloud-init, docker, ...).

@sambonbonne
Copy link

If you don't work at Scaleway anymore, does anyone maintain this project?

@brmzkw
Copy link
Contributor

brmzkw commented May 11, 2020

cc @jerome-quere

@abarbare
Copy link
Contributor

abarbare commented Jun 4, 2020

URL endpoints wille be updated there #32

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

Successfully merging a pull request may close this issue.

5 participants