API Reference

A step by step guide to connect Layer to Google Sheets

You can sync Layer data to Google Sheets via Layer's API. Take a look at the video above or follow along with the guide below.

Step 1: Install the API Connector Extension

  • In Google Sheets go to Extensions > Add-Ons > Get add-ons
  • Search for API Connector and Install or you can install from this link

Step 2: Open API Connector and Format Request URL

  • Once you have installed the API Connector Extension, navigate to Google Sheets
  • Go to Extensions > API Connector > Open
  • Click Create request
  • Start by adding a Request URL. All requests start with https://api.layer.team See below for an example request where {PROJECT_ID} is your project's ID and the {CATEGORY_ID} is the category that you want to get elements from. Not sure where to find your Project ID and Category ID? Take a look at this guide.
https://api.layer.team/projects/{PROJECT_ID}/elements?categoryId={CATEGORY_ID}&format=simple
  • Under the Headers section, add a header for authorization by entering the text Authorization in the Key input and the following text in the Value input: Bearer {YOUR_API_TOKEN}. You can find your API Token here.
    Note: Your API token can be used to access any project in your Layer account so be sure to keep this token safe and not use the token in any public facing code.

Confider Output settings

  • Click Set current as the output or manually type which sheet you would like to map it to in the text input
  • You can optionally choose the Output mode, Report style, and Pagination of the incoming data

Optionally Save and Run Request

  • In the Name input you can optionally name your request to save and find for later
  • Click Run
  • The data from the endpoint should now show up in the sheet

Optionally Format Output Data

You can tailor the data further by playing with the settings under Output Settings > More Options. Specifically, you can use JMESPath rules to reconfigure the way your data is being mapped to the spreadsheet. You can read more about JMESPath rules here and see some examples here.