Skip to content

api: return minimal info form the GET /v1/app/{id}/bricks endpoint #122

@dido18

Description

@dido18

Describe the problem

If confirmed by the AppLab that the variables and config_variables are not used, we can remove some info from the list of bricks installed into the app.

To reproduce

curl http://localhost:8800/v1/apps/ZXhhbXBsZXM6aW1hZ2UtY2xhc3NpZmljYXRpb24/bricks 

{
  "bricks": [
    {
      "id": "arduino:image_classification",
      "name": "Image Classification",
      "author": "Arduino",
      "category": "video",
      "status": "installed",
      "variables": {
        "CUSTOM_MODEL_PATH": "/home/arduino/.arduino-bricks/ei-models",
        "EI_CLASSIFICATION_MODEL": "/models/ootb/ei/mobilenet-v2-224px.eim"
      },
      "config_variables": [
        {
          "name": "CUSTOM_MODEL_PATH",
          "value": "/home/arduino/.arduino-bricks/ei-models",
          "description": "path to the custom model directory",
          "required": false
        },
        {
          "name": "EI_CLASSIFICATION_MODEL",
          "value": "/models/ootb/ei/mobilenet-v2-224px.eim",
          "description": "path to the model file",
          "required": false
        }
      ]
    }
  ]
}

Expected behavior

curl http://localhost:8800/v1/apps/ZXhhbXBsZXM6aW1hZ2UtY2xhc3NpZmljYXRpb24/bricks 

{
  "bricks": [
    {
      "id": "arduino:image_classification",
      "name": "Image Classification",
      "author": "Arduino",
      "category": "video",
      "status": "installed",
  ]
}

Arduino App CLI version

0.6.8

Additional context

The list brick endpoint returns the sma minila info

curl 127.0.0.1:8800/v1/bricks 
{
  "bricks": [
    {
      "id": "arduino:dbstorage_sqlstore",
      "name": "Database - SQL",
      "author": "Arduino",
      "description": "Simplified database storage layer for Arduino sensor data using SQLite local database.",
      "category": "storage",
      "status": "installed",
      "require_model": false
    }
]

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions