Skip to content

Resource Versions

Manage versions and files for marketplace resources.

All version endpoints are prefixed with /resources/:resourceId/versions


POST /resources/:resourceId/versions

Create a new version for a resource.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID

Request Body:

{
"version": "1.0.0",
"changelog": "Initial release",
"hytaleVersionIds": ["hytale-version-id-1"],
"isPreRelease": false
}

Response:

{
"id": "version-id",
"resourceId": "resource-id",
"version": "1.0.0",
"changelog": "Initial release",
"downloadCount": 0,
"isPreRelease": false,
"createdAt": "2024-01-01T00:00:00Z"
}

GET /resources/:resourceId/versions

Get all versions for a resource.

Authentication: Not required

URL Parameters:

  • resourceId (string) - Resource ID

Response:

{
"versions": [
{
"id": "version-id",
"version": "1.0.0",
"changelog": "Initial release",
"downloadCount": 150,
"fileCount": 2,
"primaryFileId": "file-id",
"isPreRelease": false,
"createdAt": "2024-01-01T00:00:00Z",
"hytaleVersions": [...]
}
]
}

GET /resources/:resourceId/versions/:versionId

Get details of a specific version.

Authentication: Not required

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Response:

{
"version": {
"id": "version-id",
"version": "1.0.0",
"changelog": "Initial release",
"downloadCount": 150,
"files": [...],
"primaryFileId": "file-id",
"hytaleVersions": [...]
}
}

PATCH /resources/:resourceId/versions/:versionId

Update a version’s details.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Request Body: (all fields optional)

{
"version": "1.0.1",
"changelog": "Bug fixes",
"hytaleVersionIds": ["version-id"],
"isPreRelease": false
}

DELETE /resources/:resourceId/versions/:versionId

Delete a version.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Response:

{
"message": "Version deleted successfully"
}

POST /resources/:resourceId/versions/:versionId/files

Upload a file for a version.

Authentication: Required (must be owner or contributor)

Content-Type: multipart/form-data

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Form Data:

  • file (file) - File to upload (JAR, ZIP, etc.)
  • displayName (string, optional) - Custom display name for the file

Response:

{
"id": "file-id",
"versionId": "version-id",
"fileName": "my-mod-1.0.0.jar",
"displayName": "Main File",
"fileSize": 1048576,
"downloadCount": 0,
"isPrimary": false,
"downloadUrl": "https://...",
"createdAt": "2024-01-01T00:00:00Z"
}

DELETE /resources/:resourceId/versions/:versionId/files/:fileId

Delete a file from a version.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID
  • fileId (string) - File ID

PATCH /resources/:resourceId/versions/:versionId/files/primary

Set a file as the primary download for a version.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Request Body:

{
"fileId": "file-id"
}

GET /resources/:resourceId/versions/:versionId/download/:fileId

Download a specific file from a version. This endpoint redirects to the actual download URL.

Authentication: Not required (but recommended for download tracking)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID
  • fileId (string) - File ID

Response: HTTP 302 redirect to download URL


GET /resources/:resourceId/versions/:versionId/download

Download the primary file of a version. This endpoint redirects to the actual download URL.

Authentication: Not required (but recommended for download tracking)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Response: HTTP 302 redirect to download URL


PATCH /resources/:resourceId/versions/:versionId/set-latest

Mark this version as the latest version for the resource.

Authentication: Required (must be owner or contributor)

URL Parameters:

  • resourceId (string) - Resource ID
  • versionId (string) - Version ID

Response:

{
"message": "Version set as latest",
"version": {
"id": "version-id",
"isLatest": true
}
}