Getting the ROOT folder metadata using CMS Source Code API

Hi everyone,

I’m trying to get a list of all the folders in the ROOT of the Design Manager using the CMS | Source Code API. The API works well when providing a folder path, so I can get all the child files/folders of a specific folder, but how can I get the children of the ROOT folder?

So this is the API:
https://api.hubapi.com/cms/v3/source-code/published/metadata/{path}

If I set the {path} to a known folder, it works. But what path should I use for the ROOT folder? I’ve tried leaving it empty, using /root, /ROOT, /DESIGN_ROOT, //, /*. Nothing works.

This works (for myFolder):
https://api.hubapi.com/cms/v3/source-code/published/metadata/myFolder

This doesn’t work (for the root folder):

https://api.hubapi.com/cms/v3/source-code/published/metadata
https://api.hubapi.com/cms/v3/source-code/published/metadata/
https://api.hubapi.com/cms/v3/source-code/published/metadata//
https://api.hubapi.com/cms/v3/source-code/published/metadata/root
https://api.hubapi.com/cms/v3/source-code/published/metadata/DESIGN_ROOT
https://api.hubapi.com/cms/v3/source-code/published/metadata/*

Can anyone help me? Maybe I’m missing something.

Hi @Michael_2 and a big warm welcome from the HubSpot Community! :orange_heart:
Thanks for reaching out! When checking the documentation, it seems to be a limitation of the API.
I’ve noticed a similar idea already present in our Ideas Forum: [CMS API] Get folders/files from Home/Root.
To contribute, you can upvote the existing idea and share more details about your specific use case in the comments.
I’d love to put you in touch with our Top Experts: Hi @Anton, @MichaelMa and @Mike_Eastwood can you think of alternatives to help @Michael_2, please?
Thanks so much and have a wonderful day!
Bérangère