Skip to content

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

@kohoward

Description

@kohoward

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)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions