Retrieve a list of pages
curl -X GET "https://www.my-site.com/api/site/v2/pages?per_page=20&page=1&sort_type=created_at&sort_order=desc&filter=%7B%22slug%22%3A%22my-page%22%7D" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-site-id: YOUR_API_KEY"
import requests
import json
url = "https://www.my-site.com/api/site/v2/pages?per_page=20&page=1&sort_type=created_at&sort_order=desc&filter=%7B%22slug%22%3A%22my-page%22%7D"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"x-site-id": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://www.my-site.com/api/site/v2/pages?per_page=20&page=1&sort_type=created_at&sort_order=desc&filter=%7B%22slug%22%3A%22my-page%22%7D", {
method: "GET",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"x-site-id": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://www.my-site.com/api/site/v2/pages?per_page=20&page=1&sort_type=created_at&sort_order=desc&filter=%7B%22slug%22%3A%22my-page%22%7D", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("x-site-id", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://www.my-site.com/api/site/v2/pages?per_page=20&page=1&sort_type=created_at&sort_order=desc&filter=%7B%22slug%22%3A%22my-page%22%7D')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['x-api-key'] = 'YOUR_API_KEY'
request['x-site-id'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/pages
Target server for requests. Edit to use your own host.
The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)
Number of results to retrieve, maximum of 500
Page number to retrieve, used with per_page
Property by which to sort results
Order of results (asc or desc)
Filter pages by field values
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Your Siteglide API key
API Key for authentication. The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)
Query Parameters
Filter pages by field values
{"slug":"my-page"}Exact match on slug{"layout":"application"}Exact match on layout{"request_method":"GET"}Exact match on request_method{"content":"hello world"}Content contains a string{"created_at":{"gt":1700000000}}Created after a unix timestamp{"updated_at":{"gte":1700000000,"lte":1800000000}}Updated between two unix timestamps{"deleted_at":{"exists":true}}Has a deleted_at value (i.e. is soft-deleted){"metadata[attributes][0][key]":"color","metadata[attributes][0][value]":"blue"}Filter by metadata attribute key/valueResponses
OK