Skip to main content
Question

Unable to Export Local Variables - API Endpoint Returns "Request Too Large" Error

  • February 10, 2025
  • 6 replies
  • 202 views

petrvostry

I'm encountering an issue with the Variables API endpoint when attempting to export local variables. The endpoint returns all remote variables from shared files, making it impossible to export only local variables.

Current Behavior:

  • The endpoint returns all remote variables from shared files
  • Unable to filter or export only local variables
  • Receiving a 400 error with "Request too large" message

Error Response:

{ "status": 400, "error": true, "message": "Request too large. If applicable, filter by query params." }

Technical Details:

  • The error message suggests using query parameters for filtering
  • However, the endpoint documentation doesn't list any available query parameters
  • The endpoint lacks pagination capabilities
  • This limitation makes the endpoint essentially unusable for files with many variables

Expected Behavior:

  • Ability to export only local variables
  • Support for filtering variables (local vs. remote)
  • Pagination support for large variable sets

Impact: This issue significantly impacts workflow automation and variable management, especially in projects with multiple shared libraries and variable collections.

Suggested Solutions:

  1. Add query parameters for filtering variable types (local/remote)
  2. Implement pagination support
  3. Add ability to specify variable scope in the request

Let me know if you'd like me to modify any part of this bug report.

petrvostry
  • New Member
  • February 26, 2025

Anyone?


EmilienH
  • New Member
  • June 19, 2025

We are facing the same issue. It also doesn’t help that deleted variables and collections are also being returned by this endpoint, with no way to permanently remove them.


djv
Figmate
  • Community Support
  • June 20, 2025

Hey All, thanks for reaching out and apologies for the lack of acknowledgement here! 

Our API team confirmed that the error message “Request Too Large” is a catch-all error message and is not currently specific to an endpoint. The issue stems from the file being too large for our variable export system to handle effectively.
 
We fully understand how important this functionality is to your workflow, so I can assure you that the team is working on enhancements to the variables endpoint, including implementing filters, as part of a planned feature update. While we don’t have a definitive timeline for these improvements, they are on our roadmap. Your feedback is truly invaluable in helping us prioritize this work.
 
In the meantime, the best temporary solution is splitting the file into smaller parts. While this solution isn’t ideal, we appreciate your understanding as we work toward long-term improvements.


EmilienH
  • New Member
  • June 23, 2025

Hi ​@djv, thanks a lot for your reply and for acknowledging the issue.

The issue stems from the file being too large for our variable export system to handle effectively.

This is very helpful information, do you know specifically if the problem is the file being too large overall, or the number of variables being too high? 

Splitting the file is doable but splitting the variable library would be a problem.

Thanks again, we appreciate your help!


djv
Figmate
  • Community Support
  • July 3, 2025

Hi ​@EmilienH, thanks for following up about this and apologies for the delayed reply! 

The team did some investigation, and they’re still not able to pin point if it’s specifically a large file issue or a number of variables issue. Typically, Figma runs a job to process the file, and if it takes longer than 55 seconds for any reason, the job will be cancelled and return the “Request too large” error. 

In general, larger and more complex files are more likely to timeout, but we can’t say with confidence what is more or less likely to be causing it. 

The team truly appreciates your feedback though. They’re now working on reevaluating our current job process for improvement. 


Annelies_Groeneveld

Super keen for a solution here too!


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