Skip to main content

Get Module Versions

Retrieves all versions (programs) associated with a specific HDP module. This endpoint does not require authentication.

Endpoint

GET /modules/{id}/versions

Path Parameters

ParameterTypeDescription
idstringThe unique module ID (ULID)

Example Request

curl -X GET https://staging.hdp.api.herodotus.cloud/modules/01JPJ03YJT1A93D6NF56G4GVEQ/versions \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

[
  {
    "hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
    "moduleRegistryId": "01JPJ03YJT1A93D6NF56G4GVEQ",
    "storageType": "s3",
    "version": "1.0.0",
    "versionChangelog": "Initial release",
    "s3Key": "programs/0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0.json",
    "createdAt": "2024-03-17T10:24:00Z",
    "updatedAt": "2024-03-17T10:24:00Z"
  },
  {
    "hash": "0x45b27589f94g70d5g1cdeb8650e43g03k0c8887cc4g82eb17ef445g2982fcb1",
    "moduleRegistryId": "01JPJ03YJT1A93D6NF56G4GVEQ",
    "storageType": "s3",
    "version": "1.1.0",
    "versionChangelog": "Added new features",
    "s3Key": "programs/0x45b27589f94g70d5g1cdeb8650e43g03k0c8887cc4g82eb17ef445g2982fcb1.json",
    "createdAt": "2024-03-18T10:24:00Z",
    "updatedAt": "2024-03-18T10:24:00Z"
  }
]

Not Found Response (404)

{
  "error": "Module not found"
}

Response Fields

Each version object contains:
FieldTypeDescription
hashstringProgram hash (unique identifier for this version)
moduleRegistryIdstringThe module ID this version belongs to
storageTypestringStorage type: “s3” or “db”
versionstringSemantic version number
versionChangelogstring | nullChangelog for this version
s3Keystring | nullS3 key if stored in S3
createdAtstringISO 8601 timestamp of version creation
updatedAtstringISO 8601 timestamp of last update

Notes

  • No authentication is required for this endpoint
  • Returns all versions of the module ordered by creation date
  • Each version represents a different compiled program for the same module
  • Versions are identified by their program hash
  • The storageType indicates where the compiled program is stored (S3 or database)
  • The s3Key is only present if the program is stored in S3