[Public] Mod publish API

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
Post Reply
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 174
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

[Public] Mod publish API

Post by vinzenz »

This is the last post of this kind for today ;) I just finished documenting the new https://wiki.factorio.com/Mod_publish_API

I'm aware that testing this API can be quite a hassle without a "Delete Mod" button, but I didn't want to delay the release.
bringing the oops to devops

fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

Re: [Experimental] Mod publish API

Post by fredthedeadhead »

The 'mod publish' API is really great! It was easy for me to set up an deployment task using Gradle.

My one request is that you use OpenAPI (or an alternative, if any exist?) to document the REST APIs. It's nice having a parseable spec that's a consistent format.

I have a question. Instead of versioning the API in the URL, have you considered versioning in the 'media type' header? https://opensource.zalando.com/restful- ... lines/#114 I can recommend it, because it allows for more flexible updating of an API, but it's a very soft suggestion - URL versioning has its own advantages.

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 174
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [Experimental] Mod publish API

Post by vinzenz »

Thank you for the testing the publish API! Yes I'm aware of OpenAPI, but integrating it into the existing codebase takes a bit of work. At least with the new http APIs I did some internal refactoring so maybe in the future I'll get to implementing it. I think I'll stay with the /v2/ prefix for a while. The media type header is maybe something for the /v3/ version in x years :D But maybe then we'll pivot to GraphQL ;)
bringing the oops to devops

fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

Re: [Experimental] Mod publish API

Post by fredthedeadhead »

vinzenz wrote:
Wed Jul 13, 2022 8:37 am
Thank you for the testing the publish API! Yes I'm aware of OpenAPI, but integrating it into the existing codebase takes a bit of work. At least with the new http APIs I did some internal refactoring so maybe in the future I'll get to implementing it.
Even if it's not integrated in the code, publishing an OpenAPI spec would be nice :) I think it would basically replace publishing the specs on the wiki.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: [Experimental] Mod publish API

Post by ptx0 »

yeah and you should also do a Swagger and API Blueprint and a full Apiary.io demo (/sarcasm) -- or just keep the specs on the wiki like you've always done

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 174
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [Public] Mod publish API

Post by vinzenz »

I've moved the publish API to the v2 prefix and updated the API docs page. I've decided against merging it with the upload API, because it would make the endpoint to complicated and error-prone.
bringing the oops to devops

Post Reply

Return to “Mod portal Discussion”