> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/iacm-api-reference/module-registry/list-module-example-tree.md).

# List module example tree

List the immediate children (files and subdirectories) at the given path within a module version's examples/ tree. The path must be exactly "examples" (root listing) or begin with "examples/". Returns one level of entries, each tagged as a file or directory.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"module-registry","description":"The module-registry service is a private registry for Terraform/Opentofu modules"}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/modules/{module_id}/examples/tree":{"get":{"tags":["module-registry"],"summary":"List module example tree","description":"List the immediate children (files and subdirectories) at the given path within a module version's examples/ tree. The path must be exactly \"examples\" (root listing) or begin with \"examples/\". Returns one level of entries, each tagged as a file or directory.","operationId":"module-registry#list-module-example-tree","parameters":[{"name":"version","in":"query","description":"version of the module","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"version of the module"}},{"name":"scope_org","in":"query","description":"org name","allowEmptyValue":true,"schema":{"type":"string","description":"org name"}},{"name":"scope_project","in":"query","description":"project name","allowEmptyValue":true,"schema":{"type":"string","description":"project name"}},{"name":"path","in":"query","description":"relative path under the module root; must be \"examples\" or begin with \"examples/\"","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"relative path under the module root; must be \"examples\" or begin with \"examples/\"","pattern":"^[a-zA-Z0-9_-][a-zA-Z0-9._/-]*$","minLength":1,"maxLength":1024}},{"name":"module_id","in":"path","description":"module id","required":true,"schema":{"type":"string","description":"module id"}},{"name":"Harness-Account","in":"header","description":"account name","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"account name"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListModuleExampleTreeResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/RegistryError"}}}}}}}},"components":{"schemas":{"ListModuleExampleTreeResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExampleTreeItem"},"description":"immediate children at the requested path"}},"required":["items"]},"ExampleTreeItem":{"type":"object","properties":{"content_type":{"type":"string","description":"kind of entry","enum":["file","directory"]},"name":{"type":"string","description":"leaf name of the entry (no path separators)"},"path":{"type":"string","description":"full relative path from the module root, forward-slash separated"}},"required":["name","path","content_type"]},"RegistryError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
