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

API design #53

Open
Marlamin opened this issue Jan 5, 2020 · 3 comments
Open

API design #53

Marlamin opened this issue Jan 5, 2020 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Marlamin
Copy link
Owner

Marlamin commented Jan 5, 2020

Required endpoints, etc. Read-only stuff first, please.

https://petstore.swagger.io/#/ seems like a good base.

@Marlamin Marlamin added enhancement New feature or request help wanted Extra attention is needed labels Jan 5, 2020
@Marlamin
Copy link
Owner Author

Marlamin commented Feb 11, 2020

https://api.wow.tools/swagger/index.html

Current idea is up at the above URL. Only the /tactkeys endpoint is implemented right now.

Feedback on which endpoints there are/what data is exposed is welcome, some parameters are in the midst of being changed around so don't mind those.

@Meorawr
Copy link
Contributor

Meorawr commented Feb 26, 2020

In terms of LibRPMedia our data exporter uses the following currently:

  • Database exports (via /api/export/?name=<name>&build=<build>).
  • Filelist dumps (via /casc/listfile/download/csv/build?buildConfig=<build>).
  • Additionally I've got a branch which is using the current /api/data/tactkeylookup and /api/data/tactkey endpoints.

The proposed API looks mostly good enough to cover my use cases there, with a few notes:

/files
There doesn't seem to be an endpoint for getting a full listfile for a specific build (mirroring the endpoint I'm using above) unless that's the intended functionality of /builds/{buildConfig}/files? Currently it looks like I'd have to get the full list via /files and then issue a request to /files/{fileDataID}/versions for each one to figure out whether or not a specific file is present in a build.

Additionally as JSON is supported as an export format for databases, would it make sense to also extend this to the listfile?

/tactkeys
The TACTKeys endpoints looks great. Would it be possible to additionally have a reverse lookup to get the list of TACTKeys used by a single file (identified by its file ID, or content hash if applicable) - such as /files/{fileDataID}/tactkeys? I'd have a potential (and very minor) use case for it, but if it isn't trivially possible then I can just make the reverse mapping myself via what's already proposed.

@Marlamin
Copy link
Owner Author

Marlamin commented Feb 26, 2020

You're right, listfiles likely have a place here as well and I don't see why they shouldn't be a part of it. Will keep that in mind next time I work on it. JSON listfiles are probably doable as well though that ends up being some pretty hefty JSON to read.

As for what tactkey a file is encrypted with, that's definitely doable. Might just include that in the /files/{fileDataID} endpoint instead of making a separate one for it.

Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants