Get Block by Version
Overview
This endpoint let users retrieve specific version of a block. There can be multiple versions of same block so users can specify which version of the block they want to use. Authentication is required through a bearer token.
-
Method:
GET -
URL:
/v0/blocks/{name}/versions/{version} -
Operation: Retrieve specific version of a block
-
Authentication Required: Yes
Authorization
You need the api key which you can get from the API tab in Workspace Settings. The api key is required in almost all the commands
Authorization: <YOUR_API_KEY>Path Parameters
The only path parameter required here are name and version of the block.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique identifier of the block |
version | string | Yes | Unique identifier of the block version |
Response
A 200 OK response indicates that the request to get block versions was successful. The response contains an array of block objects with details such as id, title, status, version, description, inputs, outputs, and more. Each object represents a distinct version of the specificed block.
| Field | Type | Description |
|---|---|---|
id | string | Unique ID of the block |
block_status | string | Status of the block (e.g., released) |
title | string | Name of the block |
description | string | Description of the block |
version | string | Version of the block |
input | object[] | Array of input data objects. See Data Types for structure details. |
output | object[] | Array of output data objects. See Data Types for structure details. |
price | number | Unit price of running block |
info | object[] | More information about the block |
supported_collections_id | string | Sensors supported by the block |
created_at | date | Date when the block was released |
Here is a sample response:
{
"blocks": [
{
"id": "string",
"block_status": "string",
"spec": {
"kind": "string",
"type": "string",
"description": "string",
"id": "string",
"version_id": "string",
"name": "string",
"title": "string",
"version": "string",
"status": "int",
"inputs": [
{
}
],
"outputs": [
{
}
],
"catalog_content_url": "url",
"supported_collections_id": [
"string",
"string"
]
},
"created_at": "Date&Time in UTC",
"err": ""
}
]
}A 400 error occurs if the request is malformed or includes invalid path parameter. A 403 error means access is forbidden, usually due to invalid credentials or insufficient permissions. Both responses return structured error messages detailing the issue encountered.
{
"error": {
"code": "string",
"details": "any",
"message": "string"
}
}How to use the endpoint
-
Construct your Request:
Prepare the GET request and add mandatory path parameters. Set the Authorization header with your valid bearer token. -
Send the Request:
Send the request to:https://api.pixxel.space/v0/blocks/{name}/versions/{version} -
Examine the Response:
On success (200 OK), you'll receive a list of blocks with full metadata. If there's an issue with the request, you’ll receive a structured error response (400 or 403) explaining the problem.