Assets

Get asset collection hierarchy

Changed on

Get the nested subtree rooted at an asset collection, plus its ancestor collections ordered from the top level down to its direct parent.

Required permissions: assets:read. Key presets that include them: API, SERVERLESS, READONLY, FULL. See key permissions.

get/assets/collections/{collection_id}/hierarchy

Request

  • Base URL
    https://api.fal.ai/v1
  • URL
    https://api.fal.ai/v1/assets/collections/{collection_id}/hierarchy
  • Auth
    API key in header Authorization

Path parameters

collection_idstring required

Collection ID

Example:d8b6elcregj72v34jr8g

Response

Collection hierarchy

Example response

{
  "hierarchy": {
    "id": "d8b6elcregj72v34jr8g",
    "name": "Campaign concepts",
    "children": [
      {
        "id": "d8b6elcregj72v34jr8g",
        "name": "Campaign concepts",
        "children": [
          {
            "id": "d8b6elcregj72v34jr8g",
            "name": "Campaign concepts",
            "children": [
              {
                "id": "d8b6elcregj72v34jr8g",
                "name": "Campaign concepts",
                "children": [
                  {
                    "id": "d8b6elcregj72v34jr8g",
                    "name": "Campaign concepts"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "ancestors": [
    {
      "id": "d8b6elcregj72v34jr8g",
      "name": "Campaign concepts"
    }
  ]
}

Changes

    • info

      the endpoint scheme security readonlyApiKey was added to the API

    • info

      the endpoint scheme security apiKey was removed from the API