Skip to content

FilesApi "The resource you're looking for cannot be found", should use 1.0 not 2.0 #406

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

Open
kohoward opened this issue May 2, 2025 · 2 comments

Comments

@kohoward
Copy link

kohoward commented May 2, 2025

SDK you're using (please complete the following information):

  • Version 10.1.0

Describe the bug
When trying to access Files API, you always get 404 "The resource you're looking for cannot be found".

The SDK is incorrectly using 2.0 instead 1.0.

To Reproduce
Steps to reproduce the behavior:

  1. Use FilesApi and call getFiles (or any other files related function like deleteFileAssociation)

Expected behavior
A valid list of files should be returned (or whatever you are looking for)

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Using Postman I find that I am able to access Files related API if I simply change "api.xro/2.0" -> "files.xro/1.0"

Current workaround is to create a dedicate ApiClient for Files and override the basePath.

...
Caused by: com.google.api.client.http.HttpResponseException: 404 Not Found
GET https://api.xero.com/api.xro/2.0/Files
at com.google.api.client.http.HttpResponseException$Builder.build(HttpResponseException.java:293)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1118)
at com.xero.api.client.FilesApi.getFilesForHttpResponse(FilesApi.java:1306)
at com.xero.api.client.FilesApi.getFiles(FilesApi.java:1182)
...

Copy link

github-actions bot commented May 2, 2025

PETOSS-743

Copy link

github-actions bot commented May 2, 2025

Thanks for raising an issue, a ticket has been created to track your request

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

1 participant