DataPress logo
API Reference

Site Settings

Version:  4.1
Updated:  17th August 2026

Fetching Site Settings

Site settings includes the ID of topics and the custom field definitions, which are useful when editing datasets.

GET
https://data.website/api/v3/site
HTTP Return Codes
200Returns the site settings JSON.

JSON Reference

/api/v3/site
{
  // Used in the browser tab title
  "title": "Barnet Open Data",

  "topics": {
    "waste-and-recycling": {
      "img": "https://.../waste-recycling.png", // or null
      "title": "Waste & Recycling"
    },
    // [...topics are set up through the web interface]
  },

  // Search sidebar. Valid values are "topic", "logo", "tag", "format",
  // "sharing", or "custom.<key>" for a custom field:
  "searchFilters": [
    "topic",
    "format",
    "tag"
  ],

  "licences": [
    // Set up through the web interface
    {
      "url": "https://.../doc/open-government-licence/version/3/",
      "title": "UK Open Government Licence (OGL v3)"
    },
    // [...]
  ],

  // -- UI Design
  // Edit these with caution!
  "design": {
    // Images & links
    "logo": "https://cdn.datapress.cloud/barnet/img/design/brand-logo.png",
    "emailLogo": "https://cdn.datapress.cloud/barnet/img/design/email-logo.png",
    "favicon": "https://cdn.datapress.cloud/barnet/img/design/favicon.ico",
    "navbarType": "is-primary", // "is-primary", "is-dark" or "is-white"
    "footer": {
      "copyright": "© Barnet Council",
      "home": {
        "img": "https://cdn.datapress.cloud/barnet/img/design/logo_barnet.png",
        "url": "https://www.barnet.gov.uk",
        "alt": "Barnet Council"
      }
    },
    // Analytics integrations. Google Tag Manager may be a string or a list:
    "googleTagManager": "GTM-...",
    "googleAnalytics4": "G-...",
    // Theme colours
    "uiColorPrimary": "blue",
    "uiColorSecondary": "slate",
    "uiMetaThemeColor": "#1e40af"
  },

  // Navigation and footer menus
  "menus": {
     // [...set up through the web interface]
  },

  // Blog location, eg. "/blog" or "" to disable:
  "blogRoot": "/blog",
  "blogTitle": "News",

  // -- Site Settings
  "customFields": {
    // [...set up through the web interface]
  },
  "id": "mysite", // Immutable
  "hostname": "data.website", // Immutable
  "hostnameProd": "data.website", // Immutable
  "canonical": "https://data.website", // Immutable
  "https": true, // Immutable
}

Updating the site settings

PATCH
https://data.website/api/v3/site
HTTP Headers
AuthorizationAPI key with administrator permissions.stringRequired
HTTP Return Codes
200Returns the updated site settings JSON.
400Returns a JSON object explaining the error.
403API key does not have administrator permissions.

Example: Rename a topic

import requests, os, json

api_key = os.getenv("DATAPRESS_API_KEY")

headers = { "Authorization": api_key }
patch = [
    {
        "op": "replace",
        "path": "/topics/waste-and-recycling/title",
        "value": "Reduce, Reuse, Recycle"
    }
]

url = f"https://data.website/api/v3/site"

# This will submit the patch with the header "Content-Type: application/json"
response = requests.patch(url, json=patch, headers=headers)
print(json.dumps(response.json(), indent=2))