Page MenuHomeFeedback Tracker

[Feature Request] Add API for workshop
Assigned, NormalPublic

Description

Workshop API

Basic

a simple API that allows you to receive information about addons, monitor their updates and get statistics without parsing the site with bots:

  1. Get information about the addon:

GET "/workshop/591AF5BDA9F7CE8B"
or
GET "/workshop?id=591AF5BDA9F7CE8B"
Results in:

{
    // Item description
    "name": "CAPTURE & HOLD",
    "author": "Bohemia Interactive",
    "summary": "Join teams of players and the fight for Everon in Capture & Hold, an official multiplayer game mode.",
    "description": "Engage in close-quarters combat, secure key objectives, and hold your ground against opponents in this collection of fast-paced, team versus team scenarios. Created by Bohemia Interactive, Capture & Hold is the ideal addon for those players that enjoy quick and decisive battles.",
    "changelog": "", // Changelog for current version
    "preview": "previewimgaeurl"
    "images": [
        "image1url",
        "image2url",
        "image3url"
    ],
    "license": "APL",
    "tags": [
        "action",
        "capture",
        // ...
    ],
    // Item stats
    "rating": 97,
    "version": "1.0.5",
    "gameVersion": "1.0.0.54",
    "size": 42446356, // in bytes
    "sunscribers": 61230,
    "downloads": 125414,
    "created": "10.05.2022",
    "updated": "16.11.2023",
    // Versions history
    "versions": [
        "0.6.3",
        "0.6.4",
        // ...
        "1.0.4",
        "1.0.5"
    ],
    // Scenarios
    "scenarios": [
        "3F2E005F43DBD2F8",
        "F1A1BEA67132113E",
        // ...
    ]
}
  1. Get information about the addon with specific version:

GET "/workshop/591AF5BDA9F7CE8B?version=1.0.0"
Results in same as above, but for specified version.

  1. Get information about the scenario:

GET "/workshop/591AF5BDA9F7CE8B?scenario=3F2E005F43DBD2F8"
GET "/workshop/591AF5BDA9F7CE8B?version=1.0.0&scenario=3F2E005F43DBD2F8"
Results in:

{
    "name": "Capture & Hold: The Briars",
    "gamemode": "Capture & Hold",
    "players": 64,
    "description": "A US fuel depot has been left undefended, south-east of Lamentin, following the Soviet attack on Morton. If it's captured, it might prevent American troops from evacuating the island.",
    "preview": "previewimageurl",
    "path": "{3F2E005F43DBD2F8}Missions/CAH_Briars_Coast.conf"
}

Advanced

In the future, it would be a good to add various additional functions to the API:

  1. If the addon has a localisation, then you can specify the language in the request parameters to get information about the addon in a specific language:

GET "/workshop/591AF5BDA9F7CE8B?lang=ru_Ru"

The following can be implemented through a console program like steamcmd, which will be supplied with the official tools.

  1. Download addons directly (for community-made tools):

GET "workshop/download?id=591AF5BDA9F7CE8B"
GET "workshop/download?id=591AF5BDA9F7CE8B&version=1.0.0"
Or for console version:

reforgerworkshopcmd download 591AF5BDA9F7CE8B --folder /path/to/addon
reforgerworkshopcmd download 591AF5BDA9F7CE8B --version 1.0.0 --folder /path/to/addon
  1. Managing workshop items (for community-made tools):
  • Creating (returns id): POST "/workshop?key=XXXXXX".
  • Updating: PATCH "/workshop?key=XXXXXX&id=591AF5BDA9F7CE8B".
  • Deleting: DELETE "/workshop?key=XXXXXX&id=591AF5BDA9F7CE8B".
  • Key XXXXXX can be obtained through some registration form on the site.

Or for console version:

reforgerworkshopcmd upload --folder /path/to/addon
reforgerworkshopcmd update 591AF5BDA9F7CE8B --folder /path/to/addon
reforgerworkshopcmd delete 591AF5BDA9F7CE8B

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 11 x64
Category
General

Event Timeline

dedmen added a subscriber: dedmen.Jan 22 2024, 11:51 AM

Maybe also a separate endpoint just for a mods version.
Many people will want to check simply "is this mod up to date", and fetching the whole description and stats for that everytime would be a waste.

vlad333000 updated the task description. (Show Details)Jan 22 2024, 5:36 PM
Geez changed the task status from New to Assigned.Jan 23 2024, 5:57 PM