For the complete documentation index, see llms.txt. This page is also available as Markdown.

List of all websites in a Project

Guide for how to fetch a list of all active websites within a DevHub project

You will need the Project/Business ID (business_id) for this query

GET /api/v2/sites/?deleted=0&business_id=<business_id_here>&type=default&offset=0&limit=100

Query summary: active (non-disabled) websites for the Project/Business ID, with limit/offset to support multiple API requests if the project has over 100 total sites

{
  "meta": {
    "limit": 100,
    "next": "/api/v2/sites/?limit=100&offset=100",
    "offset": 0,
    "previous": null,
    "total_count": 82
  },
  "objects": [
    {
      "added": "2013-06-19T11:17:13",
      "deleted": false,
      "formatted_url": "http://somesite.cloudpreview.net/",
      "id": 1281131,
      "modified": "2014-01-28T13:20:13",
      "partner_site_id": "yourbrand-1000",
      "published": true,
      "type": "default",
      ...
    },
    {
      "added": "2013-06-19T11:17:13",
      "deleted": false,
      "formatted_url": "http://somesite2.cloudpreview.net/",
      "id": 1281132,
      "modified": "2014-01-28T13:20:13",
      "partner_site_id": "yourbrand-1001",
      "published": true,
      "type": "default",
      ...
    },
    ...
  ]
}

Additional docs: https://api-docs.devhub.com/core-resources/sites#list-sites

Key properties in the response object

  • id: DevHub Site ID

  • formatted_url: Full URL to the landing page/website

  • partner_site_id: Prefixed reference to the Google Sheet "ID" column

Last updated