Developers · Data
Sharing Data between Sites
Last updated 18 November 2026
This document guides you on how to share data between Sites using the
You can use this functionality to keep data that is the same across the globe - data that you don't want to change (or deploy) in multiple places every time it changes - for example, a list of countries, country ISO codes, or time zones.
Prerequisites
To follow the steps in this tutorial, you should be familiar with Database Items and Users.
- Database Fields and Tables
- Database Items
- Users
- GraphQL API Reference: RemoteRecordsInterface
- GraphQL API Reference: RemoteUsersInterface
Steps
Implement the following steps to share data between sites:
- Step 1: Create a 'child' model
- Step 2: Create 'child' objects
- Step 3: Prepare Graph query
- Step 4: Create a page
- Step 5: Create an authorization policy and Graph query
- Step 6: Create a 'parent' model
- Step 7: Create 'parent' objects
- Step 8: Execute Graph query
Step 1: Create a 'child' model
First, create a model named
---
name: child_model
properties:
- name: child_title
type: string
- name: child_id
type: integer
- name: parent_id_array
type: array
---Step 2: Create 'child' objects
To ensure you have some data in the
{
"child_id": 1,
"child_title": "Title 1",
"parent_id_array": [
"100",
"101"
]
}{
"child_id": 2,
"child_title": "Title 2",
"parent_id_array": [
"101"
]
}Step 3: Prepare Graph query
Create the
query get_main_records {
records(
page: 1
per_page: 10
sort: [{id: {order: ASC}}]
filter: {
table: { value: "child_model" }
}
) {
results {
id
properties
remote: remote_records(
endpoint: {
url: "https://some-remote-api/linked-records.json",
token: "secret-token"
}
join_on_property: "parent_id_array"
) {
id
properties
}
}
}
}You will not execute the above query for now because you first need to ensure that the Site at
Step 4: Create a page
Create the page below inside the
---
slug: linked-records
format: json
authorization_policies:
- api_key_check
---
{% graphql g = "get_linked_records", ids: params.ids %}
{{ g.records.results | json | html_safe }}Step 5: Create an authorization policy and Graph query
Create the referenced authorization policy and Graph query.
Authorization policy:
---
name: api_key_check
redirect_to: /
---
{%- if context.headers.HTTP_AUTHENTICATION_TOKEN == "secret-token" -%}true{%- else -%}false{%- endif -%}Graph query:
query get_linked_records($ids: [String!]) {
records(
page: 1
per_page: 10
sort: [{id: {order: ASC}}]
filter: {
properties: [
{ name: "parent_id", value_in: $ids }
]
}
) {
results {
id
properties
}
}
}Step 6: Create a 'parent' model
Create the model with the schema below in the
---
name: parent_model
properties:
- name: parent_title
type: string
- name: parent_id
type: integer
---Step 7: Create 'parent' objects
Create the the 'parent' objects below:
{
"parent_id": 100,
"parent_title": "Parent Title 1"
}{
"parent_id": 101,
"parent_title": "Parent Title 2"
}Step 8: Execute Graph query
You can now execute the
For each object returned under