Retrieve a version's file
Reads a file the version versionId ships, base64 encoded: its icon, a preview thumbnail (state names which), its readme or its agent_guide.
Guide: Publishing
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
The project's id, proj_.... A secret key works only in the project it belongs to.
The registry component's id, cmp_pkg_....
Which file to read: icon, thumbnail, readme or agent_guide.
Value in
- "icon"
- "thumbnail"
- "readme"
- "agent_guide"
Query parameters
The id of the version whose file to read, cmp_pkg_ver_....
For a thumbnail, the preview state it shows; one of the version's thumbnailStates.
Examples
curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/registry-components/cmp_pkg_h2j7k4l9z1x6c3v8b5n0m4q7/files/readme?versionId=cmp_pkg_ver_e5r8t2y6u0i3o7p1a4s9d2f6" \ -H "Authorization: Bearer vh_sk_..."{ "base64": "IyBQbGFuIHBpY2tlcgoKU2VsZWN0YWJsZSBwbGFucyBmb3IgYSBwYXl3YWxsLiBUYXBwaW5nIGEgcGxhbiBzZWxlY3RzIGl0IGFuZCBlbWl0cyBgc2VsZWN0ZWRgIHdpdGggaXRzIHByb2R1Y3QgaWQuCg==", "contentType": "text/markdown; charset=utf-8"}{ "error": { "type": "invalid_request", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "unauthenticated", "code": "invalid_api_key", "message": "This secret key is not valid." }}{ "error": { "type": "permission_denied", "code": "permission_denied", "message": "Insufficient permissions." }}{ "error": { "type": "not_found", "code": "registry_component_version_not_found", "message": "This registry component has no version cmp_pkg_ver_e5r8t2y6u0i3o7p1a4s9d2f6.", "param": "versionId" }}{ "error": { "type": "internal", "code": "internal_error", "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing." }}Response body
application/json
application/json
application/json
application/json
application/json
application/json
Errors
| Status | type | code | When |
|---|---|---|---|
| 404 | not_found | registry_component_version_not_found | — |
| 404 | not_found | registry_component_file_not_found | When the version has no such file. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Component registry
- Retrieve the registry publisher
GET - Claim a registry namespace
PUT - List registry components
GET - Publish a component bundle
POST - Publish a project component
POST - Retrieve a registry component
GET - Update a registry component
PATCH - List a registry component's versions
GET - Retrieve a registry component version
GET - Update a registry component version
PATCH - Review an install
GET - List installed components
GET - Install a registry component
POST - Retrieve an install
GET - Update an install
PATCH - Uninstall a registry component
DELETE
Something wrong or missing on this page? Tell us by email or on Discord.