---
updatedAt: 2026-05-12T09:58:46.000Z
---

# Retrieve all sites

This operation returns an object containing information about all of the sites which the current user has permission to access.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "AssociatedHostname": {
        "description": "AssociatedHostname holds the structure of a single associated hostname",
        "properties": {
          "createdTime": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CandidateHostname": {
        "description": "CandidateHostname holds the structure of a hostname requested for addition",
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "rejectReason": {
            "type": "string"
          },
          "requestedTime": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SiteScanRule": {
        "description": "SiteScanRule holds the structure of a scanning rule for this site",
        "properties": {
          "else": {
            "description": "else - branch conditional",
            "type": "string"
          },
          "id": {
            "description": "ID of scan rule",
            "type": "string"
          },
          "isRoot": {
            "description": "isRoot - indicates if this is a root scan rule (there should always be a root rule)",
            "type": "boolean"
          },
          "maxCount": {
            "description": "maxCount - the number of matching URLs that, when reached, will trigger the 'then' condition",
            "format": "int64",
            "type": "integer"
          },
          "regex": {
            "description": "regex - the regular expression used for this rule",
            "type": "string"
          },
          "regexR": {
            "description": "regexR - a condition that allows search and replace in a specific URL for parameter values",
            "type": "string"
          },
          "sift": {
            "description": "sift - a condition that randomizes what links get added to a scan. Values range from 0.1 - 1.0 (0.1 = 10%, 1.0 = 100%). Useful for templated content.",
            "format": "double",
            "type": "number"
          },
          "then": {
            "description": "then - branch conditional",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "SiteSwagger": {
        "description": "SiteSwagger is the swagger version of the site data object that is returned from the sites endpoints",
        "properties": {
          "abbreviation": {
            "type": "string"
          },
          "allowedHosts": {
            "items": {
              "$ref": "#/components/schemas/AssociatedHostname"
            },
            "type": "array"
          },
          "applianceID": {
            "format": "int64",
            "type": "integer"
          },
          "associatedHostname": {
            "type": "string"
          },
          "candidateHosts": {
            "items": {
              "$ref": "#/components/schemas/CandidateHostname"
            },
            "type": "array"
          },
          "clientID": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "industry": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization": {
            "type": "string"
          },
          "scanRules": {
            "items": {
              "$ref": "#/components/schemas/SiteScanRule"
            },
            "type": "array"
          },
          "speed": {
            "format": "double",
            "type": "number"
          },
          "customAssetID": {
            "type": "string"
          },
          "throttlingEnabled": {
            "type": "boolean"
          },
          "usesSatellite": {
            "type": "boolean"
          },
          "weight": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "sitesPageData": {
        "properties": {
          "filteredCount": {
            "format": "int64",
            "type": "integer"
          },
          "totalCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "sitesSwagger": {
        "description": "sitesSwagger is the swagger version of the collection data object that is returned from the sites endpoint",
        "properties": {
          "collection": {
            "items": {
              "$ref": "#/components/schemas/SiteSwagger"
            },
            "type": "array"
          },
          "page": {
            "$ref": "#/components/schemas/sitesPageData"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "license": {
      "name": "(c) Copyright 2023 WhiteHat Security"
    },
    "title": "Sites API",
    "version": "2.0.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/v2/sites": {
      "get": {
        "description": "This operation returns an object containing information about all of the sites which the current user has permission to access.",
        "operationId": "SitesResponse",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sitesSwagger"
                }
              }
            },
            "description": "SitesResponse provides a list of sites with associated needed actions to enable scanning"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            },
            "description": "BadRequestResponse indicates a request with invalid parameters"
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access"
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized"
          },
          "500": {
            "description": "GenericError generic error"
          }
        },
        "summary": "Retrieve all sites",
        "tags": [
          "Sites API v2.0"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "Sites API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```