Skip to main content
Question

How to get unpublished components from rest API

  • November 21, 2023
  • 2 replies
  • 325 views

Bryan_Wong

the rest api returns a list of published components according to docs https://www.figma.com/developers/api#get-files-endpoint

This list does not include unpublished components. Is there a way to include them in the response?

2 replies

tank666
  • 4862 replies
  • November 21, 2023

The endpoint you reference returns all components in the file.


  • 5 replies
  • July 10, 2024

@tank666 are you sure?

I have the same issue than @Bryan_Wong .

From what I tested:

  1. /v1/files/xxx/ returns the whole tree, entire local components, but remote components are just listed with a โ€œkeyโ€ (no fileId or so)
  2. /v1/files/xxx/nodes?ids=$NODE_ID wonโ€™t bring much information about the fileId
  3. /v1/files/xxx/components returns only published components
  4. The only way to get information about the remotely used component is by using /v1/components/$KEY_ID but it requires doing 1 call for each component

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings