> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herodotus.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Module Versions

> Retrieve all versions of a specific HDP module

# 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

| Parameter | Type   | Description                 |
| --------- | ------ | --------------------------- |
| id        | string | The unique module ID (ULID) |

## Example Request

```bash theme={null}
curl -X GET https://staging.hdp.api.herodotus.cloud/modules/01JPJ03YJT1A93D6NF56G4GVEQ/versions \
  -H "Content-Type: application/json"
```

## Response

### Success Response (200 OK)

```json theme={null}
[
  {
    "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)

```json theme={null}
{
  "error": "Module not found"
}
```

### Response Fields

Each version object contains:

| Field            | Type           | Description                                       |
| ---------------- | -------------- | ------------------------------------------------- |
| hash             | string         | Program hash (unique identifier for this version) |
| moduleRegistryId | string         | The module ID this version belongs to             |
| storageType      | string         | Storage type: "s3" or "db"                        |
| version          | string         | Semantic version number                           |
| versionChangelog | string \| null | Changelog for this version                        |
| s3Key            | string \| null | S3 key if stored in S3                            |
| createdAt        | string         | ISO 8601 timestamp of version creation            |
| updatedAt        | string         | ISO 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
